Commit 57ef2436 authored by Zhang Rui's avatar Zhang Rui Committed by Srinivas Pandruvada

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: default avatarZhang Rui <rui.zhang@intel.com>
[srinivas.pandruvada@linux.intel.com: changelog edits]
Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
parent e157c847
......@@ -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;
......
......@@ -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,
......
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