[Top] [All Lists]

Re: CVS linux

To: Ralf Baechle <>
Subject: Re: CVS linux
From: "Maciej W. Rozycki" <>
Date: Mon, 23 Aug 2004 13:40:14 +0200 (CEST)
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <>
On Mon, 23 Aug 2004, Ralf Baechle wrote:

> Due to PAGE_SHIFT being undefined?  You meant the opposite?

 Yes.  No.  PAGE_SHIFT is defined conditionally based on 
CONFIG_PAGE_SIZE_*, which is of course undefined in a generic set of 

 With PAGE_SIZE undefined you can fall back to sysconf(_SC_PAGESIZE) or 
the page size in the ELF auxiliary vector (depending on the context).  

> Procps but I have dark memories of other packages doing the same thing, so
> I gave up and kludged the thing the same way other architectures do.
> Even IA-64 which is suffering the same pains with variable page size.

 Do they?  Anyway that's not a way to fix broken software.  Perhaps we 
could do the following hack to teach the resistant:

#ifndef __KERNEL__
#warning PAGE_SIZE is not a user macro, fix your program!
#define PAGE_SIZE sysconf(_SC_PAGESIZE)

but glibc might not be especially happy about such an alias.

 If you really insist on PAGE_SIZE being constant, then please at least
define it to the maximum supported size for the userland, so that page
alignment rules are kept.  I don't see any reason to keep bugs alive,


<Prev in Thread] Current Thread [Next in Thread>