Skip to content

Commit f99e023

Browse files
KAGA-KOKOtorvalds
authored andcommitted
sparc/mm/highmem: flush cache and TLB
Patch series "mm/highmem: Fix fallout from generic kmap_local conversions". The kmap_local conversion wreckaged sparc, mips and powerpc as it missed some of the details in the original implementation. This patch (of 4): The recent conversion to the generic kmap_local infrastructure failed to assign the proper pre/post map/unmap flush operations for sparc. Sparc requires cache flush before map/unmap and tlb flush afterwards. Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Fixes: 3293efa ("sparc/mm/highmem: Switch to generic kmap atomic") Signed-off-by: Thomas Gleixner <[email protected]> Reported-by: Andreas Larsson <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Paul Cercueil <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Michael Ellerman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent dad4e5b commit f99e023

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

arch/sparc/include/asm/highmem.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@ extern pte_t *pkmap_page_table;
5050

5151
#define flush_cache_kmaps() flush_cache_all()
5252

53-
/* FIXME: Use __flush_tlb_one(vaddr) instead of flush_cache_all() -- Anton */
54-
#define arch_kmap_local_post_map(vaddr, pteval) flush_cache_all()
55-
#define arch_kmap_local_post_unmap(vaddr) flush_cache_all()
56-
53+
/* FIXME: Use __flush_*_one(vaddr) instead of flush_*_all() -- Anton */
54+
#define arch_kmap_local_pre_map(vaddr, pteval) flush_cache_all()
55+
#define arch_kmap_local_pre_unmap(vaddr) flush_cache_all()
56+
#define arch_kmap_local_post_map(vaddr, pteval) flush_tlb_all()
57+
#define arch_kmap_local_post_unmap(vaddr) flush_tlb_all()
5758

5859
#endif /* __KERNEL__ */
5960

0 commit comments

Comments
 (0)