From: Kirill A. Shutemov Date: Thu, 7 Feb 2008 08:15:56 +0000 (-0800) Subject: Unexport asm/page.h X-Git-Tag: v2.6.25-rc1~354 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=ed7b1889da256977574663689b598d88950bbd23;p=linux-2.6 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 Reviewed-by: David Woodhouse Cc: David Howells Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-frv/Kbuild b/include/asm-frv/Kbuild index 966a9836d5..bc3f12c5b7 100644 --- a/include/asm-frv/Kbuild +++ b/include/asm-frv/Kbuild @@ -4,4 +4,3 @@ header-y += registers.h unifdef-y += termios.h unifdef-y += ptrace.h -unifdef-y += page.h diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm index d00fd67e63..57ba606359 100644 --- a/include/asm-generic/Kbuild.asm +++ b/include/asm-generic/Kbuild.asm @@ -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 diff --git a/include/asm-s390/kexec.h b/include/asm-s390/kexec.h index 7592af708b..f219c6411e 100644 --- a/include/asm-s390/kexec.h +++ b/include/asm-s390/kexec.h @@ -10,7 +10,9 @@ #ifndef _S390_KEXEC_H #define _S390_KEXEC_H +#ifdef __KERNEL__ #include +#endif #include /* * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return. diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 0d4f55d97a..2ebf068ba5 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 f913cc3e1b..82cd918f2a 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 +#else +#include +#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 eeaed921a1..eca6235a46 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h @@ -3,7 +3,11 @@ #include #include +#ifdef __KERNEL__ #include +#else +#include +#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__