Re: [patch 22/66] bus: arm-ccn: convert to hotplug statemachine

From: Pawel Moll
Date: Tue Jul 12 2016 - 07:16:19 EST


On Mon, 2016-07-11 at 12:28 +0000, Anna-Maria Gleixner wrote:
> @@ -1270,9 +1262,10 @@ static int arm_ccn_pmu_init(struct arm_c
> * ... and change the selection when it goes offline.
> Priority is
> * picked to have a chance to migrate events before perf is
> notified.
> */
> - ccn->dt.cpu_nb.notifier_call = arm_ccn_pmu_cpu_notifier;
> - ccn->dt.cpu_nb.priority = CPU_PRI_PERF + 1,
> - err = register_cpu_notifier(&ccn->dt.cpu_nb);
> + cpuhp_armccn_dt = &ccn->dt;
> + err = cpuhp_setup_state(CPUHP_AP_PERF_ARM_CCN_ONLINE,
> + "AP_PERF_ARM_CCN_ONLINE", NULL,
> + arm_ccn_pmu_offline_cpu);
> if (err)
> goto error_cpu_notifier;

Also, unless I'm missing something obvious, it seems that the callback
will be executed for CPUs going online? I'm definitely interested in my
"current" CPU going down, in order to migrate my handlers somewhere
else.

Help?

Pawel