tools/power/x86/intel-speed-select: Introduce isst_is_punit_valid()

Introduce isst_is_punit_valid() for checking a valid domain.

For current platforms, it requires a punit 0 in a valid Package/Die.

No functional changes are expected.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
[srinivas.pandruvada@linux.intel.com: changelog edits]
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
This commit is contained in:
Zhang Rui 2022-08-17 15:33:23 +08:00 committed by Srinivas Pandruvada
parent e157c8475e
commit 57ef2436a1
2 changed files with 12 additions and 0 deletions

View File

@ -25,6 +25,17 @@ char *isst_get_trl_level_name(int level)
}
}
int isst_is_punit_valid(struct isst_id *id)
{
if (id->cpu < 0)
return 0;
if (id->pkg < 0 || id->die < 0 || id->punit)
return 0;
return 1;
}
int isst_write_pm_config(struct isst_id *id, int cp_state)
{
unsigned int req, resp;

View File

@ -205,6 +205,7 @@ extern int isst_send_msr_command(unsigned int cpu, unsigned int command,
extern int isst_get_trl_max_levels(void);
extern char *isst_get_trl_level_name(int level);
extern int isst_is_punit_valid(struct isst_id *id);
extern int isst_get_ctdp_levels(struct isst_id *id, struct isst_pkg_ctdp *pkg_dev);
extern int isst_get_ctdp_control(struct isst_id *id, int config_index,