Red Hat Bugzilla – Bug 192396
Userspace software relying on PAGE_SIZE is broken
Last modified: 2007-11-30 17:11:33 EST
Description of problem:
There is no PAGE_SIZE define in /usr/include/asm/page.h for ppc64.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
The missing defines are:
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
Page size is variable; it is not a compile-time constant.
If the #define still exists in other architectures' page.h, that's a temporary
aberration and will also be fixed soon.
If there is no PAGE_SIZE anymore, then remove the include file.
It does not make sense to have an empty include file.
That's being worked upon. Some other files still include it without #ifdef
__KERNEL__ though -- so until those are cleaned up, the empty file is still
(Clarifying since I expect to get duplicates...)
PAGE_SIZE (and PAGESIZE) are optional. Glibc has never defined them. Portable
software must cope with that and use sysconf(_SC_PAGE_SIZE).
Including kernel-private headers like <asm/page.h> is broken. That file is going
away (from user visibility) and in some architectures PAGE_SIZE has _already_
been removed from the user-visible parts of it. Page size can be variable, and
should be checked at runtime.