Skip to content
Commit 4f3085f8 authored by Perry Yuan's avatar Perry Yuan Committed by Rafael J. Wysocki
Browse files

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: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Tested-by: default avatarWyes Karny <wyes.karny@amd.com>
Signed-off-by: default avatarPerry Yuan <perry.yuan@amd.com>
Cc: 5.17+ <stable@vger.kernel.org> # 5.17+
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 7e834ff1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment