[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <910badde-2014-0acc-64c0-5d5cf07716fe@amd.com>
Date: Mon, 19 Dec 2022 16:55:19 -0600
From: "Limonciello, Mario" <mario.limonciello@....com>
To: Perry Yuan <perry.yuan@....com>, rafael.j.wysocki@...el.com,
ray.huang@....com, viresh.kumar@...aro.org
Cc: Deepak.Sharma@....com, Nathan.Fontenot@....com,
Alexander.Deucher@....com, Shimmer.Huang@....com,
Xiaojian.Du@....com, Li.Meng@....com, wyes.karny@....com,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 04/13] cpufreq: amd-pstate: fix kernel hang issue while
amd-pstate unregistering
On 12/19/2022 00:40, Perry Yuan wrote:
> In the amd_pstate_adjust_perf(), there is one cpufreq_cpu_get() call to
> increase increments the kobject reference count of policy and make it as
> busy. Therefore, a corresponding call to cpufreq_cpu_put() is needed to
> decrement the kobject reference count back, it will resolve the kernel
> hang issue when unregistering the amd-pstate driver and register the
> `amd_pstate_epp` driver instance.
>
> Signed-off-by: Perry Yuan <perry.yuan@....com>
> Acked-by: Huang Rui <ray.huang@....com>
Even if this patch comes into mainline through the series, this
particular patch should go to stable too to fix users unloading
amd-pstate with the existing passive mode.
Cc: stable@...r.kernel.org
Reviewed-by: Mario Limonciello <mario.limonciello@....com>
> ---
> drivers/cpufreq/amd-pstate.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index 204e39006dda..c17bd845f5fc 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -307,6 +307,7 @@ static void amd_pstate_adjust_perf(unsigned int cpu,
> max_perf = min_perf;
>
> amd_pstate_update(cpudata, min_perf, des_perf, max_perf, true);
> + cpufreq_cpu_put(policy);
> }
>
> static int amd_get_min_freq(struct amd_cpudata *cpudata)
Powered by blists - more mailing lists