diff options
author | Benjamin Gray <bgray@linux.ibm.com> | 2022-11-09 07:51:10 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-11-30 13:46:49 +0300 |
commit | 274d842fa1efd9449e62222c8896e0be11621f1f (patch) | |
tree | e561c879fbb8aec516100c49d8a3127bfae68a26 /arch/powerpc/mm/nohash/tlb.c | |
parent | d34471c9bd5d47ab148dd68817631a4238f755c4 (diff) | |
download | linux-274d842fa1efd9449e62222c8896e0be11621f1f.tar.xz |
powerpc/tlb: Add local flush for page given mm_struct and psize
Adds a local TLB flush operation that works given an mm_struct, VA to
flush, and page size representation. Most implementations mirror the
surrounding code. The book3s/32/tlbflush.h implementation is left as
a BUILD_BUG because it is more complicated and not required for
anything as yet.
This removes the need to create a vm_area_struct, which the temporary
patching mm work does not need.
Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221109045112.187069-8-bgray@linux.ibm.com
Diffstat (limited to 'arch/powerpc/mm/nohash/tlb.c')
-rw-r--r-- | arch/powerpc/mm/nohash/tlb.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/mm/nohash/tlb.c b/arch/powerpc/mm/nohash/tlb.c index 2c15c86c7015..a903b308acc5 100644 --- a/arch/powerpc/mm/nohash/tlb.c +++ b/arch/powerpc/mm/nohash/tlb.c @@ -184,6 +184,14 @@ void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr) mmu_get_tsize(mmu_virtual_psize), 0); } EXPORT_SYMBOL(local_flush_tlb_page); + +void local_flush_tlb_page_psize(struct mm_struct *mm, + unsigned long vmaddr, int psize) +{ + __local_flush_tlb_page(mm, vmaddr, mmu_get_tsize(psize), 0); +} +EXPORT_SYMBOL(local_flush_tlb_page_psize); + #endif /* |