From ed7b1889da256977574663689b598d88950bbd23 Mon Sep 17 00:00:00 2001 From: "Kirill A. Shutemov" Date: Thu, 7 Feb 2008 00:15:56 -0800 Subject: 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 --- include/linux/shm.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/linux/shm.h') 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 #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__ -- cgit v1.2.3