mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 15:41:36 +00:00
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:
parent
e157c8475e
commit
57ef2436a1
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user