Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Kirill A. Shutemov and committed by
Linus Torvalds
ed7b1889 6cc931b9

+18 -5
-1
include/asm-frv/Kbuild
··· 4 4 5 5 unifdef-y += termios.h 6 6 unifdef-y += ptrace.h 7 - unifdef-y += page.h
-3
include/asm-generic/Kbuild.asm
··· 27 27 unifdef-y += termios.h 28 28 unifdef-y += types.h 29 29 unifdef-y += unistd.h 30 - 31 - # These probably shouldn't be exported 32 - unifdef-y += page.h
+2
include/asm-s390/kexec.h
··· 10 10 #ifndef _S390_KEXEC_H 11 11 #define _S390_KEXEC_H 12 12 13 + #ifdef __KERNEL__ 13 14 #include <asm/page.h> 15 + #endif 14 16 #include <asm/processor.h> 15 17 /* 16 18 * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return.
-1
include/linux/Kbuild
··· 18 18 19 19 header-y += affs_hardblocks.h 20 20 header-y += aio_abi.h 21 - header-y += a.out.h 22 21 header-y += arcfb.h 23 22 header-y += atmapi.h 24 23 header-y += atmbr2684.h
+8
include/linux/a.out.h
··· 128 128 #endif 129 129 130 130 #ifdef linux 131 + #ifdef __KERNEL__ 131 132 #include <asm/page.h> 133 + #else 134 + #include <unistd.h> 135 + #endif 132 136 #if defined(__i386__) || defined(__mc68000__) 133 137 #define SEGMENT_SIZE 1024 134 138 #else 135 139 #ifndef SEGMENT_SIZE 140 + #ifdef __KERNEL__ 136 141 #define SEGMENT_SIZE PAGE_SIZE 142 + #else 143 + #define SEGMENT_SIZE getpagesize() 144 + #endif 137 145 #endif 138 146 #endif 139 147 #endif
+8
include/linux/shm.h
··· 3 3 4 4 #include <linux/ipc.h> 5 5 #include <linux/errno.h> 6 + #ifdef __KERNEL__ 6 7 #include <asm/page.h> 8 + #else 9 + #include <unistd.h> 10 + #endif 7 11 8 12 /* 9 13 * SHMMAX, SHMMNI and SHMALL are upper limits are defaults which can ··· 17 13 #define SHMMAX 0x2000000 /* max shared seg size (bytes) */ 18 14 #define SHMMIN 1 /* min shared seg size (bytes) */ 19 15 #define SHMMNI 4096 /* max num of segs system wide */ 16 + #ifdef __KERNEL__ 20 17 #define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) /* max shm system wide (pages) */ 18 + #else 19 + #define SHMALL (SHMMAX/getpagesize()*(SHMMNI/16)) 20 + #endif 21 21 #define SHMSEG SHMMNI /* max shared segs per process */ 22 22 23 23 #ifdef __KERNEL__