tools/power/x86/intel-speed-select/isst-core-tpmi.c
Source file repositories/reference/linux-study-clean/tools/power/x86/intel-speed-select/isst-core-tpmi.c
File Facts
- System
- Linux kernel
- Corpus path
tools/power/x86/intel-speed-select/isst-core-tpmi.c- Extension
.c- Size
- 21290 bytes
- Lines
- 875
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/isst_if.hisst.h
Detected Declarations
function Copyrightfunction tpmi_get_disp_freq_multiplierfunction tpmi_get_trl_max_levelsfunction tpmi_update_platform_paramfunction tpmi_read_pm_configfunction tpmi_get_config_levelsfunction tpmi_get_ctdp_controlfunction tpmi_get_tdp_infofunction tpmi_get_pwr_infofunction tpmi_get_coremask_infofunction tpmi_get_get_trlsfunction tpmi_get_get_trlfunction tpmi_get_trl_bucket_infofunction tpmi_set_tdp_levelfunction _pbf_get_coremask_infofunction tpmi_get_pbf_infofunction tpmi_set_pbf_fact_statusfunction tpmi_get_fact_infofunction _set_uncore_min_maxfunction tpmi_adjust_uncore_freqfunction tpmi_get_clos_informationfunction tpmi_pm_qos_configfunction tpmi_pm_get_closfunction tpmi_set_closfunction tpmi_clos_get_assoc_statusfunction tpmi_clos_associate
Annotated Snippet
switch (ioctl_no) {
case ISST_IF_CORE_POWER_STATE:
debug_printf("ISST_IF_CORE_POWER_STATE\n");
break;
case ISST_IF_CLOS_PARAM:
debug_printf("ISST_IF_CLOS_PARAM\n");
break;
case ISST_IF_CLOS_ASSOC:
debug_printf("ISST_IF_CLOS_ASSOC\n");
break;
case ISST_IF_PERF_LEVELS:
debug_printf("ISST_IF_PERF_LEVELS\n");
break;
case ISST_IF_PERF_SET_LEVEL:
debug_printf("ISST_IF_PERF_SET_LEVEL\n");
break;
case ISST_IF_PERF_SET_FEATURE:
debug_printf("ISST_IF_PERF_SET_FEATURE\n");
break;
case ISST_IF_GET_PERF_LEVEL_INFO:
debug_printf("ISST_IF_GET_PERF_LEVEL_INFO\n");
break;
case ISST_IF_GET_PERF_LEVEL_CPU_MASK:
debug_printf("ISST_IF_GET_PERF_LEVEL_CPU_MASK\n");
break;
case ISST_IF_GET_BASE_FREQ_INFO:
debug_printf("ISST_IF_GET_BASE_FREQ_INFO\n");
break;
case ISST_IF_GET_BASE_FREQ_CPU_MASK:
debug_printf("ISST_IF_GET_BASE_FREQ_CPU_MASK\n");
break;
case ISST_IF_GET_TURBO_FREQ_INFO:
debug_printf("ISST_IF_GET_TURBO_FREQ_INFO\n");
break;
case ISST_IF_COUNT_TPMI_INSTANCES:
debug_printf("ISST_IF_COUNT_TPMI_INSTANCES\n");
break;
default:
debug_printf("%d\n", ioctl_no);
break;
}
}
fd = open(pathname, O_RDWR);
if (fd < 0)
return -1;
if (ioctl(fd, ioctl_no, info) == -1) {
debug_printf("IOCTL %d Failed\n", ioctl_no);
close(fd);
return -1;
}
close(fd);
return 0;
}
static int tpmi_get_disp_freq_multiplier(void)
{
return 1;
}
static int tpmi_get_trl_max_levels(void)
{
return TRL_MAX_LEVELS;
}
static char *tpmi_get_trl_level_name(int level)
{
switch (level) {
case 0:
return "level-0";
case 1:
return "level-1";
case 2:
return "level-2";
case 3:
return "level-3";
case 4:
return "level-4";
case 5:
return "level-5";
case 6:
return "level-6";
case 7:
return "level-7";
default:
return NULL;
}
Annotation
- Immediate include surface: `linux/isst_if.h`, `isst.h`.
- Detected declarations: `function Copyright`, `function tpmi_get_disp_freq_multiplier`, `function tpmi_get_trl_max_levels`, `function tpmi_update_platform_param`, `function tpmi_read_pm_config`, `function tpmi_get_config_levels`, `function tpmi_get_ctdp_control`, `function tpmi_get_tdp_info`, `function tpmi_get_pwr_info`, `function tpmi_get_coremask_info`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.