RISC-V: Comment on the TLB flush in smp_callin()
authorPalmer Dabbelt <palmer@sifive.com>
Tue, 2 Oct 2018 19:14:57 +0000 (12:14 -0700)
committerPalmer Dabbelt <palmer@sifive.com>
Tue, 23 Oct 2018 00:03:36 +0000 (17:03 -0700)
This isn't readily apparent from reading the code.

Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
[Atish: code comment formatting update]
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/kernel/smpboot.c

index 56abab6a9812457072f4948a353fd11b40f3cd2a..712e9ca8590447c83e22dc063ab16758b66338f0 100644 (file)
@@ -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();