Skip to content

Commit

Permalink
mips/mm/highmem: use set_pte() for kmap_local()
Browse files Browse the repository at this point in the history
set_pte_at() on MIPS invokes update_cache() which might recurse into
kmap_local().

Use set_pte() like the original MIPS highmem implementation did.

Link: https://lkml.kernel.org/r/20210112170411.187513575@linutronix.de
Fixes: a4c33e8 ("mips/mm/highmem: Switch to generic kmap atomic")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Paul Cercueil <paul@crapouillou.net>
Reported-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Thomas Gleixner authored and Linus Torvalds committed Jan 24, 2021
1 parent a1dce7f commit 8c0d5d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/mips/include/asm/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ extern void kmap_flush_tlb(unsigned long addr);

#define flush_cache_kmaps() BUG_ON(cpu_has_dc_aliases)

#define arch_kmap_local_set_pte(mm, vaddr, ptep, ptev) set_pte(ptep, ptev)
#define arch_kmap_local_post_map(vaddr, pteval) local_flush_tlb_one(vaddr)
#define arch_kmap_local_post_unmap(vaddr) local_flush_tlb_one(vaddr)

Expand Down

0 comments on commit 8c0d5d7

Please sign in to comment.