On Tue, May 30, 2023 at 11:55:03AM +0000, Wyes Karny wrote: > From: "Gautham R. Shenoy" <gautham.shenoy@xxxxxxx> > > [ Upstream commit 4badf2eb1e986bdbf34dd2f5d4c979553a86fe54 ] > > Schedutil normally calls the adjust_perf callback for drivers with > adjust_perf callback available and fast_switch_possible flag set. > However, when frequency invariance is disabled and schedutil tries to > invoke fast_switch. So, there is a chance of kernel crash if this > function pointer is not set. To protect against this scenario add > fast_switch callback to amd_pstate driver. > > Fixes: 1d215f0319c2 ("cpufreq: amd-pstate: Add fast switch function for AMD P-State") > Signed-off-by: Gautham R. Shenoy <gautham.shenoy@xxxxxxx> > Signed-off-by: Wyes Karny <wyes.karny@xxxxxxx> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> > (cherry picked from commit 4badf2eb1e986bdbf34dd2f5d4c979553a86fe54) > --- > drivers/cpufreq/amd-pstate.c | 37 +++++++++++++++++++++++++++++------- > 1 file changed, 30 insertions(+), 7 deletions(-) All now queued up, thanks. greg k-h