From: Arnd Bergmann <arnd@arndb.de>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Dave Hansen <haveblue@us.ibm.com>, linux-arch@vger.kernel.org
Subject: Re: [PATCH 3/9] actual generic PAGE_SIZE infrastructure
Date: Tue, 5 Sep 2006 07:49:07 +0200 [thread overview]
Message-ID: <200609050749.07639.arnd@arndb.de> (raw)
In-Reply-To: <1157434085.2413.22.camel@shinybook.infradead.org>
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 <><
next prev parent reply other threads:[~2006-09-05 5:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-01 19:08 [PATCH 0/9] generic PAGE_SIZE infrastructure (v5) Dave Hansen
2006-09-01 19:08 ` [PATCH 1/9] put alignment macros in align.h Dave Hansen
2006-09-01 19:08 ` [PATCH 2/9] conditionally define generic get_order() (ARCH_HAS_GET_ORDER) Dave Hansen
2006-09-01 19:08 ` [PATCH 4/9] ia64 generic PAGE_SIZE Dave Hansen
2006-09-01 19:08 ` [PATCH 3/9] actual generic PAGE_SIZE infrastructure Dave Hansen
2006-09-05 5:28 ` David Woodhouse
2006-09-05 5:37 ` David Woodhouse
2006-09-05 17:52 ` Dave Hansen
2006-09-05 18:39 ` David Woodhouse
2006-09-05 5:49 ` Arnd Bergmann [this message]
2006-09-05 6:14 ` David Woodhouse
2006-09-01 19:08 ` [PATCH 6/9] mips generic PAGE_SIZE Dave Hansen
2006-09-01 19:08 ` [PATCH 5/9] sparc64 " Dave Hansen
2006-09-01 19:08 ` [PATCH 7/9] parisc " Dave Hansen
2006-09-01 19:08 ` [PATCH 9/9] convert the "easy" architectures to " Dave Hansen
2006-09-01 19:08 ` [PATCH 8/9] powerpc " Dave Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200609050749.07639.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=dwmw2@infradead.org \
--cc=haveblue@us.ibm.com \
--cc=linux-arch@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox