2019-06-30 10:14:08 -07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/*
|
|
|
|
* Intel Speed Select -- Enumerate and control features
|
|
|
|
* Copyright (c) 2019 Intel Corporation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ISST_H_
|
|
|
|
#define _ISST_H_
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sched.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/resource.h>
|
|
|
|
#include <getopt.h>
|
|
|
|
#include <err.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <limits.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <cpuid.h>
|
|
|
|
#include <dirent.h>
|
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
|
2022-08-20 18:11:21 +08:00
|
|
|
#include <linux/isst_if.h>
|
|
|
|
|
2019-06-30 10:14:08 -07:00
|
|
|
#define BIT(x) (1 << (x))
|
2020-05-19 16:28:34 -07:00
|
|
|
#define BIT_ULL(nr) (1ULL << (nr))
|
2019-06-30 10:14:08 -07:00
|
|
|
#define GENMASK(h, l) (((~0UL) << (l)) & (~0UL >> (sizeof(long) * 8 - 1 - (h))))
|
|
|
|
#define GENMASK_ULL(h, l) \
|
|
|
|
(((~0ULL) << (l)) & (~0ULL >> (sizeof(long long) * 8 - 1 - (h))))
|
|
|
|
|
|
|
|
#define CONFIG_TDP 0x7f
|
|
|
|
#define CONFIG_TDP_GET_LEVELS_INFO 0x00
|
|
|
|
#define CONFIG_TDP_GET_TDP_CONTROL 0x01
|
|
|
|
#define CONFIG_TDP_SET_TDP_CONTROL 0x02
|
|
|
|
#define CONFIG_TDP_GET_TDP_INFO 0x03
|
|
|
|
#define CONFIG_TDP_GET_PWR_INFO 0x04
|
|
|
|
#define CONFIG_TDP_GET_TJMAX_INFO 0x05
|
|
|
|
#define CONFIG_TDP_GET_CORE_MASK 0x06
|
|
|
|
#define CONFIG_TDP_GET_TURBO_LIMIT_RATIOS 0x07
|
|
|
|
#define CONFIG_TDP_SET_LEVEL 0x08
|
|
|
|
#define CONFIG_TDP_GET_UNCORE_P0_P1_INFO 0X09
|
|
|
|
#define CONFIG_TDP_GET_P1_INFO 0x0a
|
|
|
|
#define CONFIG_TDP_GET_MEM_FREQ 0x0b
|
2022-12-09 11:23:02 -08:00
|
|
|
#define CONFIG_TDP_GET_RATIO_INFO 0x0c
|
2019-06-30 10:14:08 -07:00
|
|
|
|
|
|
|
#define CONFIG_TDP_GET_FACT_HP_TURBO_LIMIT_NUMCORES 0x10
|
|
|
|
#define CONFIG_TDP_GET_FACT_HP_TURBO_LIMIT_RATIOS 0x11
|
|
|
|
#define CONFIG_TDP_GET_FACT_LP_CLIPPING_RATIO 0x12
|
|
|
|
|
|
|
|
#define CONFIG_TDP_PBF_GET_CORE_MASK_INFO 0x20
|
|
|
|
#define CONFIG_TDP_PBF_GET_P1HI_P1LO_INFO 0x21
|
|
|
|
#define CONFIG_TDP_PBF_GET_TJ_MAX_INFO 0x22
|
|
|
|
#define CONFIG_TDP_PBF_GET_TDP_INFO 0X23
|
|
|
|
|
|
|
|
#define CONFIG_CLOS 0xd0
|
|
|
|
#define CLOS_PQR_ASSOC 0x00
|
|
|
|
#define CLOS_PM_CLOS 0x01
|
|
|
|
#define CLOS_PM_QOS_CONFIG 0x02
|
|
|
|
#define CLOS_STATUS 0x03
|
|
|
|
|
|
|
|
#define MBOX_CMD_WRITE_BIT 0x08
|
|
|
|
|
|
|
|
#define PM_QOS_INFO_OFFSET 0x00
|
|
|
|
#define PM_QOS_CONFIG_OFFSET 0x04
|
|
|
|
#define PM_CLOS_OFFSET 0x08
|
|
|
|
#define PQR_ASSOC_OFFSET 0x20
|
|
|
|
|
2020-01-14 11:22:14 -08:00
|
|
|
#define READ_PM_CONFIG 0x94
|
|
|
|
#define WRITE_PM_CONFIG 0x95
|
|
|
|
#define PM_FEATURE 0x03
|
|
|
|
|
tools/power/x86/intel-speed-select: Implement 'perf-profile info' on CascadeLake-N
Add functionality for "perf-profile info" on CascadeLake-N.
Sample output:
intel-speed-select perf-profile info
Intel(R) Speed Select Technology
Executing on CPU model:85[0x55]
package-0
die-0
cpu-0
perf-profile-level-0
cpu-count:20
enable-cpu-mask:00000000,000fffff
enable-cpu-list:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
thermal-design-power-ratio:23
base-frequency(MHz):2300
speed-select-turbo-freq:unsupported
speed-select-base-freq:enabled
speed-select-base-freq
high-priority-base-frequency(MHz):2700000
high-priority-cpu-mask:00000000,0000e8c0
high-priority-cpu-list:6,7,11,13,14,15
low-priority-base-frequency(MHz):2100000
package-1
die-0
cpu-20
perf-profile-level-0
cpu-count:20
enable-cpu-mask:000000ff,fff00000
enable-cpu-list:20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39
thermal-design-power-ratio:23
base-frequency(MHz):2300
speed-select-turbo-freq:unsupported
speed-select-base-freq:enabled
speed-select-base-freq
high-priority-base-frequency(MHz):2700000
high-priority-cpu-mask:0000000e,8c000000
high-priority-cpu-list:26,27,31,33,34,35
low-priority-base-frequency(MHz):2100000
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2019-10-10 13:29:44 -07:00
|
|
|
#define DISP_FREQ_MULTIPLIER 100
|
|
|
|
|
2023-07-20 11:08:03 -05:00
|
|
|
#define MAX_PACKAGE_COUNT 32
|
2024-03-07 15:45:54 -08:00
|
|
|
#define MAX_DIE_PER_PACKAGE 16
|
2022-08-17 14:51:40 +08:00
|
|
|
#define MAX_PUNIT_PER_DIE 8
|
2022-01-18 15:02:57 -08:00
|
|
|
|
2022-08-20 23:58:18 +08:00
|
|
|
/* Unified structure to specific a CPU or a Power Domain */
|
|
|
|
struct isst_id {
|
|
|
|
int cpu;
|
2022-08-20 23:58:19 +08:00
|
|
|
int pkg;
|
|
|
|
int die;
|
2022-08-17 14:51:40 +08:00
|
|
|
int punit;
|
2022-08-20 23:58:18 +08:00
|
|
|
};
|
|
|
|
|
2019-06-30 10:14:08 -07:00
|
|
|
struct isst_clos_config {
|
2022-08-16 21:20:00 +08:00
|
|
|
unsigned int clos_min;
|
|
|
|
unsigned int clos_max;
|
2019-06-30 10:14:08 -07:00
|
|
|
unsigned char epp;
|
|
|
|
unsigned char clos_prop_prio;
|
|
|
|
unsigned char clos_desired;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct isst_fact_bucket_info {
|
2022-08-20 18:33:01 +08:00
|
|
|
int hp_cores;
|
|
|
|
int hp_ratios[TRL_MAX_LEVELS];
|
2019-06-30 10:14:08 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct isst_pbf_info {
|
|
|
|
int pbf_acticated;
|
|
|
|
int pbf_available;
|
|
|
|
size_t core_cpumask_size;
|
|
|
|
cpu_set_t *core_cpumask;
|
|
|
|
int p1_high;
|
|
|
|
int p1_low;
|
|
|
|
int t_control;
|
|
|
|
int t_prochot;
|
|
|
|
int tdp;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define ISST_TRL_MAX_ACTIVE_CORES 8
|
|
|
|
#define ISST_FACT_MAX_BUCKETS 8
|
|
|
|
struct isst_fact_info {
|
2022-08-20 18:33:01 +08:00
|
|
|
int lp_ratios[TRL_MAX_LEVELS];
|
2019-06-30 10:14:08 -07:00
|
|
|
struct isst_fact_bucket_info bucket_info[ISST_FACT_MAX_BUCKETS];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct isst_pkg_ctdp_level_info {
|
|
|
|
int processed;
|
|
|
|
int control_cpu;
|
|
|
|
int pkg_id;
|
|
|
|
int die_id;
|
|
|
|
int level;
|
|
|
|
int fact_support;
|
|
|
|
int pbf_support;
|
|
|
|
int fact_enabled;
|
|
|
|
int pbf_enabled;
|
2020-01-14 11:22:14 -08:00
|
|
|
int sst_cp_support;
|
|
|
|
int sst_cp_enabled;
|
2019-06-30 10:14:08 -07:00
|
|
|
int tdp_ratio;
|
|
|
|
int active;
|
|
|
|
int tdp_control;
|
|
|
|
int pkg_tdp;
|
|
|
|
int pkg_min_power;
|
|
|
|
int pkg_max_power;
|
|
|
|
int fact;
|
|
|
|
int t_proc_hot;
|
2022-08-09 00:01:00 +08:00
|
|
|
int cooling_type;
|
2019-06-30 10:14:08 -07:00
|
|
|
int uncore_p0;
|
|
|
|
int uncore_p1;
|
2022-12-09 11:23:02 -08:00
|
|
|
int uncore_pm;
|
2019-06-30 10:14:08 -07:00
|
|
|
int sse_p1;
|
|
|
|
int avx2_p1;
|
|
|
|
int avx512_p1;
|
2022-08-09 00:01:00 +08:00
|
|
|
int amx_p1;
|
2019-06-30 10:14:08 -07:00
|
|
|
int mem_freq;
|
|
|
|
size_t core_cpumask_size;
|
|
|
|
cpu_set_t *core_cpumask;
|
|
|
|
int cpu_count;
|
2022-08-20 18:11:21 +08:00
|
|
|
unsigned long long trl_cores; /* Buckets info */
|
|
|
|
int trl_ratios[TRL_MAX_LEVELS][ISST_TRL_MAX_ACTIVE_CORES];
|
2019-06-30 10:14:08 -07:00
|
|
|
int kobj_bucket_index;
|
|
|
|
int active_bucket;
|
|
|
|
int fact_max_index;
|
|
|
|
int fact_max_config;
|
|
|
|
int pbf_found;
|
|
|
|
int pbf_active;
|
|
|
|
struct isst_pbf_info pbf_info;
|
|
|
|
struct isst_fact_info fact_info;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define ISST_MAX_TDP_LEVELS (4 + 1) /* +1 for base config */
|
|
|
|
struct isst_pkg_ctdp {
|
|
|
|
int locked;
|
|
|
|
int version;
|
|
|
|
int processed;
|
|
|
|
int levels;
|
|
|
|
int current_level;
|
|
|
|
int enabled;
|
|
|
|
struct isst_pkg_ctdp_level_info ctdp_level[ISST_MAX_TDP_LEVELS];
|
|
|
|
};
|
|
|
|
|
2022-08-20 18:38:11 +08:00
|
|
|
enum isst_platform_param {
|
|
|
|
ISST_PARAM_MBOX_DELAY,
|
|
|
|
ISST_PARAM_MBOX_RETRIES,
|
|
|
|
};
|
|
|
|
|
2022-08-20 18:59:54 +08:00
|
|
|
struct isst_platform_ops {
|
|
|
|
int (*get_disp_freq_multiplier)(void);
|
|
|
|
int (*get_trl_max_levels)(void);
|
|
|
|
char *(*get_trl_level_name)(int level);
|
2022-08-20 20:40:48 +08:00
|
|
|
void (*update_platform_param)(enum isst_platform_param param, int value);
|
2022-08-20 19:39:52 +08:00
|
|
|
int (*is_punit_valid)(struct isst_id *id);
|
2022-08-08 23:19:55 +08:00
|
|
|
int (*read_pm_config)(struct isst_id *id, int *cp_state, int *cp_cap);
|
2022-08-08 20:23:26 +08:00
|
|
|
int (*get_config_levels)(struct isst_id *id, struct isst_pkg_ctdp *pkg_ctdp);
|
2022-08-08 20:28:06 +08:00
|
|
|
int (*get_ctdp_control)(struct isst_id *id, int config_index, struct isst_pkg_ctdp_level_info *ctdp_level);
|
2022-08-08 20:31:38 +08:00
|
|
|
int (*get_tdp_info)(struct isst_id *id, int config_index, struct isst_pkg_ctdp_level_info *ctdp_level);
|
2022-08-08 20:34:45 +08:00
|
|
|
int (*get_pwr_info)(struct isst_id *id, int config_index, struct isst_pkg_ctdp_level_info *ctdp_level);
|
2022-08-09 00:34:34 +08:00
|
|
|
int (*get_coremask_info)(struct isst_id *id, int config_index, struct isst_pkg_ctdp_level_info *ctdp_level);
|
2022-08-17 23:19:15 +08:00
|
|
|
int (*get_get_trl)(struct isst_id *id, int level, int avx_level, int *trl);
|
2022-08-09 01:52:11 +08:00
|
|
|
int (*get_get_trls)(struct isst_id *id, int level, struct isst_pkg_ctdp_level_info *ctdp_level);
|
2022-08-08 21:01:08 +08:00
|
|
|
int (*get_trl_bucket_info)(struct isst_id *id, int level, unsigned long long *buckets_info);
|
2022-08-09 01:49:48 +08:00
|
|
|
int (*set_tdp_level)(struct isst_id *id, int tdp_level);
|
2022-08-08 21:13:59 +08:00
|
|
|
int (*get_pbf_info)(struct isst_id *id, int level, struct isst_pbf_info *pbf_info);
|
2022-08-08 21:44:04 +08:00
|
|
|
int (*set_pbf_fact_status)(struct isst_id *id, int pbf, int enable);
|
2022-08-08 21:52:17 +08:00
|
|
|
int (*get_fact_info)(struct isst_id *id, int level, int fact_bucket, struct isst_fact_info *fact_info);
|
2023-02-02 15:52:42 +08:00
|
|
|
void (*adjust_uncore_freq)(struct isst_id *id, int config_index, struct isst_pkg_ctdp_level_info *ctdp_level);
|
2022-08-08 22:42:47 +08:00
|
|
|
int (*get_clos_information)(struct isst_id *id, int *enable, int *type);
|
2022-08-08 22:46:57 +08:00
|
|
|
int (*pm_qos_config)(struct isst_id *id, int enable_clos, int priority_type);
|
2022-08-08 22:50:28 +08:00
|
|
|
int (*pm_get_clos)(struct isst_id *id, int clos, struct isst_clos_config *clos_config);
|
2022-08-08 22:53:48 +08:00
|
|
|
int (*set_clos)(struct isst_id *id, int clos, struct isst_clos_config *clos_config);
|
2022-08-08 22:55:51 +08:00
|
|
|
int (*clos_get_assoc_status)(struct isst_id *id, int *clos_id);
|
2022-08-08 22:57:55 +08:00
|
|
|
int (*clos_associate)(struct isst_id *id, int clos_id);
|
2022-08-20 18:59:54 +08:00
|
|
|
};
|
|
|
|
|
2022-08-20 23:58:22 +08:00
|
|
|
extern int is_cpu_in_power_domain(int cpu, struct isst_id *id);
|
2019-06-30 10:14:08 -07:00
|
|
|
extern int get_topo_max_cpus(void);
|
2022-08-20 23:58:20 +08:00
|
|
|
extern int get_cpu_count(struct isst_id *id);
|
|
|
|
extern int get_max_punit_core_id(struct isst_id *id);
|
2022-08-20 20:51:33 +08:00
|
|
|
extern int api_version(void);
|
2019-06-30 10:14:08 -07:00
|
|
|
|
|
|
|
/* Common interfaces */
|
2020-03-05 14:45:22 -08:00
|
|
|
FILE *get_output_file(void);
|
2022-08-09 01:56:04 +08:00
|
|
|
extern int is_debug_enabled(void);
|
2019-06-30 10:14:08 -07:00
|
|
|
extern void debug_printf(const char *format, ...);
|
|
|
|
extern int out_format_is_json(void);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern void set_isst_id(struct isst_id *id, int cpu);
|
2019-06-30 10:14:08 -07:00
|
|
|
extern size_t alloc_cpu_set(cpu_set_t **cpu_set);
|
|
|
|
extern void free_cpu_set(cpu_set_t *cpu_set);
|
|
|
|
extern int find_phy_core_num(int logical_cpu);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern void set_cpu_mask_from_punit_coremask(struct isst_id *id,
|
2019-06-30 10:14:08 -07:00
|
|
|
unsigned long long core_mask,
|
|
|
|
size_t core_cpumask_size,
|
|
|
|
cpu_set_t *core_cpumask,
|
|
|
|
int *cpu_cnt);
|
|
|
|
extern int isst_send_msr_command(unsigned int cpu, unsigned int command,
|
|
|
|
int write, unsigned long long *req_resp);
|
|
|
|
|
2022-08-20 20:40:48 +08:00
|
|
|
extern int isst_set_platform_ops(int api_version);
|
2022-08-20 18:38:11 +08:00
|
|
|
extern void isst_update_platform_param(enum isst_platform_param, int vale);
|
2022-08-20 18:44:59 +08:00
|
|
|
extern int isst_get_disp_freq_multiplier(void);
|
2022-08-20 18:11:21 +08:00
|
|
|
extern int isst_get_trl_max_levels(void);
|
|
|
|
extern char *isst_get_trl_level_name(int level);
|
2022-08-17 15:33:23 +08:00
|
|
|
extern int isst_is_punit_valid(struct isst_id *id);
|
2022-08-20 18:11:21 +08:00
|
|
|
|
2022-08-20 23:58:18 +08:00
|
|
|
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,
|
2020-03-05 14:45:21 -08:00
|
|
|
struct isst_pkg_ctdp_level_info *ctdp_level);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern int isst_get_coremask_info(struct isst_id *id, int config_index,
|
2019-09-14 12:45:44 -07:00
|
|
|
struct isst_pkg_ctdp_level_info *ctdp_level);
|
2023-02-02 15:52:42 +08:00
|
|
|
extern void isst_adjust_uncore_freq(struct isst_id *id, int config_index,
|
2022-12-09 11:23:02 -08:00
|
|
|
struct isst_pkg_ctdp_level_info *ctdp_level);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern int isst_get_process_ctdp(struct isst_id *id, int tdp_level,
|
2019-06-30 10:14:08 -07:00
|
|
|
struct isst_pkg_ctdp *pkg_dev);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern void isst_get_process_ctdp_complete(struct isst_id *id,
|
2019-06-30 10:14:08 -07:00
|
|
|
struct isst_pkg_ctdp *pkg_dev);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern void isst_ctdp_display_information(struct isst_id *id, FILE *outf, int tdp_level,
|
2019-06-30 10:14:08 -07:00
|
|
|
struct isst_pkg_ctdp *pkg_dev);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern void isst_ctdp_display_core_info(struct isst_id *id, FILE *outf, char *prefix,
|
2020-03-05 14:45:27 -08:00
|
|
|
unsigned int val, char *str0, char *str1);
|
2019-06-30 10:14:08 -07:00
|
|
|
extern void isst_ctdp_display_information_start(FILE *outf);
|
|
|
|
extern void isst_ctdp_display_information_end(FILE *outf);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern void isst_pbf_display_information(struct isst_id *id, FILE *outf, int level,
|
2019-06-30 10:14:08 -07:00
|
|
|
struct isst_pbf_info *info);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern int isst_set_tdp_level(struct isst_id *id, int tdp_level);
|
|
|
|
extern int isst_set_pbf_fact_status(struct isst_id *id, int pbf, int enable);
|
|
|
|
extern int isst_get_pbf_info(struct isst_id *id, int level,
|
2019-06-30 10:14:08 -07:00
|
|
|
struct isst_pbf_info *pbf_info);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern int isst_get_fact_info(struct isst_id *id, int level, int fact_bucket,
|
2019-06-30 10:14:08 -07:00
|
|
|
struct isst_fact_info *fact_info);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern void isst_fact_display_information(struct isst_id *id, FILE *outf, int level,
|
2019-06-30 10:14:08 -07:00
|
|
|
int fact_bucket, int fact_avx,
|
|
|
|
struct isst_fact_info *fact_info);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern int isst_set_trl(struct isst_id *id, unsigned long long trl);
|
|
|
|
extern int isst_get_trl(struct isst_id *id, unsigned long long *trl);
|
|
|
|
extern int isst_set_trl_from_current_tdp(struct isst_id *id, unsigned long long trl);
|
|
|
|
extern int isst_get_config_tdp_lock_status(struct isst_id *id);
|
2019-06-30 10:14:08 -07:00
|
|
|
|
2022-08-20 23:58:18 +08:00
|
|
|
extern int isst_pm_qos_config(struct isst_id *id, int enable_clos, int priority_type);
|
|
|
|
extern int isst_pm_get_clos(struct isst_id *id, int clos,
|
2019-06-30 10:14:08 -07:00
|
|
|
struct isst_clos_config *clos_config);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern int isst_set_clos(struct isst_id *id, int clos,
|
2019-06-30 10:14:08 -07:00
|
|
|
struct isst_clos_config *clos_config);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern int isst_clos_associate(struct isst_id *id, int clos);
|
|
|
|
extern int isst_clos_get_assoc_status(struct isst_id *id, int *clos_id);
|
|
|
|
extern void isst_clos_display_information(struct isst_id *id, FILE *outf, int clos,
|
2019-06-30 10:14:08 -07:00
|
|
|
struct isst_clos_config *clos_config);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern void isst_clos_display_assoc_information(struct isst_id *id, FILE *outf, int clos);
|
2019-06-30 10:14:08 -07:00
|
|
|
|
2022-08-20 23:58:18 +08:00
|
|
|
extern void isst_display_result(struct isst_id *id, FILE *outf, char *feature, char *cmd,
|
2019-06-30 10:14:08 -07:00
|
|
|
int result);
|
2019-09-14 12:45:47 -07:00
|
|
|
|
2022-08-20 23:58:18 +08:00
|
|
|
extern int isst_clos_get_clos_information(struct isst_id *id, int *enable, int *type);
|
|
|
|
extern void isst_clos_display_clos_information(struct isst_id *id, FILE *outf,
|
2020-03-05 14:45:14 -08:00
|
|
|
int clos_enable, int type,
|
|
|
|
int state, int cap);
|
tools/power/x86/intel-speed-select: Implement 'perf-profile info' on CascadeLake-N
Add functionality for "perf-profile info" on CascadeLake-N.
Sample output:
intel-speed-select perf-profile info
Intel(R) Speed Select Technology
Executing on CPU model:85[0x55]
package-0
die-0
cpu-0
perf-profile-level-0
cpu-count:20
enable-cpu-mask:00000000,000fffff
enable-cpu-list:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
thermal-design-power-ratio:23
base-frequency(MHz):2300
speed-select-turbo-freq:unsupported
speed-select-base-freq:enabled
speed-select-base-freq
high-priority-base-frequency(MHz):2700000
high-priority-cpu-mask:00000000,0000e8c0
high-priority-cpu-list:6,7,11,13,14,15
low-priority-base-frequency(MHz):2100000
package-1
die-0
cpu-20
perf-profile-level-0
cpu-count:20
enable-cpu-mask:000000ff,fff00000
enable-cpu-list:20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39
thermal-design-power-ratio:23
base-frequency(MHz):2300
speed-select-turbo-freq:unsupported
speed-select-base-freq:enabled
speed-select-base-freq
high-priority-base-frequency(MHz):2700000
high-priority-cpu-mask:0000000e,8c000000
high-priority-cpu-list:26,27,31,33,34,35
low-priority-base-frequency(MHz):2100000
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2019-10-10 13:29:44 -07:00
|
|
|
extern int is_clx_n_platform(void);
|
2019-11-04 03:02:44 -08:00
|
|
|
extern int get_cpufreq_base_freq(int cpu);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern int isst_read_pm_config(struct isst_id *id, int *cp_state, int *cp_cap);
|
2020-03-05 14:45:22 -08:00
|
|
|
extern void isst_display_error_info_message(int error, char *msg, int arg_valid, int arg);
|
2020-11-23 16:56:05 -08:00
|
|
|
extern int is_skx_based_platform(void);
|
2021-05-12 03:17:32 -07:00
|
|
|
extern int is_spr_platform(void);
|
2023-02-22 22:53:02 -08:00
|
|
|
extern int is_emr_platform(void);
|
2021-05-12 03:17:32 -07:00
|
|
|
extern int is_icx_platform(void);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern void isst_trl_display_information(struct isst_id *id, FILE *outf, unsigned long long trl);
|
2022-01-18 15:02:57 -08:00
|
|
|
|
|
|
|
extern void set_cpu_online_offline(int cpu, int state);
|
2022-08-17 15:50:43 +08:00
|
|
|
extern void for_each_online_power_domain_in_set(void (*callback)(struct isst_id *, void *, void *,
|
2022-01-18 15:02:57 -08:00
|
|
|
void *, void *),
|
|
|
|
void *arg1, void *arg2, void *arg3,
|
|
|
|
void *arg4);
|
|
|
|
extern int isst_daemon(int debug_mode, int poll_interval, int no_daemon);
|
2022-08-20 23:58:18 +08:00
|
|
|
extern void process_level_change(struct isst_id *id);
|
2022-01-18 16:44:20 -08:00
|
|
|
extern int hfi_main(void);
|
|
|
|
extern void hfi_exit(void);
|
2022-08-20 18:59:54 +08:00
|
|
|
|
|
|
|
/* Interface specific callbacks */
|
|
|
|
extern struct isst_platform_ops *mbox_get_platform_ops(void);
|
2022-08-09 00:01:00 +08:00
|
|
|
extern struct isst_platform_ops *tpmi_get_platform_ops(void);
|
2022-08-20 18:59:54 +08:00
|
|
|
|
2023-02-22 03:42:19 -08:00
|
|
|
/* Cgroup related interface */
|
|
|
|
extern int enable_cpuset_controller(void);
|
2023-10-03 14:46:30 -07:00
|
|
|
extern int isolate_cpus(struct isst_id *id, int mask_size, cpu_set_t *cpu_mask,
|
|
|
|
int level, int cpu_0_only);
|
2023-02-22 03:42:19 -08:00
|
|
|
extern int use_cgroupv2(void);
|
|
|
|
|
2019-06-30 10:14:08 -07:00
|
|
|
#endif
|