[PATCH 0/2] riscv: Fix cpu hotplug warnings

"Rui Qi" <[email protected]>
Newsgroups org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
This series fixes two issues with CPU hotplug on RISC-V that cause
spurious warnings when offlining CPUs.

Patch 1 fixes the immediate regression from commit 2b2b207e1162
("riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool")
where the inverted warning condition triggers even when the
cpu_is_stopped callback is absent.

Patch 2 addresses the underlying race between the dying CPU and the
controlling CPU: the AP reports itself dead before it actually invokes
cpu_stop(), so the BP can observe the SBI HSM state as STARTED rather
than STOPPED. This was previously masked by the old semantics where
SBI_HSM_STATE_STARTED (0) was treated as success. The fix adds polling
with read_poll_timeout(), following the same approach as arm64's
cpu_psci_cpu_kill().

Rui Qi (2):
  riscv: Fix spurious warning when cpu_is_stopped callback is absent
  riscv: Poll for SBI_HSM_STATE_STOPPED in sbi_cpu_is_stopped()

 arch/riscv/kernel/cpu-hotplug.c |  6 +-----
 arch/riscv/kernel/cpu_ops_sbi.c | 13 ++++++++++---
 2 files changed, 11 insertions(+), 8 deletions(-)

--
2.20.1

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.