intel_idle: Fix the 'preferred_cstates' module parameter
mainline inclusion from mainline-v5.18-rc5 commit 39c184a6 category: feature bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5BECY CVE: NA Intel-SIG: commit 39c184a6 intel_idle: Fix the 'preferred_cstates' module parameter. Backport for intel_idle driver -------------------------------- Problem description. When user boots kernel up with the 'intel_idle.preferred_cstates=4' option, we enable C1E and disable C1 states on Sapphire Rapids Xeon (SPR). In order for C1E to work on SPR, we have to enable the C1E promotion bit on all CPUs. However, we enable it only on one CPU. Fix description. The 'intel_idle' driver already has the infrastructure for disabling C1E promotion on every CPU. This patch uses the same infrastructure for enabling C1E promotion on every CPU. It changes the boolean 'disable_promotion_to_c1e' variable to a tri-state 'c1e_promotion' variable. Tested on a 2-socket SPR system. I verified the following combinations: * C1E promotion enabled and disabled in BIOS. * Booted with and without the 'intel_idle.preferred_cstates=4' kernel argument. In all 4 cases C1E promotion was correctly set on all CPUs. Also tested on an old Broadwell system, just to make sure it does not cause a regression. C1E promotion was correctly disabled on that system, both C1 and C1E were exposed (as expected). Fixes: da0e58c0 ("intel_idle: add 'preferred_cstates' module argument") Reported-by:Jan Beulich <jbeulich@suse.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com> [ rjw: Minor changelog edits ] Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
yingbao jia <yingbao.jia@intel.com> Signed-off-by:
Jun Tian <jun.j.tian@intel.com>
Loading
Please sign in to comment