From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: why does the macro "ZERO_PAGE" take an argument?
Date: Thu, 7 Jun 2007 07:34:19 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0706070731250.14994@localhost.localdomain> (raw)
In-Reply-To: <4667EC18.4080904@yahoo.com.au>
On Thu, 7 Jun 2007, Nick Piggin wrote:
> Robert P. J. Day wrote:
> > probably making a fool of myself here, but what is the purpose of
> > that single argument to the macro "ZERO_PAGE"?
> >
> > $ grep -r "define ZERO_PAGE" include
> > include/asm-frv/pgtable.h:#define ZERO_PAGE(vaddr) ({ BUG(); NULL; })
> > include/asm-frv/pgtable.h:#define ZERO_PAGE(vaddr)
> > virt_to_page(empty_zero_page)
> > include/asm-v850/pgtable.h:#define ZERO_PAGE(vaddr) ((void *)0x87654321)
> > include/asm-mips/pgtable.h:#define ZERO_PAGE(vaddr) \
> > include/asm-blackfin/pgtable.h:#define ZERO_PAGE(vaddr) (virt_to_page(0))
> > include/asm-parisc/pgtable.h:#define ZERO_PAGE(vaddr)
> > (virt_to_page(empty_zero_page))
> > include/asm-alpha/pgtable.h:#define ZERO_PAGE(vaddr)
> > (virt_to_page(ZERO_PGE))
> > ...
> >
> > AFAICT, there are no definitions of that macro that actually use
> > that argument. is that some kind of historical cruft?
>
> MIPS?
argh. that would be the *one* definition whose output got chopped
because of line continuation, and it would be only one that actually
uses the argument:
#define ZERO_PAGE(vaddr) \
(virt_to_page((void *)(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask))))
but it still leaves the question -- if ZERO_PAGE is meant to represent
a single, global shared page that is always zero, why would it *ever*
need to take an argument? and what's so special about MIPS that it
differs from all the rest?
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
next prev parent reply other threads:[~2007-06-07 11:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 11:17 Robert P. J. Day
2007-06-07 11:29 ` Nick Piggin
2007-06-07 11:34 ` Robert P. J. Day [this message]
2007-06-07 11:39 ` Satyam Sharma
2007-06-07 11:53 ` Robert P. J. Day
2007-06-07 16:37 ` Ralf Baechle
2007-06-07 18:04 ` H. Peter Anvin
2007-06-07 17:32 ` H. Peter Anvin
2007-06-07 19:29 ` William Lee Irwin III
2007-06-07 21:16 ` H. Peter Anvin
2007-06-08 7:25 ` Robert P. J. Day
2007-06-09 0:49 ` H. Peter Anvin
2007-06-12 2:18 ` Nick Piggin
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=Pine.LNX.4.64.0706070731250.14994@localhost.localdomain \
--to=rpjday@mindspring.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/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
all inboxes | Powered by JetHome®