Lines Matching +full:max +full:- +full:freq

1 // SPDX-License-Identifier: GPL-2.0-only
3 * (C) 2004-2009 Dominik Brodowski <[email protected]>
39 value[LINE_LEN - 1] = '\0'; in count_cpus()
40 if (strlen(value) < (LINE_LEN - 2)) in count_cpus()
62 unsigned long min, max; in proc_cpufreq_output() local
64 printf(_(" minimum CPU frequency - maximum CPU frequency - governor\n")); in proc_cpufreq_output()
72 if (cpufreq_get_hardware_limits(cpu, &min, &max)) { in proc_cpufreq_output()
73 max = 0; in proc_cpufreq_output()
75 min_pctg = (policy->min * 100) / max; in proc_cpufreq_output()
76 max_pctg = (policy->max * 100) / max; in proc_cpufreq_output()
78 printf("CPU%3d %9lu kHz (%3d %%) - %9lu kHz (%3d %%) - %s\n", in proc_cpufreq_output()
79 cpu , policy->min, max ? min_pctg : 0, policy->max, in proc_cpufreq_output()
80 max ? max_pctg : 0, policy->governor); in proc_cpufreq_output()
134 " on CPU %d -- are you root?\n"), cpu); in get_boost_mode_x86()
164 printf(_(" Pstate-Pb%d: %luMHz (boost state)" in get_boost_mode_x86()
167 printf(_(" Pstate-P%d: %luMHz\n"), in get_boost_mode_x86()
168 i - b_states, pstates[i]); in get_boost_mode_x86()
181 dprint (" Ratio: 0x%llx - bclk: %f\n", in get_boost_mode_x86()
186 printf(_(" %.0f MHz max turbo 4 active cores\n"), in get_boost_mode_x86()
191 printf(_(" %.0f MHz max turbo 3 active cores\n"), in get_boost_mode_x86()
196 printf(_(" %.0f MHz max turbo 2 active cores\n"), in get_boost_mode_x86()
201 printf(_(" %.0f MHz max turbo 1 active cores\n"), in get_boost_mode_x86()
207 /* --boost / -b */
221 while (freqs->next) { in get_boost_mode()
222 print_speed(freqs->frequency, no_rounding); in get_boost_mode()
224 freqs = freqs->next; in get_boost_mode()
226 print_speed(freqs->frequency, no_rounding); in get_boost_mode()
234 /* --freq / -f */
238 unsigned long freq = cpufreq_get_freq_kernel(cpu); in get_freq_kernel() local
240 if (!freq) { in get_freq_kernel()
242 return -EINVAL; in get_freq_kernel()
245 print_speed(freq, no_rounding); in get_freq_kernel()
247 printf("%lu", freq); in get_freq_kernel()
253 /* --hwfreq / -w */
257 unsigned long freq; in get_freq_hardware() local
260 return -EINVAL; in get_freq_hardware()
262 freq = cpufreq_get_freq_hardware(cpu); in get_freq_hardware()
264 if (!freq) { in get_freq_hardware()
266 return -EINVAL; in get_freq_hardware()
269 print_speed(freq, no_rounding); in get_freq_hardware()
271 printf("%lu", freq); in get_freq_hardware()
276 /* --hwlimits / -l */
280 unsigned long min, max; in get_hardware_limits() local
282 if (cpufreq_get_hardware_limits(cpu, &min, &max)) { in get_hardware_limits()
284 return -EINVAL; in get_hardware_limits()
290 printf(" - "); in get_hardware_limits()
291 print_speed(max, no_rounding); in get_hardware_limits()
294 printf("%lu %lu\n", min, max); in get_hardware_limits()
299 /* --driver / -d */
306 return -EINVAL; in get_driver()
313 /* --policy / -p */
320 return -EINVAL; in get_policy()
323 print_speed(policy->min, no_rounding); in get_policy()
325 print_speed(policy->max, no_rounding); in get_policy()
330 policy->governor); in get_policy()
335 /* --governors / -g */
345 return -EINVAL; in get_available_governors()
348 while (governors->next) { in get_available_governors()
349 printf("%s ", governors->governor); in get_available_governors()
350 governors = governors->next; in get_available_governors()
352 printf("%s\n", governors->governor); in get_available_governors()
358 /* --affected-cpus / -a */
367 return -EINVAL; in get_affected_cpus()
370 while (cpus->next) { in get_affected_cpus()
371 printf("%d ", cpus->cpu); in get_affected_cpus()
372 cpus = cpus->next; in get_affected_cpus()
374 printf("%d\n", cpus->cpu); in get_affected_cpus()
379 /* --related-cpus / -r */
388 return -EINVAL; in get_related_cpus()
391 while (cpus->next) { in get_related_cpus()
392 printf("%d ", cpus->cpu); in get_related_cpus()
393 cpus = cpus->next; in get_related_cpus()
395 printf("%d\n", cpus->cpu); in get_related_cpus()
400 /* --stats / -s */
409 print_speed(stats->frequency, no_rounding); in get_freq_stats()
411 (100.0 * stats->time_in_state) / total_time); in get_freq_stats()
414 stats->frequency, stats->time_in_state); in get_freq_stats()
415 stats = stats->next; in get_freq_stats()
425 /* --epp / -z */
433 return -EINVAL; in get_epp()
442 /* --latency / -y */
449 return -EINVAL; in get_latency()
454 return -EINVAL; in get_latency()
465 /* --performance / -c */
490 while (freqs->next) { in debug_output_one()
491 print_speed(freqs->frequency, no_rounding); in debug_output_one()
493 freqs = freqs->next; in debug_output_one()
495 print_speed(freqs->frequency, no_rounding); in debug_output_one()
511 {"freq", no_argument, NULL, 'f'},
517 {"related-cpus", no_argument, NULL, 'r'},
518 {"affected-cpus", no_argument, NULL, 'a'},
523 {"no-rounding", no_argument, NULL, 'n'},
546 case -1: in cmd_freq_info()
565 output_param = -1; in cmd_freq_info()
573 output_param = -1; in cmd_freq_info()
592 "combined with passing a --cpu argument\n")); in cmd_freq_info()
593 return -EINVAL; in cmd_freq_info()
607 case -1: in cmd_freq_info()
608 printf(_("You can't specify more than one --cpu parameter and/or\n" in cmd_freq_info()
609 "more than one output-specific argument\n")); in cmd_freq_info()
610 return -EINVAL; in cmd_freq_info()
613 return -EINVAL; in cmd_freq_info()