From: Palmer Dabbelt Date: Tue, 2 Oct 2018 19:14:57 +0000 (-0700) Subject: RISC-V: Comment on the TLB flush in smp_callin() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=b18d6f05252d6b3f725c08d8831a46b003df5b6b;p=openwrt%2Fstaging%2Fblogic.git RISC-V: Comment on the TLB flush in smp_callin() This isn't readily apparent from reading the code. Signed-off-by: Palmer Dabbelt [Atish: code comment formatting update] Signed-off-by: Atish Patra Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt --- diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index 56abab6a9812..712e9ca85904 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c @@ -106,6 +106,10 @@ asmlinkage void __init smp_callin(void) trap_init(); notify_cpu_starting(smp_processor_id()); set_cpu_online(smp_processor_id(), 1); + /* + * Remote TLB flushes are ignored while the CPU is offline, so emit + * a local TLB flush right now just in case. + */ local_flush_tlb_all(); local_irq_enable(); preempt_disable();