All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH v3 2/4] powerpc: Fixes for CONFIG_PTE_64BIT for SMP support
Date: Sat, 06 Sep 2008 08:38:00 +1000	[thread overview]
Message-ID: <1220654280.4879.202.camel@pasglop> (raw)
In-Reply-To: <828A65C6-A5DD-41C6-BA38-25BE04D76AA2@kernel.crashing.org>

On Fri, 2008-09-05 at 14:44 -0500, Kumar Gala wrote:
> > I also wonder if you should first ensure that the PTE is invalid and
> > if not, clear it and flush the TLB page ... Or at least add a
> > WARN_ON(pte_valid()) in case we get that wrong ...
> 
> I believe that's an issue since kmap_atomic() will call set_pte_at and  
> have the valid bit set.

Hrm... on the other hand, it's safe because kmap_atomic() is per-CPU and
thus won't race with anything...

On the other hand, if others (mprotect, mremap, whoever...) does it,
it's not safe.

I'm keen on letting set_pte_at() to the job and maybe if we can remove
the explicit flush kmap_atomic does... Though it's not totally trivial
to "know" it's a flush that doesn't need global invalidations...

May be worth moving your current stuff into a __set_pte_at() that you
use from kmap atomic, and have set_pte_at() wrap that along with a
present warn. That would do for the time being.

Ben.

  reply	other threads:[~2008-09-05 22:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-03 18:09 [PATCH v3 1/4] powerpc: Introduce local (non-broadcast) forms of tlb invalidates Kumar Gala
2008-09-03 18:09 ` [PATCH v3 2/4] powerpc: Fixes for CONFIG_PTE_64BIT for SMP support Kumar Gala
2008-09-03 18:09   ` [PATCH v3 3/4] powerpc/fsl-booke: Fixup 64-bit PTE reading " Kumar Gala
2008-09-03 18:09     ` [PATCH v3 4/4] powerpc/mm: Implement _PAGE_SPECIAL & pte_special() for 32-bit Kumar Gala
2008-09-04  3:15       ` Benjamin Herrenschmidt
2008-09-04  3:14     ` [PATCH v3 3/4] powerpc/fsl-booke: Fixup 64-bit PTE reading for SMP support Benjamin Herrenschmidt
2008-09-04  3:12   ` [PATCH v3 2/4] powerpc: Fixes for CONFIG_PTE_64BIT " Benjamin Herrenschmidt
2008-09-05 19:44     ` Kumar Gala
2008-09-05 22:38       ` Benjamin Herrenschmidt [this message]
2008-09-06 15:32         ` Kumar Gala
2008-09-04 19:17 ` [PATCH v3 1/4] powerpc: Introduce local (non-broadcast) forms of tlb invalidates Rafal Jaworowski
2008-09-04 21:30   ` 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=1220654280.4879.202.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=galak@kernel.crashing.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.