Lines Matching +full:max +full:- +full:speed
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()
87 static void print_speed(unsigned long speed) in print_speed() argument
92 if (speed > 1000000) in print_speed()
93 printf("%u.%06u GHz", ((unsigned int) speed/1000000), in print_speed()
94 ((unsigned int) speed%1000000)); in print_speed()
95 else if (speed > 1000) in print_speed()
96 printf("%u.%03u MHz", ((unsigned int) speed/1000), in print_speed()
97 (unsigned int) (speed%1000)); in print_speed()
99 printf("%lu kHz", speed); in print_speed()
101 if (speed > 1000000) { in print_speed()
102 tmp = speed%10000; in print_speed()
104 speed += 10000; in print_speed()
105 printf("%u.%02u GHz", ((unsigned int) speed/1000000), in print_speed()
106 ((unsigned int) (speed%1000000)/10000)); in print_speed()
107 } else if (speed > 100000) { in print_speed()
108 tmp = speed%1000; in print_speed()
110 speed += 1000; in print_speed()
111 printf("%u MHz", ((unsigned int) speed/1000)); in print_speed()
112 } else if (speed > 1000) { in print_speed()
113 tmp = speed%100; in print_speed()
115 speed += 100; in print_speed()
116 printf("%u.%01u MHz", ((unsigned int) speed/1000), in print_speed()
117 ((unsigned int) (speed%1000)/100)); in print_speed()
172 " on CPU %d -- are you root?\n"), cpu); in get_boost_mode_x86()
200 printf(_(" Pstate-Pb%d: %luMHz (boost state)" in get_boost_mode_x86()
203 printf(_(" Pstate-P%d: %luMHz\n"), in get_boost_mode_x86()
204 i - b_states, pstates[i]); in get_boost_mode_x86()
217 dprint (" Ratio: 0x%llx - bclk: %f\n", in get_boost_mode_x86()
222 printf(_(" %.0f MHz max turbo 4 active cores\n"), in get_boost_mode_x86()
227 printf(_(" %.0f MHz max turbo 3 active cores\n"), in get_boost_mode_x86()
232 printf(_(" %.0f MHz max turbo 2 active cores\n"), in get_boost_mode_x86()
237 printf(_(" %.0f MHz max turbo 1 active cores\n"), in get_boost_mode_x86()
243 /* --boost / -b */
257 while (freqs->next) { in get_boost_mode()
258 print_speed(freqs->frequency); in get_boost_mode()
260 freqs = freqs->next; in get_boost_mode()
262 print_speed(freqs->frequency); in get_boost_mode()
270 /* --freq / -f */
278 return -EINVAL; in get_freq_kernel()
289 /* --hwfreq / -w */
297 return -EINVAL; in get_freq_hardware()
307 /* --hwlimits / -l */
311 unsigned long min, max; in get_hardware_limits() local
313 if (cpufreq_get_hardware_limits(cpu, &min, &max)) { in get_hardware_limits()
315 return -EINVAL; in get_hardware_limits()
321 printf(" - "); in get_hardware_limits()
322 print_speed(max); in get_hardware_limits()
325 printf("%lu %lu\n", min, max); in get_hardware_limits()
330 /* --driver / -d */
337 return -EINVAL; in get_driver()
344 /* --policy / -p */
351 return -EINVAL; in get_policy()
354 print_speed(policy->min); in get_policy()
356 print_speed(policy->max); in get_policy()
359 printf(_("The governor \"%s\" may decide which speed to use\n" in get_policy()
361 policy->governor); in get_policy()
366 /* --governors / -g */
376 return -EINVAL; in get_available_governors()
379 while (governors->next) { in get_available_governors()
380 printf("%s ", governors->governor); in get_available_governors()
381 governors = governors->next; in get_available_governors()
383 printf("%s\n", governors->governor); in get_available_governors()
389 /* --affected-cpus / -a */
398 return -EINVAL; in get_affected_cpus()
401 while (cpus->next) { in get_affected_cpus()
402 printf("%d ", cpus->cpu); in get_affected_cpus()
403 cpus = cpus->next; in get_affected_cpus()
405 printf("%d\n", cpus->cpu); in get_affected_cpus()
410 /* --related-cpus / -r */
419 return -EINVAL; in get_related_cpus()
422 while (cpus->next) { in get_related_cpus()
423 printf("%d ", cpus->cpu); in get_related_cpus()
424 cpus = cpus->next; in get_related_cpus()
426 printf("%d\n", cpus->cpu); in get_related_cpus()
431 /* --stats / -s */
440 print_speed(stats->frequency); in get_freq_stats()
442 (100.0 * stats->time_in_state) / total_time); in get_freq_stats()
445 stats->frequency, stats->time_in_state); in get_freq_stats()
446 stats = stats->next; in get_freq_stats()
456 /* --latency / -y */
465 return -EINVAL; in get_latency()
489 while (freqs->next) { in debug_output_one()
490 print_speed(freqs->frequency); in debug_output_one()
492 freqs = freqs->next; in debug_output_one()
494 print_speed(freqs->frequency); in debug_output_one()
515 {"related-cpus", no_argument, NULL, 'r'},
516 {"affected-cpus", no_argument, NULL, 'a'},
521 {"no-rounding", no_argument, NULL, 'n'},
542 case -1: in cmd_freq_info()
559 output_param = -1; in cmd_freq_info()
567 output_param = -1; in cmd_freq_info()
586 "combined with passing a --cpu argument\n")); in cmd_freq_info()
587 return -EINVAL; in cmd_freq_info()
601 case -1: in cmd_freq_info()
602 printf(_("You can't specify more than one --cpu parameter and/or\n" in cmd_freq_info()
603 "more than one output-specific argument\n")); in cmd_freq_info()
604 return -EINVAL; in cmd_freq_info()
607 return -EINVAL; in cmd_freq_info()