mm: Pass virtual address to [__]p{te,ud,md}_free_tlb()
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 22 Jul 2009 05:44:28 +0000 (15:44 +1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 27 Jul 2009 19:10:38 +0000 (12:10 -0700)
commit9e1b32caa525cb236e80e9c671e179bcecccc657
tree8a1f0abf5291b23047cfdf099d5cfc96cc9d9253
parent4be3bd7849165e7efa6b0b35a23d6a3598d97465
mm: Pass virtual address to [__]p{te,ud,md}_free_tlb()

mm: Pass virtual address to [__]p{te,ud,md}_free_tlb()

Upcoming paches to support the new 64-bit "BookE" powerpc architecture
will need to have the virtual address corresponding to PTE page when
freeing it, due to the way the HW table walker works.

Basically, the TLB can be loaded with "large" pages that cover the whole
virtual space (well, sort-of, half of it actually) represented by a PTE
page, and which contain an "indirect" bit indicating that this TLB entry
RPN points to an array of PTEs from which the TLB can then create direct
entries. Thus, in order to invalidate those when PTE pages are deleted,
we need the virtual address to pass to tlbilx or tlbivax instructions.

The old trick of sticking it somewhere in the PTE page struct page sucks
too much, the address is almost readily available in all call sites and
almost everybody implemets these as macros, so we may as well add the
argument everywhere. I added it to the pmd and pud variants for consistency.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: David Howells <dhowells@redhat.com> [MN10300 & FRV]
Acked-by: Nick Piggin <npiggin@suse.de>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> [s390]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
34 files changed:
arch/alpha/include/asm/tlb.h
arch/arm/include/asm/tlb.h
arch/avr32/include/asm/pgalloc.h
arch/cris/include/asm/pgalloc.h
arch/frv/include/asm/pgalloc.h
arch/frv/include/asm/pgtable.h
arch/ia64/include/asm/pgalloc.h
arch/ia64/include/asm/tlb.h
arch/m32r/include/asm/pgalloc.h
arch/m68k/include/asm/motorola_pgalloc.h
arch/m68k/include/asm/sun3_pgalloc.h
arch/microblaze/include/asm/pgalloc.h
arch/mips/include/asm/pgalloc.h
arch/mn10300/include/asm/pgalloc.h
arch/parisc/include/asm/tlb.h
arch/powerpc/include/asm/pgalloc-32.h
arch/powerpc/include/asm/pgalloc-64.h
arch/powerpc/include/asm/pgalloc.h
arch/powerpc/mm/hugetlbpage.c
arch/s390/include/asm/tlb.h
arch/sh/include/asm/pgalloc.h
arch/sh/include/asm/tlb.h
arch/sparc/include/asm/pgalloc_32.h
arch/sparc/include/asm/tlb_64.h
arch/um/include/asm/pgalloc.h
arch/um/include/asm/tlb.h
arch/x86/include/asm/pgalloc.h
arch/x86/mm/pgtable.c
arch/xtensa/include/asm/tlb.h
include/asm-generic/4level-fixup.h
include/asm-generic/pgtable-nopmd.h
include/asm-generic/pgtable-nopud.h
include/asm-generic/tlb.h
mm/memory.c