mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
platform/x86: ISST: Just allow 2 bits for SST feature enable
Currently only 2 features SST-TF and SST-BF are supported, so only allow
bit 0 and bit 1.
Fixes: ea009e4769 ("platform/x86: ISST: Add SST-PP support via TPMI")
Cc: stable@vger.kernel.org
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20260811221514.3905817-7-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>
This commit is contained in:
parent
9b9026943b
commit
0f377f2b47
|
|
@ -882,6 +882,7 @@ static long isst_if_clos_assoc(void __user *argp)
|
|||
|
||||
#define SST_PP_FEATURE_STATE_START 8
|
||||
#define SST_PP_FEATURE_STATE_WIDTH 8
|
||||
#define SST_PP_FEATURE_STATE_VALID_MASK GENMASK(1, 0)
|
||||
|
||||
#define SST_BF_FEATURE_SUPPORTED_START 12
|
||||
#define SST_BF_FEATURE_SUPPORTED_WIDTH 1
|
||||
|
|
@ -1035,6 +1036,9 @@ static int isst_if_set_perf_feature(void __user *argp)
|
|||
if (power_domain_info->write_blocked || !capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (perf_feature.feature & ~SST_PP_FEATURE_STATE_VALID_MASK)
|
||||
return -EINVAL;
|
||||
|
||||
_write_pp_info("perf_feature", perf_feature.feature, SST_PP_CONTROL_OFFSET,
|
||||
SST_PP_FEATURE_STATE_START, SST_PP_FEATURE_STATE_WIDTH,
|
||||
SST_MUL_FACTOR_NONE)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user