提交 4f3085f8 编写于 作者: P Perry Yuan 提交者: Rafael J. Wysocki

cpufreq: amd-pstate: fix kernel hang issue while amd-pstate unregistering

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.

Fixes: 1d215f03 ("cpufreq: amd-pstate: Add fast switch function for AMD P-State")
Acked-by: NHuang Rui <ray.huang@amd.com>
Reviewed-by: NMario Limonciello <mario.limonciello@amd.com>
Tested-by: NWyes Karny <wyes.karny@amd.com>
Signed-off-by: NPerry Yuan <perry.yuan@amd.com>
Cc: 5.17+ <stable@vger.kernel.org> # 5.17+
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 7e834ff1
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册