From: Frank Mori Hess Date: Sun, 27 Feb 2005 22:26:45 +0000 (+0000) Subject: patch from Ian Abbott : X-Git-Tag: r0_7_70~40 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7c3a2f7bd35342bf8eca51d86f6e77c2f65c3753;p=comedi.git patch from Ian Abbott : This patch against CVS also applies to comedi-0.7.69 and allows it to compile correctly against Red Hat 9's 2.4.20-8 kernel, and probably others using the "statm" kernel patch. It also changes the conditions for defining the pte_offset_kernel() macro in the asm/pgtable.h compatibility header to avoid it being redefined. --- diff --git a/include/asm/pgtable.h b/include/asm/pgtable.h index 84017b2f..20fe5b8d 100644 --- a/include/asm/pgtable.h +++ b/include/asm/pgtable.h @@ -19,15 +19,11 @@ #ifndef __COMPAT_ASM_PGTABLE_H_ #define __COMPAT_ASM_PGTABLE_H_ -#include - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#include_next +#ifndef pte_offset_kernel #define pte_offset_kernel(dir,address) pte_offset(dir,address) - #endif -#include_next - #endif /* __COMPAT_ASM_PGTABLE_H_ */ diff --git a/include/linux/mm.h b/include/linux/mm.h index a7ab7ce9..39ed289b 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -14,7 +14,12 @@ #define VM_OFFSET(a) ((a)->vm_pgoff * PAGE_SIZE) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,10) \ + && LINUX_VERSION_CODE < KERNEL_VERSION(2,5,3) +#include /* look for tlb_vma() macro for "statm" patch */ +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,3) && !defined(tlb_vma) #define REMAP_PAGE_RANGE(a,b,c,d,e) remap_page_range(b,c,d,e) #else #define REMAP_PAGE_RANGE(a,b,c,d,e) remap_page_range(a,b,c,d,e)