From: David Gibson <david@gibson.dropbear.id.au>
To: linuxppc-embedded@lists.linuxppc.org
Cc: Paul Mackerras <paulus@samba.org>
Subject: get_pteptr()
Date: Thu, 13 Jun 2002 14:03:45 +1000 [thread overview]
Message-ID: <20020613040345.GD4228@zax> (raw)
get_pteptr() is used in exactly three places:
- in arch/ppc/8xx_io/commproc.c in the #else side of a #if 1,
i.e. not really used at all.
- in do_page_fault() [arch/ppc/mm/fault.c] for the handling of
page execute faults on 40x. It's use here is arguably incorrect if
large page pmds are introduced, although we won't ever get execute
faults on large pages, so it doesn't really matter.
- in iopa() [arch/ppc/mm/pgtable.c]. The sanest way [*] I can
see of extending this to support large page pmds, without horrible
ifdefs can't be done without either extending get_pteptr(), or
removing it and walking the page tables manually.
I could extend get_pteptr() to handle large page pmds. Something
like:
- if the address has no valid translation, return 0 and leave
*ptep unchanged (as now).
- if the address is translated by a normal PTE return
PAGE_MASK and set ptep to point to the PTE
- if the address is translated by a large page PMD return a
mask for the size of the large page and set ptep to point to the PMD.
That makes iopa() easy and works for the other callers.
But given that iopa() is pretty much the only user of this function
(do_page_fault() should be done slightly differently, I think), there
doesn't seem a lot of point. Why not just eliminate get_pteptr() and
walk the page tables explicitly in iopa().
[*] Well, apart from removing iopa() entirely, but that's another
flamewar^Wdiscussion.
--
David Gibson | For every complex problem there is a
david@gibson.dropbear.id.au | solution which is simple, neat and
| wrong. -- H.L. Mencken
http://www.ozlabs.org/people/dgibson
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next reply other threads:[~2002-06-13 4:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-13 4:03 David Gibson [this message]
2002-06-13 5:02 ` get_pteptr() Dan Malek
2002-06-13 5:27 ` get_pteptr() David Gibson
2002-06-13 7:29 ` get_pteptr() Dan Malek
2002-06-13 7:51 ` get_pteptr() David Gibson
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=20020613040345.GD4228@zax \
--to=david@gibson.dropbear.id.au \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).