Lines Matching +full:min +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()
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()
219 /* --boost / -b */
235 while (freqs->next) { in get_boost_mode()
236 print_speed(freqs->frequency, no_rounding); in get_boost_mode()
238 freqs = freqs->next; in get_boost_mode()
240 print_speed(freqs->frequency, no_rounding); in get_boost_mode()
248 /* --freq / -f */
252 unsigned long freq = cpufreq_get_freq_kernel(cpu); in get_freq_kernel() local
254 if (!freq) { in get_freq_kernel()
256 return -EINVAL; in get_freq_kernel()
259 print_speed(freq, no_rounding); in get_freq_kernel()
261 printf("%lu", freq); in get_freq_kernel()
267 /* --hwfreq / -w */
271 unsigned long freq; in get_freq_hardware() local
274 return -EINVAL; in get_freq_hardware()
276 freq = cpufreq_get_freq_hardware(cpu); in get_freq_hardware()
278 if (!freq) { in get_freq_hardware()
280 return -EINVAL; in get_freq_hardware()
283 print_speed(freq, no_rounding); in get_freq_hardware()
285 printf("%lu", freq); in get_freq_hardware()
290 /* --hwlimits / -l */
294 unsigned long min, max; in get_hardware_limits() local
296 if (cpufreq_get_hardware_limits(cpu, &min, &max)) { in get_hardware_limits()
298 return -EINVAL; in get_hardware_limits()
303 print_speed(min, no_rounding); in get_hardware_limits()
304 printf(" - "); in get_hardware_limits()
308 printf("%lu %lu\n", min, max); in get_hardware_limits()
313 /* --driver / -d */
320 return -EINVAL; in get_driver()
327 /* --policy / -p */
334 return -EINVAL; in get_policy()
337 print_speed(policy->min, no_rounding); in get_policy()
339 print_speed(policy->max, no_rounding); in get_policy()
344 policy->governor); in get_policy()
349 /* --governors / -g */
359 return -EINVAL; in get_available_governors()
362 while (governors->next) { in get_available_governors()
363 printf("%s ", governors->governor); in get_available_governors()
364 governors = governors->next; in get_available_governors()
366 printf("%s\n", governors->governor); in get_available_governors()
372 /* --affected-cpus / -a */
381 return -EINVAL; in get_affected_cpus()
384 while (cpus->next) { in get_affected_cpus()
385 printf("%d ", cpus->cpu); in get_affected_cpus()
386 cpus = cpus->next; in get_affected_cpus()
388 printf("%d\n", cpus->cpu); in get_affected_cpus()
393 /* --related-cpus / -r */
402 return -EINVAL; in get_related_cpus()
405 while (cpus->next) { in get_related_cpus()
406 printf("%d ", cpus->cpu); in get_related_cpus()
407 cpus = cpus->next; in get_related_cpus()
409 printf("%d\n", cpus->cpu); in get_related_cpus()
414 /* --stats / -s */
423 print_speed(stats->frequency, no_rounding); in get_freq_stats()
425 (100.0 * stats->time_in_state) / total_time); in get_freq_stats()
428 stats->frequency, stats->time_in_state); in get_freq_stats()
429 stats = stats->next; in get_freq_stats()
439 /* --epp / -z */
447 return -EINVAL; in get_epp()
456 /* --latency / -y */
463 return -EINVAL; in get_latency()
468 return -EINVAL; in get_latency()
479 /* --performance / -c */
504 while (freqs->next) { in debug_output_one()
505 print_speed(freqs->frequency, no_rounding); in debug_output_one()
507 freqs = freqs->next; in debug_output_one()
509 print_speed(freqs->frequency, no_rounding); in debug_output_one()
525 {"freq", no_argument, NULL, 'f'},
531 {"related-cpus", no_argument, NULL, 'r'},
532 {"affected-cpus", no_argument, NULL, 'a'},
537 {"no-rounding", no_argument, NULL, 'n'},
560 case -1: in cmd_freq_info()
579 output_param = -1; in cmd_freq_info()
587 output_param = -1; in cmd_freq_info()
606 "combined with passing a --cpu argument\n")); in cmd_freq_info()
607 return -EINVAL; in cmd_freq_info()
621 case -1: in cmd_freq_info()
622 printf(_("You can't specify more than one --cpu parameter and/or\n" in cmd_freq_info()
623 "more than one output-specific argument\n")); in cmd_freq_info()
624 return -EINVAL; in cmd_freq_info()
627 return -EINVAL; in cmd_freq_info()