Lines Matching +full:8 +full:- +full:cpu

1 // SPDX-License-Identifier: GPL-2.0
14 /* ACPI P-States Helper Functions for AMD Processors ***************/
29 unsigned iddval:8;
36 unsigned fid:8;
38 unsigned vid:8;
39 unsigned iddval:8;
48 unsigned vid:8;
49 unsigned iddval:8;
101 * cpu -> the cpu that gets evaluated
102 * boost_states -> how much boost states the machines support
105 * pstates -> a pointer to an array of size MAX_HW_PSTATES
108 * no -> amount of pstates above array got filled up with
110 * returns zero on success, -1 on failure
112 int decode_pstates(unsigned int cpu, int boost_states, in decode_pstates() argument
123 return -1; in decode_pstates()
125 if (read_msr(cpu, MSR_AMD_PSTATE_LIMIT, &val)) in decode_pstates()
126 return -1; in decode_pstates()
134 return -1; in decode_pstates()
136 if (read_msr(cpu, MSR_AMD_PSTATE + i, &pstate.val)) in decode_pstates()
137 return -1; in decode_pstates()
160 return -ENODEV; in amd_pci_get_num_boost_states()
173 /* ACPI P-States Helper Functions for AMD Processors ***************/
175 /* AMD P-State Helper Functions ************************************/
193 static unsigned long amd_pstate_get_data(unsigned int cpu, in amd_pstate_get_data() argument
196 return cpufreq_get_sysfs_value_from_table(cpu, in amd_pstate_get_data()
202 void amd_pstate_boost_init(unsigned int cpu, int *support, int *active) in amd_pstate_boost_init() argument
207 highest_perf = amd_pstate_get_data(cpu, AMD_PSTATE_HIGHEST_PERF); in amd_pstate_boost_init()
208 nominal_perf = acpi_cppc_get_data(cpu, NOMINAL_PERF); in amd_pstate_boost_init()
214 cpufreq_get_hardware_limits(cpu, &cpuinfo_min, &cpuinfo_max); in amd_pstate_boost_init()
215 amd_pstate_max = amd_pstate_get_data(cpu, AMD_PSTATE_MAX_FREQ); in amd_pstate_boost_init()
220 void amd_pstate_show_perf_and_freq(unsigned int cpu, int no_rounding) in amd_pstate_show_perf_and_freq() argument
223 printf(_(" amd-pstate limits:\n")); in amd_pstate_show_perf_and_freq()
225 amd_pstate_get_data(cpu, AMD_PSTATE_HIGHEST_PERF)); in amd_pstate_show_perf_and_freq()
228 * frequency. So we read it back from amd-pstate sysfs entry. in amd_pstate_show_perf_and_freq()
230 print_speed(amd_pstate_get_data(cpu, AMD_PSTATE_MAX_FREQ), no_rounding); in amd_pstate_show_perf_and_freq()
234 acpi_cppc_get_data(cpu, NOMINAL_PERF)); in amd_pstate_show_perf_and_freq()
235 print_speed(acpi_cppc_get_data(cpu, NOMINAL_FREQ) * 1000, in amd_pstate_show_perf_and_freq()
239 printf(_(" Lowest Non-linear Performance: %lu. Lowest Non-linear Frequency: "), in amd_pstate_show_perf_and_freq()
240 acpi_cppc_get_data(cpu, LOWEST_NONLINEAR_PERF)); in amd_pstate_show_perf_and_freq()
241 print_speed(amd_pstate_get_data(cpu, AMD_PSTATE_LOWEST_NONLINEAR_FREQ), in amd_pstate_show_perf_and_freq()
246 acpi_cppc_get_data(cpu, LOWEST_PERF)); in amd_pstate_show_perf_and_freq()
247 print_speed(acpi_cppc_get_data(cpu, LOWEST_FREQ) * 1000, no_rounding); in amd_pstate_show_perf_and_freq()
251 amd_pstate_get_data(cpu, AMD_PSTATE_HW_PREFCORE), in amd_pstate_show_perf_and_freq()
252 amd_pstate_get_data(cpu, AMD_PSTATE_PREFCORE_RANKING)); in amd_pstate_show_perf_and_freq()
255 /* AMD P-State Helper Functions ************************************/