Fix highmem build failure
PATCH 1/1 Fix highmem build failure
The following commit breaks PPC builds with CONFIG_HIGHMEM=y
commit f4112de6b679d84bd9b9681c7504be7bdfb7c7d5
Author: Akinobu Mita <[email protected]> Date: Tue Mar 31 15:23:25 2009 -0700
mm: introduce debug_kmap_atomic
We get:
CC init/main.o
In file included from include/linux/highmem.h:25,
from include/linux/pagemap.h:11,
from include/linux/mempolicy.h:63,
from init/main.c:53:
linux-2.6/arch/powerpc/include/asm/highmem.h: In function 'kmap_atomic_prot':
linux-2.6/arch/powerpc/include/asm/highmem.h:98: error: implicit declaration of function 'debug_kmap_atomic'
In file included from include/linux/pagemap.h:11,
from include/linux/mempolicy.h:63,
from init/main.c:53:include/linux/highmem.h: At top level:include/linux/highmem.h:196: warning: conflicting types for 'debug_kmap_atomic' include/linux/highmem.h:196: error: static declaration of 'debug_kmap_atomic' follows non-static declaration linux-2.6/include/asm/highmem.h:98: error: previous implicit declaration of 'debug_kmap_atomic' was here make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
--- include/linux/highmem.h | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-)
include/linux/highmem.h +13 -12
@@ -20,6 +20,19 @@ static inline void flush_kernel_dcache_page(struct page *page)#endif #ifdef CONFIG_HIGHMEM +#include <asm/kmap_types.h> + +#if defined(CONFIG_DEBUG_HIGHMEM ) && defined(CONFIG_TRACE_IRQFLAGS_SUPPORT ) + +void debug_kmap_atomic (enum km_type type); + +#else + +static inline void debug_kmap_atomic (enum km_type type) +{ +} + +#endif #include <asm/highmem.h>
@@ -187,16 +200,4 @@ static inline void copy_highpage(struct page *to, struct page *from) kunmap_atomic(vto, KM_USER1); } -#if defined(CONFIG_DEBUG_HIGHMEM ) && defined(CONFIG_TRACE_IRQFLAGS_SUPPORT ) - -void debug_kmap_atomic (enum km_type type); - -#else - -static inline void debug_kmap_atomic (enum km_type type) -{ -} - -#endif -#endif /* _LINUX_HIGHMEM_H */
Signature · 1 line
1.5.6.6
Quoted 8 lines · Kumar Gala
The following commit breaks PPC builds with
CONFIG_HIGHMEM=ycommit
f4112de6b679d84bd9b9681c7504be7bdfb7c7d5Author: Akinobu Mita <[email protected]> Date: Tue Mar 31 15:23:25 2009 -0700mm: introduce
debug_kmap_atomic
Thanks.
But the definition of debug_kmap_atomic() needs to be outside of ifdef CONFIG_HIGHMEM. Because debug_kmap_atomic() is used without CONFIG_HIGHMEM by kmap_atomic_prot_pfn() in arch/x86/mm/iomap_32.c
Quoted 22 lines
include/linux/highmem.h +13
-0@@ -20,6 +20,19 @@ static inline void flush_kernel_dcache_page(struct page *page)#endif #ifdef CONFIG_HIGHMEM +#include <asm/kmap_types.h> + +#if defined(CONFIG_DEBUG_HIGHMEM ) && defined(CONFIG_TRACE_IRQFLAGS_SUPPORT ) + +void debug_kmap_atomic (enum km_type type); + +#else + +static inline void debug_kmap_atomic (enum km_type type) +{ +} + +#endif #include <asm/highmem.h>