From 3a71e87742ce8686c2b3c85ebbc8fb7a72b4f6e0 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 18 Jul 2007 09:46:16 +1000 Subject: drm: idr stuff is upstream for 2.6.23 --- linux-core/drm_compat.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'linux-core/drm_compat.h') diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index 024059ac..0b00ba47 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -306,8 +306,10 @@ extern int drm_bo_map_bound(struct vm_area_struct *vma); #endif -/* fixme when functions are upstreamed */ +/* fixme when functions are upstreamed - upstreamed for 2.6.23 */ +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)) #define DRM_IDR_COMPAT_FN +#endif #ifdef DRM_IDR_COMPAT_FN int idr_for_each(struct idr *idp, int (*fn)(int id, void *p, void *data), void *data); -- cgit v1.2.3 From c453135789597648ef5aa641c4e59bb5b5e320de Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 12 Sep 2007 11:48:48 -0600 Subject: Added idr_replace() function which was apparently added in Linux 2.6.18 Someone should probably double-check my work here since this is the first time I've touched drm_compat.[ch] --- linux-core/drm_compat.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'linux-core/drm_compat.h') diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index 0b00ba47..94db8533 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -316,4 +316,9 @@ int idr_for_each(struct idr *idp, void idr_remove_all(struct idr *idp); #endif + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) +void *idr_replace(struct idr *idp, void *ptr, int id); +#endif + #endif -- cgit v1.2.3 From 41345b95a2cdc1e509171d31fc8aed8cecb43dbd Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 12 Sep 2007 12:05:15 -0600 Subject: Added bool typedef added in kernel 2.6.19 This allows the xgi code to compile with 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 94db8533..870f8b73 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -321,4 +321,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)) +typedef _Bool bool; +#endif + #endif -- cgit v1.2.3 From bea727b8387f3094b9921004d7686a2d77184466 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Sat, 22 Sep 2007 13:38:36 +0200 Subject: Make nouveau compile on older kernels. --- linux-core/drm_compat.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'linux-core/drm_compat.h') diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index 870f8b73..f74f4bc2 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -193,7 +193,10 @@ extern void drm_clear_vma(struct vm_area_struct *vma, extern pgprot_t vm_get_page_prot(unsigned long vm_flags); #ifndef GFP_DMA32 -#define GFP_DMA32 0 +#define GFP_DMA32 GFP_KERNEL +#endif +#ifndef __GFP_DMA32 +#define __GFP_DMA32 GFP_KERNEL #endif #if defined(CONFIG_X86) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)) -- cgit v1.2.3