Re: [PATCH 13/14] csky, cpu/hotplug: Update name & callbacks to match their hotplug state

From: Prasanna Kumar T S M

Date: Fri Dec 04 2026 - 02:28:36 EST




On 04-12-2026 00:46, Srivatsa S. Bhat (Microsoft) wrote:
The C-SKY PMU callbacks are registered at CPUHP_AP_PERF_CSKY_ONLINE, but
their callback function names include "starting" and "dying". This is
misleading because they suggest the earlier, interrupts-disabled
STARTING section, and not the ONLINE section where these callbacks
actually run.

Rename csky_pmu_starting_cpu() to csky_pmu_cpu_online() and
csky_pmu_dying_cpu() to csky_pmu_cpu_offline(), to match the states that
they are associated with.

Also, the state is named "AP_PERF_ONLINE", which is confusing, because
there is another state that is actually CPUHP_AP_PERF_ONLINE, which maps
to "perf:online". So, rename the C-SKY PMU state to "perf/csky:online"
following the naming convention documented in
Documentation/core-api/cpu_hotplug.rst.

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

Fixes: f622fbf20596 ("csky: Add pmu interrupt support")
Signed-off-by: Srivatsa S. Bhat (Microsoft) <srivatsa@xxxxxxxxxxxxx>
---
arch/csky/kernel/perf_event.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/csky/kernel/perf_event.c b/arch/csky/kernel/perf_event.c
index e0a36acd265b..1f786534832a 100644
--- a/arch/csky/kernel/perf_event.c
+++ b/arch/csky/kernel/perf_event.c
@@ -1277,13 +1277,13 @@ int init_hw_perf_events(void)
return 0;
}
-static int csky_pmu_starting_cpu(unsigned int cpu)
+static int csky_pmu_cpu_online(unsigned int cpu)
{
enable_percpu_irq(csky_pmu_irq, 0);
return 0;
}
-static int csky_pmu_dying_cpu(unsigned int cpu)
+static int csky_pmu_cpu_offline(unsigned int cpu)
{
disable_percpu_irq(csky_pmu_irq);
return 0;
@@ -1318,9 +1318,9 @@ int csky_pmu_device_probe(struct platform_device *pdev,
pr_notice("[perf] PMU request irq fail!\n");
}
- ret = cpuhp_setup_state(CPUHP_AP_PERF_CSKY_ONLINE, "AP_PERF_ONLINE",
- csky_pmu_starting_cpu,
- csky_pmu_dying_cpu);
+ ret = cpuhp_setup_state(CPUHP_AP_PERF_CSKY_ONLINE, "perf/csky:online",
+ csky_pmu_cpu_online,
+ csky_pmu_cpu_offline);
if (ret) {
csky_pmu_free_irq();
free_percpu(csky_pmu.hw_events);


Looks good to me.

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