[PATCH v1] power: support amd-pstate cpufreq driver

Burakov, Anatoly anatoly.burakov at intel.com
Fri May 26 18:54:05 CEST 2023


On 4/12/2023 10:52 AM, Sivaprasad Tummala wrote:
> amd-pstate introduces a new CPU frequency control mechanism for AMD
> processors using the ACPI Collaborative Performance Power Control
> feature for a finer grained frequency management.
> 
> Patch to add support for amd-pstate driver.
> 
> Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala at amd.com>
> ---

I don't have an AMD machine handy so I can't test this, but code wise, 
LGTM bar one nitpick below.

Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>

> +	}
> +
> +	ret = read_core_sysfs_u32(f_nom, &nominal_freq);
> +	if (ret < 0) {
> +		RTE_LOG(ERR, POWER, "Failed to read %s\n",
> +				POWER_SYSFILE_NOMINAL_FREQ);
> +		goto out;
> +	}
> +
> +	power_check_turbo(pi);
> +
> +	if (scaling_max_freq < scaling_min_freq)

It would be nice if this produced an error message of some kind.

-- 
Thanks,
Anatoly



More information about the dev mailing list