Skip to content

Commit

Permalink
Unexport asm/page.h
Browse files Browse the repository at this point in the history
Do not export asm/page.h during make headers_install.  This removes PAGE_SIZE
from userspace headers.

Signed-off-by: Kirill A. Shutemov <[email protected]>
Reviewed-by: David Woodhouse <[email protected]>
Cc: David Howells <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Kirill A. Shutemov authored and Linus Torvalds committed Feb 7, 2008
1 parent 6cc931b commit ed7b188
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
1 change: 0 additions & 1 deletion include/asm-frv/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ header-y += registers.h

unifdef-y += termios.h
unifdef-y += ptrace.h
unifdef-y += page.h
3 changes: 0 additions & 3 deletions include/asm-generic/Kbuild.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions include/asm-s390/kexec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion include/linux/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions include/linux/a.out.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions include/linux/shm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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__
Expand Down

0 comments on commit ed7b188

Please sign in to comment.