[PATCH V2 5/6] cpuidle/powerpc: Backend-powerpc idle driver for powernv and pseries.

Wang Dongsheng-B40534 B40534 at freescale.com
Wed Jul 31 14:01:31 EST 2013



> 
> -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



More information about the Linuxppc-dev mailing list