tools/power/x86/intel-speed-select/isst-config.c
Source file repositories/reference/linux-study-clean/tools/power/x86/intel-speed-select/isst-config.c
File Facts
- System
- Linux kernel
- Corpus path
tools/power/x86/intel-speed-select/isst-config.c- Extension
.c- Size
- 81377 bytes
- Lines
- 3387
- 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
ctype.hlinux/isst_if.hisst.h
Detected Declarations
struct process_cmd_structstruct _cpu_mapstruct cpu_topologystruct process_cmd_help_structfunction print_versionfunction check_privilegefunction is_debug_enabledfunction debug_printffunction is_clx_n_platformfunction is_skx_based_platformfunction is_spr_platformfunction is_emr_platformfunction is_icx_platformfunction is_dmr_plus_platformfunction update_cpu_modelfunction api_versionfunction parse_int_filefunction cpufreq_sysfs_presentfunction out_format_is_jsonfunction get_stored_topology_infofunction store_cpu_topologyfunction get_physical_package_idfunction get_physical_core_idfunction get_physical_die_idfunction get_physical_punit_idfunction set_isst_idfunction is_cpu_in_power_domainfunction get_cpufreq_base_freqfunction get_topo_max_cpusfunction is_cpu_onlinefunction set_cpu_online_offlinefunction force_all_cpus_onlinefunction for_each_online_power_domain_in_setfunction for_each_online_target_cpu_in_setfunction set_max_cpu_numfunction alloc_cpu_setfunction free_cpu_setfunction get_max_punit_core_idfunction get_cpu_countfunction update_punit_cpu_infofunction create_cpu_mapfunction set_cpu_mask_from_punit_coremaskfunction find_phy_core_numfunction use_cgroupv2function enable_cpuset_controllerfunction isolate_cpusfunction cpu_0_workaroundfunction isst_fill_platform_info
Annotated Snippet
struct process_cmd_struct {
char *feature;
char *command;
void (*process_fn)(int arg);
int arg;
};
static const char *version_str = "v1.26";
static const int supported_api_ver = 3;
static struct isst_if_platform_info isst_platform_info;
static char *progname;
static int debug_flag;
static FILE *outf;
static int cpu_model;
static int cpu_stepping;
static int cpu_family;
#define MAX_CPUS_IN_ONE_REQ 512
static short max_target_cpus;
static unsigned short target_cpus[MAX_CPUS_IN_ONE_REQ];
static int topo_max_cpus;
static size_t present_cpumask_size;
static cpu_set_t *present_cpumask;
static size_t target_cpumask_size;
static cpu_set_t *target_cpumask;
static int tdp_level = 0xFF;
static int fact_bucket = 0xFF;
static int fact_avx = 0xFF;
static unsigned long long fact_trl;
static int out_format_json;
static int cmd_help;
static int force_online_offline;
static int auto_mode;
static int fact_enable_fail;
static int cgroupv2;
static int max_pkg_id;
static int max_die_id;
static int max_die_id_package_0;
/* clos related */
static int current_clos = -1;
static int clos_epp = -1;
static int clos_prop_prio = -1;
static int clos_min = -1;
static int clos_max = -1;
static int clos_desired = -1;
static int clos_priority_type;
static int cpu_0_cgroupv2;
static int cpu_0_workaround(int isolate);
struct _cpu_map {
unsigned short core_id;
unsigned short pkg_id;
unsigned short die_id;
unsigned short punit_id;
unsigned short punit_cpu;
unsigned short punit_cpu_core;
unsigned short initialized;
};
struct _cpu_map *cpu_map;
struct cpu_topology {
short cpu;
short core_id;
short pkg_id;
short die_id;
};
static int read_only;
static void print_version(void)
{
fprintf(outf, "Version %s\n", version_str);
}
static void check_privilege(void)
{
if (!read_only)
return;
isst_display_error_info_message(1, "Insufficient privileges", 0, 0);
isst_ctdp_display_information_end(outf);
exit(1);
}
FILE *get_output_file(void)
{
Annotation
- Immediate include surface: `ctype.h`, `linux/isst_if.h`, `isst.h`.
- Detected declarations: `struct process_cmd_struct`, `struct _cpu_map`, `struct cpu_topology`, `struct process_cmd_help_struct`, `function print_version`, `function check_privilege`, `function is_debug_enabled`, `function debug_printf`, `function is_clx_n_platform`, `function is_skx_based_platform`.
- 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.