[Skiboot] [PATCH v3 3/6] slw: Add Power9 idle states to power-mgt dt node

Stewart Smith stewart at linux.vnet.ibm.com
Thu Jun 9 16:44:25 AEST 2016


"Shreyas B. Prabhu" <shreyas at linux.vnet.ibm.com> writes:
> @@ -652,18 +749,29 @@ void add_cpu_idle_state_properties(void)
>  			residency_ns_buf, num_supported_idle_states * sizeof(u32));
>  	dt_add_property(power_mgt, "ibm,cpu-idle-state-flags", flags_buf,
>  			num_supported_idle_states * sizeof(u32));
> -	dt_add_property(power_mgt, "ibm,cpu-idle-state-pmicr", pmicr_buf,
> -			num_supported_idle_states * sizeof(u64));
> -	dt_add_property(power_mgt, "ibm,cpu-idle-state-pmicr-mask",
> -			pmicr_mask_buf, num_supported_idle_states * sizeof(u64));
>
> +	if (has_stop_inst) {
> +		dt_add_property(power_mgt, "ibm,cpu-idle-state-psscr",
> +				pm_ctrl_reg_val_buf,
> +				num_supported_idle_states * sizeof(u64));
> +		dt_add_property(power_mgt, "ibm,cpu-idle-state-psscr-mask",
> +				pm_ctrl_reg_mask_buf,
> +				num_supported_idle_states * sizeof(u64));
> +	} else {
> +		dt_add_property(power_mgt, "ibm,cpu-idle-state-pmicr",
> +				pm_ctrl_reg_val_buf,
> +				num_supported_idle_states * sizeof(u64));
> +		dt_add_property(power_mgt, "ibm,cpu-idle-state-pmicr-mask",
> +				pm_ctrl_reg_mask_buf,
> +				num_supported_idle_states * sizeof(u64));
> +	}

Minor thing, but could you add in comments of "power9/isa 3.0" and
"power8" around the if() condition so that we easily know in the future
that there's a bit of code there for P8.


-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list