On Tuesday 05 September 2006 07:28, David Woodhouse wrote:
> It does look like you've correctly refrained from making the new
> PAGE_SIZE definitions visible to userspace, which is good. Userspace
> should be using sysconf(), not hardcoded PAGE_SIZE.
With generic PAGE_SIZE, it's not even possible to making the definitions
visible to user space, because CONFIG_* can not be exported in the
first place.
linux-libc-headers apparently exported something anyway, in the form
of
#include <unistd.h>
#define PAGE_SIZE ((unsigned long)getpagesize())
#define PAGE_SHIFT ((PAGE_SIZE > 65536) ? -1 : ((unsigned
long[]){12,13,14,-1,15,-1,-1,-1,16}[PAGE_SIZE>>13]))
#define PAGE_MASK (~(PAGE_SIZE-1))
This looks like a reasonable implementation, I wonder if we should
have something like this in the #ifndef __KERNEL__ part of
asm-generic/page.h.
Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html