Re: [PATCH 03/14] riscv, cpu/hotplug: Update name & callbacks to match their hotplug states

From: Prasanna Kumar T S M

Date: Fri Dec 04 2026 - 01:00:23 EST




On 04-12-2026 00:46, Srivatsa S. Bhat (Microsoft) wrote:
The cpuinfo CPU hotplug callback is registered at CPUHP_AP_ONLINE_DYN,
but its state name is "riscv/cpuinfo:starting". This is misleading
because the 'starting' suffix denotes the earlier, interrupts-disabled
STARTING section, and not the ONLINE section.

Rename it to "riscv/cpuinfo:online", following the naming convention
documented in Documentation/core-api/cpu_hotplug.rst.

Also, rename the registered CPU hotplug startup and teardown callbacks
to match the states that they are associated with.

No functional change intended, except for the update to the name string,
which gets reflected in sysfs output and instrumentation.

Fixes: 3baca1a4d490 ("RISC-V: Add mvendorid, marchid, and mimpid to /proc/cpuinfo output")
Signed-off-by: Srivatsa S. Bhat (Microsoft) <srivatsa@xxxxxxxxxxxxx>
---
arch/riscv/kernel/cpu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c
index af84b97af3a1..2eb4bd346f30 100644
--- a/arch/riscv/kernel/cpu.c
+++ b/arch/riscv/kernel/cpu.c
@@ -192,7 +192,7 @@ unsigned long riscv_cached_mimpid(unsigned int cpu_id)
}
EXPORT_SYMBOL(riscv_cached_mimpid);
-static int riscv_cpuinfo_starting(unsigned int cpu)
+static int riscv_cpuinfo_cpu_online(unsigned int cpu)
{
struct riscv_cpuinfo *ci = this_cpu_ptr(&riscv_cpuinfo);
@@ -221,8 +221,8 @@ static int __init riscv_cpuinfo_init(void)
{
int ret;
- ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "riscv/cpuinfo:starting",
- riscv_cpuinfo_starting, NULL);
+ ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "riscv/cpuinfo:online",
+ riscv_cpuinfo_cpu_online, NULL);
if (ret < 0) {
pr_err("cpuinfo: failed to register hotplug callbacks.\n");
return ret;


Looks good to me.

Reviewed-by: Prasanna Kumar T S M <ptsm@xxxxxxxxxxxxxxxxxxx>