[PATCH 1/3] platform/x86: ISST: Use fuse enabled mask instead of allowed levels

Srinivas Pandruvada posted 3 patches 2 years, 4 months ago
There is a newer version of this series
[PATCH 1/3] platform/x86: ISST: Use fuse enabled mask instead of allowed levels
Posted by Srinivas Pandruvada 2 years, 4 months ago
Allowed level mask is a mask of levels, which are currently allowed
to dynamically switch. But even dynamic switching is not allowed,
user should be able to check all parameters for selection via BIOS.

So when passing the level mask for display to user space, use fuse
enabled mask, which has all levels.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
index 37f17e229419..48465636aadb 100644
--- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
+++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
@@ -712,7 +712,7 @@ static int isst_if_get_perf_level(void __user *argp)
 		return -EINVAL;
 
 	perf_level.max_level = power_domain_info->max_level;
-	perf_level.level_mask = power_domain_info->pp_header.allowed_level_mask;
+	perf_level.level_mask = power_domain_info->pp_header.level_en_mask;
 	perf_level.feature_rev = power_domain_info->pp_header.feature_rev;
 	_read_pp_info("current_level", perf_level.current_level, SST_PP_STATUS_OFFSET,
 		      SST_PP_LEVEL_START, SST_PP_LEVEL_WIDTH, SST_MUL_FACTOR_NONE)
-- 
2.41.0
Re: [PATCH 1/3] platform/x86: ISST: Use fuse enabled mask instead of allowed levels
Posted by Ilpo Järvinen 2 years, 4 months ago
On Mon, 25 Sep 2023, Srinivas Pandruvada wrote:

> Allowed level mask is a mask of levels, which are currently allowed
> to dynamically switch. But even dynamic switching is not allowed,

even if ?

> user should be able to check all parameters for selection via BIOS.

I think you're lacking a negation in the above paragraph because it sounds 
like there's an internal contradiction in it. Can you please take a look.

-- 
 i.


> So when passing the level mask for display to user space, use fuse
> enabled mask, which has all levels.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
>  drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> index 37f17e229419..48465636aadb 100644
> --- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> +++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> @@ -712,7 +712,7 @@ static int isst_if_get_perf_level(void __user *argp)
>  		return -EINVAL;
>  
>  	perf_level.max_level = power_domain_info->max_level;
> -	perf_level.level_mask = power_domain_info->pp_header.allowed_level_mask;
> +	perf_level.level_mask = power_domain_info->pp_header.level_en_mask;
>  	perf_level.feature_rev = power_domain_info->pp_header.feature_rev;
>  	_read_pp_info("current_level", perf_level.current_level, SST_PP_STATUS_OFFSET,
>  		      SST_PP_LEVEL_START, SST_PP_LEVEL_WIDTH, SST_MUL_FACTOR_NONE)
>
Re: [PATCH 1/3] platform/x86: ISST: Use fuse enabled mask instead of allowed levels
Posted by srinivas pandruvada 2 years, 4 months ago
On Fri, 2023-09-29 at 15:14 +0300, Ilpo Järvinen wrote:
> On Mon, 25 Sep 2023, Srinivas Pandruvada wrote:
> 
> > Allowed level mask is a mask of levels, which are currently allowed
> > to dynamically switch. But even dynamic switching is not allowed,
> 
> even if ?
OK

> 
> > user should be able to check all parameters for selection via BIOS.
> 
> I think you're lacking a negation in the above paragraph because it
> sounds 
> like there's an internal contradiction in it. Can you please take a
> look.

I can try to improve.

>