From 652bbb77f6c9efb7e0a67cc868dfda42b00fc5fb Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 5 Apr 2007 20:20:33 +1000 Subject: add back compat for bool --- linux-core/drm_compat.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'linux-core/drm_compat.h') diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index bc5fadc5..bada1fdf 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -60,6 +60,13 @@ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) #undef DRM_IRQ_ARGS #define DRM_IRQ_ARGS int irq, void *arg, struct pt_regs *regs + +typedef _Bool bool; +enum { + false = 0, + true = 1 +}; + #endif #ifndef list_for_each_safe -- cgit v1.2.3 From d0956339e322238d2af5d63a2e65405ca3b8c4f8 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Mon, 5 Nov 2007 10:02:46 +0000 Subject: Use _size --- linux-core/drm_compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-core/drm_compat.h') diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index 0895e5e5..f861abfd 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -159,7 +159,7 @@ static __inline__ void *kcalloc(size_t nmemb, size_t size, int flags) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) #define vmalloc_user(_size) ({void * tmp = vmalloc(_size); \ - if (tmp) memset(tmp, 0, size); \ + if (tmp) memset(tmp, 0, _size); \ (tmp);}) #endif -- cgit v1.2.3 From 709aa4629321533bfa30c72c4e33f229c895358a Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Tue, 5 Feb 2008 09:28:32 +0000 Subject: Remove duplicate --- linux-core/drm_compat.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'linux-core/drm_compat.h') diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index 3f3abc9a..c3a70486 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -331,8 +331,4 @@ void idr_remove_all(struct idr *idp); void *idr_replace(struct idr *idp, void *ptr, int id); #endif -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) -typedef _Bool bool; -#endif - #endif -- cgit v1.2.3 From 7cc825f5946659ad586fd4aa4fd867a1373f3373 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Tue, 5 Feb 2008 10:10:36 +0000 Subject: Add missing round_jiffies_relative() for older kernels --- linux-core/drm_compat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linux-core/drm_compat.h') diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index c3a70486..92dcbc21 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -331,4 +331,8 @@ void idr_remove_all(struct idr *idp); void *idr_replace(struct idr *idp, void *ptr, int id); #endif +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) +extern unsigned long round_jiffies_relative(unsigned long j); +#endif + #endif -- cgit v1.2.3 From 66cd6bd66667433f56feecdcc94a2bb228d5a7ca Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Tue, 19 Feb 2008 15:32:00 +0000 Subject: compatibility code for pci_get_bus_and_slot() --- linux-core/drm_compat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linux-core/drm_compat.h') diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index 92dcbc21..78545768 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -335,4 +335,8 @@ void *idr_replace(struct idr *idp, void *ptr, int id); extern unsigned long round_jiffies_relative(unsigned long j); #endif +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) +extern struct pci_dev * pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); +#endif + #endif -- cgit v1.2.3 From 89f65c50d70fd2165433ead3cfaa88ee9519e261 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Tue, 26 Feb 2008 15:20:29 +0000 Subject: define PRETHAW --- linux-core/drm_compat.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linux-core/drm_compat.h') diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index 78545768..f5f06017 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -339,4 +339,8 @@ extern unsigned long round_jiffies_relative(unsigned long j); extern struct pci_dev * pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); #endif +#ifndef PM_EVENT_PRETHAW +#define PM_EVENT_PRETHAW 3 +#endif + #endif -- cgit v1.2.3 From 61a81a043cce747a32e514bf0e78fe3993a62f00 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Wed, 9 Apr 2008 22:07:40 +0100 Subject: Older kernels don't have kobject_uevent_env(), so punt the event for these older kernels. --- linux-core/drm_compat.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'linux-core/drm_compat.h') diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index 03838a18..046c7122 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -339,6 +339,15 @@ extern unsigned long round_jiffies_relative(unsigned long j); extern struct pci_dev * pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); #endif +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) +static inline int kobject_uevent_env(struct kobject *kobj, + enum kobject_action action, + char *envp[]) +{ + return 0; +} +#endif + #ifndef PM_EVENT_PRETHAW #define PM_EVENT_PRETHAW 3 #endif -- cgit v1.2.3 From 6d4e147480a334d32fa59c7fde53e10d7ab6e106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 22 Jul 2008 14:24:32 -0400 Subject: Make it compile again. --- linux-core/drm_compat.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'linux-core/drm_compat.h') diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index cfa4fc6d..564a9438 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -386,4 +386,12 @@ extern struct page *drm_vm_sg_nopage(struct vm_area_struct *vma, unsigned long address, int *type); #endif +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26) +#define drm_on_each_cpu(handler, data, wait) \ + on_each_cpu(handler, data, wait) +#else +#define drm_on_each_cpu(handler, data, wait) \ + on_each_cpu(handler, data, wait, 1) +#endif + #endif -- cgit v1.2.3