summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-09-13 07:36:06 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-13 18:32:16 +0400
commita2aa3e2304e21e2b8bf52b69ac9f1e0cb0320909 (patch)
tree67bf4deebf807ee939ad5f91491c2e1b312e6e62
parentf01f0f052d1255dcdcf11d4872c4bca95e46b36c (diff)
downloadlinux-a2aa3e2304e21e2b8bf52b69ac9f1e0cb0320909.tar.xz
[PATCH] headers_check: fix userspace build of asm-mips/page.h
MIPS asm/page.h unconditionally includes <asm-generic/memory_model.h>, 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 <dwmw2@infradead.org> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/asm-mips/page.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 6ed1151a05a3..219d359861f3 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -14,8 +14,6 @@
#include <spaces.h>
-#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 <asm-generic/memory_model.h>
#include <asm-generic/page.h>
+#endif /* defined (__KERNEL__) */
+
#endif /* _ASM_PAGE_H */