Commit e8b4223d authored by Srinivas Pandruvada's avatar Srinivas Pandruvada Committed by Ilpo Järvinen

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: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: default avatarKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://lore.kernel.org/r/20240229002659.1416623-1-srinivas.pandruvada@linux.intel.comReviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent a6dcd3f1
......@@ -462,10 +462,10 @@ static long isst_if_core_power_state(void __user *argp)
struct tpmi_per_power_domain_info *power_domain_info;
struct isst_core_power core_power;
if (disable_dynamic_sst_features())
if (copy_from_user(&core_power, argp, sizeof(core_power)))
return -EFAULT;
if (copy_from_user(&core_power, argp, sizeof(core_power)))
if (core_power.get_set && disable_dynamic_sst_features())
return -EFAULT;
power_domain_info = get_instance(core_power.socket_id, core_power.power_domain_id);
......
Markdown is supported
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