From: Scott Wood <scottwood@freescale.com>
To: Becky Bruce <becky.bruce@freescale.com>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>
Subject: Re: [PATCH v2] POWERPC: Allow 32-bit pgtable code to support 36-bit physical
Date: Thu, 28 Aug 2008 15:28:26 -0500 [thread overview]
Message-ID: <48B70A6A.6030407@freescale.com> (raw)
In-Reply-To: <4DA58F0E-BBE8-4547-80AF-A890BACC79E7@freescale.com>
Becky Bruce wrote:
> On Aug 28, 2008, at 11:07 AM, Scott Wood wrote:
>
>> Becky Bruce wrote:
>>> I'm pretty sure I went through this in great detail at one point
>>> and concluded that I did in fact need the lwarx/stwcx. IIRC, it
>>> has to do with other non-set_pte_at writers not necessarily
>>> holding the page table lock. FYI, the existing 32-bit PTE code is
>>> doing atomic updates as well.
>>
>> But will those updates happen if there isn't already a valid PTE?
>
> I understand what you're saying, I've been here before :) However, I
> was never able to convince myself that it's safe without the
> lwarx/stwcx. There's hashing code that wanks around with the HASHPTE
> bit doing a RMW without holding any lock (other than lwarx/stwcx-ing
> the PTE itself).
OK. I was concerned not just about efficiency, but of the safety of the
"stw" write if there were other modifications going on (even if the
set_pte_at stwcx fails, the other updater could have lwarxed an
succesfully stwcxed after the stw and ended up with a mixed PTE), but it
may not be an issue depending on the nature of the updates.
>>> About PTE_ATOMIC_UPDATES, I didn't add that in because hashed
>>> page table implementations require atomic updates.
>>
>> Right, I misread it and thought it was being used for non-hashed
>> implementations as well.
>>
>> What happens if you enable 64-bit PTEs on a 603-ish CPU? The
>> kconfig seems to allow it.
>
> Don't do that :) That's why the help is there in the Kconfig.
People will do it anyway -- and there's multiplatform to consider.
> Otherwise, I have to list out every 74xx part that supports 36-bit
> physical addressing. In any event, nothing interesting will happen
> other than that you'll waste some space. The kernel boots fine with
> a non-36b physical u-boot and small amounts of RAM.
My concern was the generic code trying to use 64-bit PTEs, and the 603
TLB miss handlers continuing to assume that the PTEs are 32-bit, and
loading the wrong thing.
Wasted space alone is an acceptable consequence of turning on things you
don't need. :-)
> I'm still not sure where you're going with this - I can remove 44x
> from the conditional part, but we still have to deal with e500 and
> 6xx.
You still need it in "depends" (in the absence of a "PHYS_64BIT_CAPABLE"
or some such), but not "bool '...' if". It's not a big deal, just a pet
peeve.
> In which case you're now setting this in different places for difft
> plats, making it potentially harder to read. Unless you're
> suggesting allowing the selection of PHYS_64BIT on any platform
No, unless the code for all platforms makes it safe to do so.
-Scott
next prev parent reply other threads:[~2008-08-28 20:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-27 22:38 [PATCH v2] POWERPC: Allow 32-bit pgtable code to support 36-bit physical Becky Bruce
2008-08-27 23:43 ` Scott Wood
2008-08-28 15:36 ` Becky Bruce
2008-08-28 16:07 ` Scott Wood
2008-08-28 19:37 ` Becky Bruce
2008-08-28 20:28 ` Scott Wood [this message]
2008-08-28 21:13 ` Becky Bruce
2008-08-28 22:42 ` Benjamin Herrenschmidt
2008-08-30 16:24 ` Scott Wood
2008-08-31 8:22 ` Benjamin Herrenschmidt
2008-09-01 5:28 ` Benjamin Herrenschmidt
2008-09-01 5:19 ` Benjamin Herrenschmidt
2008-09-02 16:19 ` Becky Bruce
2008-09-02 21:21 ` Benjamin Herrenschmidt
2008-09-03 15:10 ` Becky Bruce
2008-09-04 2:53 ` Benjamin Herrenschmidt
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=48B70A6A.6030407@freescale.com \
--to=scottwood@freescale.com \
--cc=becky.bruce@freescale.com \
--cc=linuxppc-dev@ozlabs.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).