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()
199 printf(_(" Pstate-Pb%d: %luMHz (boost state)" in get_boost_mode_x86()
202 printf(_(" Pstate-P%d: %luMHz\n"), in get_boost_mode_x86()
203 i - b_states, pstates[i]); in get_boost_mode_x86()
216 dprint (" Ratio: 0x%llx - bclk: %f\n", in get_boost_mode_x86()
221 printf(_(" %.0f MHz max turbo 4 active cores\n"), in get_boost_mode_x86()
226 printf(_(" %.0f MHz max turbo 3 active cores\n"), in get_boost_mode_x86()
231 printf(_(" %.0f MHz max turbo 2 active cores\n"), in get_boost_mode_x86()
236 printf(_(" %.0f MHz max turbo 1 active cores\n"), in get_boost_mode_x86()
242 /* --boost / -b */
256 while (freqs->next) { in get_boost_mode()
257 print_speed(freqs->frequency); in get_boost_mode()
259 freqs = freqs->next; in get_boost_mode()
261 print_speed(freqs->frequency); in get_boost_mode()
269 /* --freq / -f */
277 return -EINVAL; in get_freq_kernel()
288 /* --hwfreq / -w */
296 return -EINVAL; in get_freq_hardware()
306 /* --hwlimits / -l */
310 unsigned long min, max; in get_hardware_limits() local
312 if (cpufreq_get_hardware_limits(cpu, &min, &max)) { in get_hardware_limits()
314 return -EINVAL; in get_hardware_limits()
320 printf(" - "); in get_hardware_limits()
321 print_speed(max); in get_hardware_limits()
324 printf("%lu %lu\n", min, max); in get_hardware_limits()
329 /* --driver / -d */
336 return -EINVAL; in get_driver()
343 /* --policy / -p */
350 return -EINVAL; in get_policy()
353 print_speed(policy->min); in get_policy()
355 print_speed(policy->max); in get_policy()
358 printf(_("The governor \"%s\" may decide which speed to use\n" in get_policy()
360 policy->governor); in get_policy()
365 /* --governors / -g */
375 return -EINVAL; in get_available_governors()
378 while (governors->next) { in get_available_governors()
379 printf("%s ", governors->governor); in get_available_governors()
380 governors = governors->next; in get_available_governors()
382 printf("%s\n", governors->governor); in get_available_governors()
388 /* --affected-cpus / -a */
397 return -EINVAL; in get_affected_cpus()
400 while (cpus->next) { in get_affected_cpus()
401 printf("%d ", cpus->cpu); in get_affected_cpus()
402 cpus = cpus->next; in get_affected_cpus()
404 printf("%d\n", cpus->cpu); in get_affected_cpus()
409 /* --related-cpus / -r */
418 return -EINVAL; in get_related_cpus()
421 while (cpus->next) { in get_related_cpus()
422 printf("%d ", cpus->cpu); in get_related_cpus()
423 cpus = cpus->next; in get_related_cpus()
425 printf("%d\n", cpus->cpu); in get_related_cpus()
430 /* --stats / -s */
439 print_speed(stats->frequency); in get_freq_stats()
441 (100.0 * stats->time_in_state) / total_time); in get_freq_stats()
444 stats->frequency, stats->time_in_state); in get_freq_stats()
445 stats = stats->next; in get_freq_stats()
455 /* --latency / -y */
464 return -EINVAL; in get_latency()
488 while (freqs->next) { in debug_output_one()
489 print_speed(freqs->frequency); in debug_output_one()
491 freqs = freqs->next; in debug_output_one()
493 print_speed(freqs->frequency); in debug_output_one()
514 {"related-cpus", no_argument, NULL, 'r'},
515 {"affected-cpus", no_argument, NULL, 'a'},
520 {"no-rounding", no_argument, NULL, 'n'},
541 case -1: in cmd_freq_info()
558 output_param = -1; in cmd_freq_info()
566 output_param = -1; in cmd_freq_info()
585 "combined with passing a --cpu argument\n")); in cmd_freq_info()
586 return -EINVAL; in cmd_freq_info()
600 case -1: in cmd_freq_info()
601 printf(_("You can't specify more than one --cpu parameter and/or\n" in cmd_freq_info()
602 "more than one output-specific argument\n")); in cmd_freq_info()
603 return -EINVAL; in cmd_freq_info()
606 return -EINVAL; in cmd_freq_info()