Skip to content

Commit e8b4223

Browse files
spandruvadaij-intel
authored andcommitted
platform/x86: ISST: Allow reading core-power state on HWP disabled systems
When HWP (Hardware P-states) is disabled, dynamic SST features are disabled. But user should still be able to read the current core-power state, with legacy P-states. This will allow users to read current configuration with static SST enabled from BIOS. To address this, do not call disable_dynamic_sst_features() when the request is for reading the state. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Link: https://lore.kernel.org/r/20240229002659.1416623-1-srinivas.pandruvada@linux.intel.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent a6dcd3f commit e8b4223

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,10 +462,10 @@ static long isst_if_core_power_state(void __user *argp)
462462
struct tpmi_per_power_domain_info *power_domain_info;
463463
struct isst_core_power core_power;
464464

465-
if (disable_dynamic_sst_features())
465+
if (copy_from_user(&core_power, argp, sizeof(core_power)))
466466
return -EFAULT;
467467

468-
if (copy_from_user(&core_power, argp, sizeof(core_power)))
468+
if (core_power.get_set && disable_dynamic_sst_features())
469469
return -EFAULT;
470470

471471
power_domain_info = get_instance(core_power.socket_id, core_power.power_domain_id);

0 commit comments

Comments
 (0)