Skip to content

[PW_SID:1077988] riscv: Add WFI to secondary hart spinwait loop#1735

Closed
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1077988
Closed

[PW_SID:1077988] riscv: Add WFI to secondary hart spinwait loop#1735
linux-riscv-bot wants to merge 1 commit into
workflow__riscv__fixesfrom
pw1077988

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

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

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>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Add WFI to secondary hart spinwait loop"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 137.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Add WFI to secondary hart spinwait loop"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1112.50 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Add WFI to secondary hart spinwait loop"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1626.77 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Add WFI to secondary hart spinwait loop"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.17 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Add WFI to secondary hart spinwait loop"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 26.62 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Add WFI to secondary hart spinwait loop"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.73 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Add WFI to secondary hart spinwait loop"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.80 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Add WFI to secondary hart spinwait loop"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Add WFI to secondary hart spinwait loop"
kdoc
Desc: Detects for kdoc errors
Duration: 0.87 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Add WFI to secondary hart spinwait loop"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Add WFI to secondary hart spinwait loop"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "riscv: Add WFI to secondary hart spinwait loop"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw1077988 branch April 15, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants