[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cf9c146d-bacf-444e-92e2-15ebf513af96@gmail.com>
Date: Sat, 26 Oct 2024 13:58:23 +0200
From: Klara Modin <klarasmodin@...il.com>
To: Dhananjay Ugwekar <Dhananjay.Ugwekar@....com>, gautham.shenoy@....com,
mario.limonciello@....com, perry.yuan@....com, rafael@...nel.org,
viresh.kumar@...aro.org
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org, klara@...m.eu
Subject: Re: [PATCH 4/4] cpufreq/amd-pstate: Remove the redundant
amd_pstate_set_driver() call
Hi,
On 2024-10-17 12:05, Dhananjay Ugwekar wrote:
> amd_pstate_set_driver() is called twice, once in amd_pstate_init() and once
> as part of amd_pstate_register_driver(). Move around code and eliminate
> the redundancy.
>
> Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@....com>
> ---
> drivers/cpufreq/amd-pstate.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index 13ee5cac901d..6f6d961879cc 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -1848,9 +1848,11 @@ static int __init amd_pstate_init(void)
> return -ENODEV;
> }
>
> - ret = amd_pstate_set_driver(cppc_state);
> - if (ret)
> + ret = amd_pstate_register_driver(cppc_state);
> + if (ret) {
> + pr_err("failed to register with return %d\n", ret);
> return ret;
> + }
>
> /* capability check */
> if (cpu_feature_enabled(X86_FEATURE_CPPC)) {
> @@ -1870,12 +1872,6 @@ static int __init amd_pstate_init(void)
> return ret;
> }
>
> - ret = amd_pstate_register_driver(cppc_state);
> - if (ret) {
> - pr_err("failed to register with return %d\n", ret);
> - return ret;
> - }
> -
> dev_root = bus_get_dev_root(&cpu_subsys);
> if (dev_root) {
> ret = sysfs_create_group(&dev_root->kobj, &amd_pstate_global_attr_group);
This seems to break boot on my Zen 2 desktop (my Zen 4 laptop is fine,
however). I don't see any messages on the console and nothing shows up
in the pstore either.
I'll attach the kernel log from a normal boot (with the patch reverted)
in case it helps.
Please let me know if there's anything else you need.
Regards,
Klara Modin
View attachment "no-boot-bisect" of type "text/plain" (2861 bytes)
Download attachment "dmesg.gz" of type "application/gzip" (22665 bytes)
Download attachment "config.gz" of type "application/gzip" (46051 bytes)
Powered by blists - more mailing lists