From: David Woodhouse <dwmw2@infradead.org>
To: torvalds@osdl.org
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, ralf@linux-mips.org
Subject: [PATCH] [6/6] Fix userspace build of asm-mips/page.h
Date: Sat, 09 Sep 2006 12:36:51 +0100 [thread overview]
Message-ID: <1157801811.2977.68.camel@pmac.infradead.org> (raw)
In-Reply-To: <1157800733.2977.40.camel@pmac.infradead.org>
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>
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 6ed1151..219d359 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -14,8 +14,6 @@ #ifdef __KERNEL__
#include <spaces.h>
-#endif
-
/*
* PAGE_SHIFT determines the page size
*/
@@ -34,8 +32,6 @@ #endif
#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 @@ #define VM_DATA_DEFAULT_FLAGS (VM_READ |
#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 @@ #endif
#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>
+#endif /* defined (__KERNEL__) */
+
#endif /* _ASM_PAGE_H */
--
dwmw2
prev parent reply other threads:[~2006-09-09 11:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-09 11:18 [0/6] 'make headers_check' fixes for 2.6.18 David Woodhouse
2006-09-09 11:21 ` [PATCH] [1/6] Reduce user-visible noise in <linux/nfs_fs.h> David Woodhouse
2006-09-09 11:24 ` [PATCH] [2/6] Remove <asm/timex.h> from user export David Woodhouse
2006-09-09 11:27 ` [PATCH] [3/6] Move inclusion of <linux/linkage.h> in <asm-i386/signal.h> David Woodhouse
2006-09-09 11:29 ` [PATCH] [4/6] Move kernel-only #includes within <asm-i386/elf.h> David Woodhouse
2006-09-09 11:31 ` [PATCH] [5/6] Don't expose PFN stuff to userspace in <asm-i386/setup.h> David Woodhouse
2006-09-09 11:36 ` David Woodhouse [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1157801811.2977.68.camel@pmac.infradead.org \
--to=dwmw2@infradead.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ralf@linux-mips.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®