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

1 // SPDX-License-Identifier: GPL-2.0-only
3 * (C) 2004-2009 Dominik Brodowski <linux@dominikbrodowski.de>
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()
135 " on CPU %d -- are you root?\n"), cpu); in get_boost_mode_x86()
165 printf(_(" Pstate-Pb%d: %luMHz (boost state)" in get_boost_mode_x86()
168 printf(_(" Pstate-P%d: %luMHz\n"), in get_boost_mode_x86()
169 i - b_states, pstates[i]); in get_boost_mode_x86()
182 dprint (" Ratio: 0x%llx - bclk: %f\n", in get_boost_mode_x86()
187 printf(_(" %.0f MHz max turbo 4 active cores\n"), in get_boost_mode_x86()
192 printf(_(" %.0f MHz max turbo 3 active cores\n"), in get_boost_mode_x86()
197 printf(_(" %.0f MHz max turbo 2 active cores\n"), in get_boost_mode_x86()
202 printf(_(" %.0f MHz max turbo 1 active cores\n"), in get_boost_mode_x86()
208 /* --boost / -b */
222 while (freqs->next) { in get_boost_mode()
223 print_speed(freqs->frequency, no_rounding); in get_boost_mode()
225 freqs = freqs->next; in get_boost_mode()
227 print_speed(freqs->frequency, no_rounding); in get_boost_mode()
235 /* --freq / -f */
239 unsigned long freq = cpufreq_get_freq_kernel(cpu); in get_freq_kernel() local
241 if (!freq) { in get_freq_kernel()
243 return -EINVAL; in get_freq_kernel()
246 print_speed(freq, no_rounding); in get_freq_kernel()
248 printf("%lu", freq); in get_freq_kernel()
254 /* --hwfreq / -w */
258 unsigned long freq = cpufreq_get_freq_hardware(cpu); in get_freq_hardware() local
260 if (!freq) { in get_freq_hardware()
262 return -EINVAL; in get_freq_hardware()
265 print_speed(freq, no_rounding); in get_freq_hardware()
267 printf("%lu", freq); in get_freq_hardware()
272 /* --hwlimits / -l */
276 unsigned long min, max; in get_hardware_limits() local
278 if (cpufreq_get_hardware_limits(cpu, &min, &max)) { in get_hardware_limits()
280 return -EINVAL; in get_hardware_limits()
286 printf(" - "); in get_hardware_limits()
287 print_speed(max, no_rounding); in get_hardware_limits()
290 printf("%lu %lu\n", min, max); in get_hardware_limits()
295 /* --driver / -d */
302 return -EINVAL; in get_driver()
309 /* --policy / -p */
316 return -EINVAL; in get_policy()
319 print_speed(policy->min, no_rounding); in get_policy()
321 print_speed(policy->max, no_rounding); in get_policy()
326 policy->governor); in get_policy()
331 /* --governors / -g */
341 return -EINVAL; in get_available_governors()
344 while (governors->next) { in get_available_governors()
345 printf("%s ", governors->governor); in get_available_governors()
346 governors = governors->next; in get_available_governors()
348 printf("%s\n", governors->governor); in get_available_governors()
354 /* --affected-cpus / -a */
363 return -EINVAL; in get_affected_cpus()
366 while (cpus->next) { in get_affected_cpus()
367 printf("%d ", cpus->cpu); in get_affected_cpus()
368 cpus = cpus->next; in get_affected_cpus()
370 printf("%d\n", cpus->cpu); in get_affected_cpus()
375 /* --related-cpus / -r */
384 return -EINVAL; in get_related_cpus()
387 while (cpus->next) { in get_related_cpus()
388 printf("%d ", cpus->cpu); in get_related_cpus()
389 cpus = cpus->next; in get_related_cpus()
391 printf("%d\n", cpus->cpu); in get_related_cpus()
396 /* --stats / -s */
405 print_speed(stats->frequency, no_rounding); in get_freq_stats()
407 (100.0 * stats->time_in_state) / total_time); in get_freq_stats()
410 stats->frequency, stats->time_in_state); in get_freq_stats()
411 stats = stats->next; in get_freq_stats()
421 /* --latency / -y */
430 return -EINVAL; in get_latency()
441 /* --performance / -c */
465 while (freqs->next) { in debug_output_one()
466 print_speed(freqs->frequency, no_rounding); in debug_output_one()
468 freqs = freqs->next; in debug_output_one()
470 print_speed(freqs->frequency, no_rounding); in debug_output_one()
486 {"freq", no_argument, NULL, 'f'},
492 {"related-cpus", no_argument, NULL, 'r'},
493 {"affected-cpus", no_argument, NULL, 'a'},
498 {"no-rounding", no_argument, NULL, 'n'},
520 case -1: in cmd_freq_info()
538 output_param = -1; in cmd_freq_info()
546 output_param = -1; in cmd_freq_info()
565 "combined with passing a --cpu argument\n")); in cmd_freq_info()
566 return -EINVAL; in cmd_freq_info()
580 case -1: in cmd_freq_info()
581 printf(_("You can't specify more than one --cpu parameter and/or\n" in cmd_freq_info()
582 "more than one output-specific argument\n")); in cmd_freq_info()
583 return -EINVAL; in cmd_freq_info()
586 return -EINVAL; in cmd_freq_info()