[PW_SID:1077988] riscv: Add WFI to secondary hart spinwait loop#1735
[PW_SID:1077988] riscv: Add WFI to secondary hart spinwait loop#1735linux-riscv-bot wants to merge 1 commit into
Conversation
The .Lwait_for_cpu_up loop in the RISCV_BOOT_SPINWAIT path busy-polls __cpu_spinwait_stack_pointer and __cpu_spinwait_task_pointer, burning power on all non-boot harts while they wait for the primary hart to complete early boot setup. Add a WFI instruction before each polling iteration to allow the hardware to enter a low-power state while waiting. Per the RISC-V privileged specification, WFI wakes on any pending interrupt even with global interrupts disabled (SIE=0), and implementations are permitted to treat it as a NOP, so this is safe in all contexts. The same pattern is already used in .Lsecondary_park in the same file. Signed-off-by: Adriano Vero <litaliano00.contact@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "riscv: Add WFI to secondary hart spinwait loop" |
|
Patch 1: "riscv: Add WFI to secondary hart spinwait loop" |
|
Patch 1: "riscv: Add WFI to secondary hart spinwait loop" |
|
Patch 1: "riscv: Add WFI to secondary hart spinwait loop" |
|
Patch 1: "riscv: Add WFI to secondary hart spinwait loop" |
|
Patch 1: "riscv: Add WFI to secondary hart spinwait loop" |
|
Patch 1: "riscv: Add WFI to secondary hart spinwait loop" |
|
Patch 1: "riscv: Add WFI to secondary hart spinwait loop" |
|
Patch 1: "riscv: Add WFI to secondary hart spinwait loop" |
|
Patch 1: "riscv: Add WFI to secondary hart spinwait loop" |
|
Patch 1: "riscv: Add WFI to secondary hart spinwait loop" |
|
Patch 1: "riscv: Add WFI to secondary hart spinwait loop" |
PR for series 1077988 applied to workflow__riscv__fixes
Name: riscv: Add WFI to secondary hart spinwait loop
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1077988
Version: 1