From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH v2] POWERPC: Allow 32-bit pgtable code to support 36-bit physical
Date: Mon, 01 Sep 2008 15:28:22 +1000 [thread overview]
Message-ID: <1220246902.13010.31.camel@pasglop> (raw)
In-Reply-To: <48B5E6B7.3000903@freescale.com>
> Could the stw to the same reservation granule as the stwcx cancel the
> reservation on some implementations?
It might I suppose ... In any case, see my replies to Becky.
> Plus, if you're assuming that the
> entry is currently invalid and all callers have the page table lock, do
> we need the lwarx/stwcx at all? At the least, it should check
> PTE_ATOMIC_UPDATES.
It shouldn't need atomic operations -if- the current entry is invalid
-and- _PAGE_HASHPTE is clear. (Ie, the current entry is invalid -and-
the hash table has been updated).
In any case, the stw can just move out of the loop.
It might be worth just doing something along the lines of
if (pte_val(*ptep) & _PAGE_PRESENT)
pte_clear(pte);
if (pte_val(*ptep) & _PAGE_HASHPTE)
flush_hash_entry(mm, ptep, addr);
asm v. { "stw ; eieio; stw" };
Cheers,
Ben.
next prev parent reply other threads:[~2008-09-01 5:28 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
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 [this message]
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=1220246902.13010.31.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=scottwood@freescale.com \
/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).