Re: [PATCH] powerpc: Fix 4xx flush_tlb_page()

From
Kumar Gala <hidden>
Date
2007-10-30 03:20:53
Reply to
Benjamin Herrenschmidt, 2007-10-29
On Oct 29, 2007, at 5:46 PM, Benjamin Herrenschmidt wrote:
On 4xx CPUs, the current implementation of flush_tlb_page() uses
a low level _tlbie() assembly function that only works for the
current PID. Thus, invalidations caused by, for example, a COW
fault triggered by get_user_pages() from a different context will
not work properly, causing among other things, gdb breakpoints
to fail.

This patch adds a "pid" argument to _tlbie() on 4xx processors,
and uses it to flush entries in the right context. FSL BookE
also gets the argument but it seems they don't need it (their
tlbivax form ignores the PID when invalidating according to the
document I have).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

 arch/powerpc/kernel/misc_32.S    |   23 ++++++++++++++++-------
 arch/powerpc/mm/fault.c          |    2 +-
 arch/powerpc/mm/mmu_decl.h       |    4 ++--
 arch/ppc/kernel/misc.S           |   22 +++++++++++++++-------
 arch/ppc/mm/fault.c              |    2 +-
 arch/ppc/mm/mmu_decl.h           |    4 ++--
 arch/ppc/platforms/4xx/ebony.c   |    2 +-
 arch/ppc/platforms/4xx/ocotea.c  |    2 +-
 arch/ppc/platforms/4xx/taishan.c |    2 +-
 include/asm-powerpc/tlbflush.h   |   12 ++++++------
 10 files changed, 46 insertions(+), 29 deletions(-)
Acked-by: Kumar Gala <redacted>

- k
Thread (2 messages) 2 messages, 2 authors, last reply 2007-10-30
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help