mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-29 13:23:23 +01:00
powerpc/64s: Disable preemption in hash lazy mmu mode
apply_to_page_range on kernel pages does not disable preemption, which is a requirement for hash's lazy mmu mode, which keeps track of the TLBs to flush with a per-cpu array. Reported-by: Guenter Roeck <[email protected]> Signed-off-by: Nicholas Piggin <[email protected]> Tested-by: Guenter Roeck <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
This commit is contained in:
1 parent
b12eb279ff
commit
b9ef323ea1
1 file changed
+6
@@ -32,6 +32,11 @@ static inline void arch_enter_lazy_mmu_mode(void)
|
||||
|
||||
if (radix_enabled())
|
||||
return;
|
||||
/*
|
||||
* apply_to_page_range can call us this preempt enabled when
|
||||
* operating on kernel page tables.
|
||||
*/
|
||||
preempt_disable();
|
||||
batch = this_cpu_ptr(&ppc64_tlb_batch);
|
||||
batch->active = 1;
|
||||
}
|
||||
@@ -47,6 +52,7 @@ static inline void arch_leave_lazy_mmu_mode(void)
|
||||
if (batch->index)
|
||||
__flush_tlb_pending(batch);
|
||||
batch->active = 0;
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
#define arch_flush_lazy_mmu_mode() do {} while (0)
|
||||
|
||||
Reference in new issue
Block a user