summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKirill A. Shutemov <k.shutemov@gmail.com>2008-02-07 00:15:56 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 08:42:30 -0800
commited7b1889da256977574663689b598d88950bbd23 (patch)
treebdbf8d12826dece7ec4ccb4edcb18cd66dc842a0 /include/linux
parent6cc931b9b5ec652c90b928f3ec2163f261552c91 (diff)
Unexport asm/page.h
Do not export asm/page.h during make headers_install. This removes PAGE_SIZE from userspace headers. Signed-off-by: Kirill A. Shutemov <k.shutemov@gmail.com> Reviewed-by: David Woodhouse <dwmw2@infradead.org> Cc: David Howells <dhowells@redhat.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/Kbuild1
-rw-r--r--include/linux/a.out.h8
-rw-r--r--include/linux/shm.h8
3 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 0d4f55d97ae9..2ebf068ba504 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -18,7 +18,6 @@ header-y += usb/
header-y += affs_hardblocks.h
header-y += aio_abi.h
-header-y += a.out.h
header-y += arcfb.h
header-y += atmapi.h
header-y += atmbr2684.h
diff --git a/include/linux/a.out.h b/include/linux/a.out.h
index f913cc3e1b0d..82cd918f2ab7 100644
--- a/include/linux/a.out.h
+++ b/include/linux/a.out.h
@@ -128,12 +128,20 @@ enum machine_type {
#endif
#ifdef linux
+#ifdef __KERNEL__
#include <asm/page.h>
+#else
+#include <unistd.h>
+#endif
#if defined(__i386__) || defined(__mc68000__)
#define SEGMENT_SIZE 1024
#else
#ifndef SEGMENT_SIZE
+#ifdef __KERNEL__
#define SEGMENT_SIZE PAGE_SIZE
+#else
+#define SEGMENT_SIZE getpagesize()
+#endif
#endif
#endif
#endif
diff --git a/include/linux/shm.h b/include/linux/shm.h
index eeaed921a1dc..eca6235a46c0 100644
--- a/include/linux/shm.h
+++ b/include/linux/shm.h
@@ -3,7 +3,11 @@
#include <linux/ipc.h>
#include <linux/errno.h>
+#ifdef __KERNEL__
#include <asm/page.h>
+#else
+#include <unistd.h>
+#endif
/*
* SHMMAX, SHMMNI and SHMALL are upper limits are defaults which can
@@ -13,7 +17,11 @@
#define SHMMAX 0x2000000 /* max shared seg size (bytes) */
#define SHMMIN 1 /* min shared seg size (bytes) */
#define SHMMNI 4096 /* max num of segs system wide */
+#ifdef __KERNEL__
#define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) /* max shm system wide (pages) */
+#else
+#define SHMALL (SHMMAX/getpagesize()*(SHMMNI/16))
+#endif
#define SHMSEG SHMMNI /* max shared segs per process */
#ifdef __KERNEL__