]> err.no Git - linux-2.6/commitdiff
Unexport asm/page.h
authorKirill A. Shutemov <k.shutemov@gmail.com>
Thu, 7 Feb 2008 08:15:56 +0000 (00:15 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 7 Feb 2008 16:42:30 +0000 (08:42 -0800)
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>
include/asm-frv/Kbuild
include/asm-generic/Kbuild.asm
include/asm-s390/kexec.h
include/linux/Kbuild
include/linux/a.out.h
include/linux/shm.h

index 966a9836d556a520afebaea42a613849a6d46e01..bc3f12c5b7e05688a609350735ab44744fa4b6f8 100644 (file)
@@ -4,4 +4,3 @@ header-y += registers.h
 
 unifdef-y += termios.h
 unifdef-y += ptrace.h
-unifdef-y += page.h
index d00fd67e636767bf64285a7dbd8403cca99b3b7f..57ba6063595914a8021b38d923b23763da80ab5f 100644 (file)
@@ -27,6 +27,3 @@ unifdef-y += termbits.h
 unifdef-y += termios.h
 unifdef-y += types.h
 unifdef-y += unistd.h
-
-# These probably shouldn't be exported
-unifdef-y += page.h
index 7592af708b4153975ac3cfc4cc8b1acef19c9c8d..f219c6411e0be1145b10676603a69f25385f9ce2 100644 (file)
@@ -10,7 +10,9 @@
 #ifndef _S390_KEXEC_H
 #define _S390_KEXEC_H
 
+#ifdef __KERNEL__
 #include <asm/page.h>
+#endif
 #include <asm/processor.h>
 /*
  * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return.
index 0d4f55d97ae93315c36cd9a6a001a25f6eb90fa4..2ebf068ba504f1afa9112716d141d95cac859baf 100644 (file)
@@ -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
index f913cc3e1b0da141d273522c751e4003cfc7ec18..82cd918f2ab708ca4545cf863e30f2db187777de 100644 (file)
@@ -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
index eeaed921a1dc02d02f3a61cec5ea0c62873ecfad..eca6235a46c0b1b89d951a90216b132c6a21cfb7 100644 (file)
@@ -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
 #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__