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>
#include <spaces.h>
-#endif
-
/*
* PAGE_SHIFT determines the page size
*/
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
-
-#ifdef __KERNEL__
#ifndef __ASSEMBLY__
extern void clear_page(void * page);
#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
#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>
+#endif /* defined (__KERNEL__) */
+
#endif /* _ASM_PAGE_H */