Messages in this thread | | | From | Wang Dongsheng-B40534 <> | Subject | RE: [PATCH V2 5/6] cpuidle/powerpc: Backend-powerpc idle driver for powernv and pseries. | Date | Wed, 31 Jul 2013 04:01:31 +0000 |
| |
> > -static int pseries_cpuidle_add_cpu_notifier(struct notifier_block *n, > +static int powerpc_cpuidle_add_cpu_notifier(struct notifier_block *n, > unsigned long action, void *hcpu) > { > int hotcpu = (unsigned long)hcpu; > struct cpuidle_device *dev = > - per_cpu_ptr(pseries_cpuidle_devices, hotcpu); > + per_cpu_ptr(powerpc_cpuidle_devices, hotcpu); > > if (dev && cpuidle_get_driver()) { > switch (action) { > @@ -235,16 +270,16 @@ static int pseries_cpuidle_add_cpu_notifier(struct > notifier_block *n, > } > > static struct notifier_block setup_hotplug_notifier = { > - .notifier_call = pseries_cpuidle_add_cpu_notifier, > + .notifier_call = powerpc_cpuidle_add_cpu_notifier, > }; > I think Daniel means move the notifier to cpuidle framework, not just powerpc.
And should be remove all about *device*. If the notifier handle using device, you can use "cpuidle_devices".
- dongsheng
> -static int __init pseries_processor_idle_init(void) > +static int __init powerpc_processor_idle_init(void) > { > int retval; > > - retval = pseries_idle_probe(); > + retval = powerpc_idle_probe(); > if (retval) > return retval; > > - pseries_cpuidle_driver_init(); > - retval = cpuidle_register_driver(&pseries_idle_driver); > + powerpc_cpuidle_driver_init(); > + retval = cpuidle_register_driver(&powerpc_idle_driver); > if (retval) { > - printk(KERN_DEBUG "Registration of pseries driver failed.\n"); > + printk(KERN_DEBUG "Registration of powerpc driver failed.\n"); > return retval; > } > > update_smt_snooze_delay(-1, per_cpu(smt_snooze_delay, 0)); > > - retval = pseries_idle_devices_init(); > + retval = powerpc_idle_devices_init(); Should be remove all *device*, using cpuidle_register.
- dongsheng
| |