From: David Woodhouse Date: Wed, 13 Sep 2006 03:36:06 +0000 (-0700) Subject: [PATCH] headers_check: fix userspace build of asm-mips/page.h X-Git-Tag: v2.6.18~13^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2aa3e2304e21e2b8bf52b69ac9f1e0cb0320909;p=linux-2.6 [PATCH] headers_check: fix userspace build of asm-mips/page.h MIPS asm/page.h unconditionally includes , which doesn't exist in userspace. Move an #endif /* __KERNEL__ */ down a few lines to prevent that. Also, remove the broken definition of PAGE_SIZE which is never going to be correct -- in the absence of PAGE_SIZE, non-broken userspace will fall back to using sysconf() or getpagesize() instead. Signed-off-by: David Woodhouse Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h index 6ed1151a05..219d359861 100644 --- a/include/asm-mips/page.h +++ b/include/asm-mips/page.h @@ -14,8 +14,6 @@ #include -#endif - /* * PAGE_SHIFT determines the page size */ @@ -34,8 +32,6 @@ #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1)) - -#ifdef __KERNEL__ #ifndef __ASSEMBLY__ extern void clear_page(void * page); @@ -168,8 +164,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE) #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET) -#endif /* defined (__KERNEL__) */ - #ifdef CONFIG_LIMITED_DMA #define WANT_PAGE_VIRTUAL #endif @@ -177,4 +171,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; #include #include +#endif /* defined (__KERNEL__) */ + #endif /* _ASM_PAGE_H */