Skip to content

Commit

Permalink
[PATCH] headers_check: fix userspace build of asm-mips/page.h
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Ralf Baechle <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dwmw2 authored and Linus Torvalds committed Sep 13, 2006
1 parent f01f0f0 commit a2aa3e2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions include/asm-mips/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

#include <spaces.h>

#endif

/*
* PAGE_SHIFT determines the page size
*/
Expand All @@ -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);
Expand Down Expand Up @@ -168,13 +164,13 @@ 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

#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>

#endif /* defined (__KERNEL__) */

#endif /* _ASM_PAGE_H */

0 comments on commit a2aa3e2

Please sign in to comment.