Skip to content

Commit b18d6f0

Browse files
RISC-V: Comment on the TLB flush in smp_callin()
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>
1 parent 19ccf29 commit b18d6f0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/riscv/kernel/smpboot.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ asmlinkage void __init smp_callin(void)
106106
trap_init();
107107
notify_cpu_starting(smp_processor_id());
108108
set_cpu_online(smp_processor_id(), 1);
109+
/*
110+
* Remote TLB flushes are ignored while the CPU is offline, so emit
111+
* a local TLB flush right now just in case.
112+
*/
109113
local_flush_tlb_all();
110114
local_irq_enable();
111115
preempt_disable();

0 commit comments

Comments
 (0)