Lines Matching +full:max +full:- +full:speed
2 * (C) 2004-2009 Dominik Brodowski <linux@dominikbrodowski.de>
40 value[LINE_LEN - 1] = '\0'; in count_cpus()
41 if (strlen(value) < (LINE_LEN - 2)) in count_cpus()
63 unsigned long min, max; in proc_cpufreq_output() local
65 printf(_(" minimum CPU frequency - maximum CPU frequency - governor\n")); in proc_cpufreq_output()
73 if (cpufreq_get_hardware_limits(cpu, &min, &max)) { in proc_cpufreq_output()
74 max = 0; in proc_cpufreq_output()
76 min_pctg = (policy->min * 100) / max; in proc_cpufreq_output()
77 max_pctg = (policy->max * 100) / max; in proc_cpufreq_output()
79 printf("CPU%3d %9lu kHz (%3d %%) - %9lu kHz (%3d %%) - %s\n", in proc_cpufreq_output()
80 cpu , policy->min, max ? min_pctg : 0, policy->max, in proc_cpufreq_output()
81 max ? max_pctg : 0, policy->governor); in proc_cpufreq_output()
88 static void print_speed(unsigned long speed) in print_speed() argument
93 if (speed > 1000000) in print_speed()
94 printf("%u.%06u GHz", ((unsigned int) speed/1000000), in print_speed()
95 ((unsigned int) speed%1000000)); in print_speed()
96 else if (speed > 1000) in print_speed()
97 printf("%u.%03u MHz", ((unsigned int) speed/1000), in print_speed()
98 (unsigned int) (speed%1000)); in print_speed()
100 printf("%lu kHz", speed); in print_speed()
102 if (speed > 1000000) { in print_speed()
103 tmp = speed%10000; in print_speed()
105 speed += 10000; in print_speed()
106 printf("%u.%02u GHz", ((unsigned int) speed/1000000), in print_speed()
107 ((unsigned int) (speed%1000000)/10000)); in print_speed()
108 } else if (speed > 100000) { in print_speed()
109 tmp = speed%1000; in print_speed()
111 speed += 1000; in print_speed()
112 printf("%u MHz", ((unsigned int) speed/1000)); in print_speed()
113 } else if (speed > 1000) { in print_speed()
114 tmp = speed%100; in print_speed()
116 speed += 100; in print_speed()
117 printf("%u.%01u MHz", ((unsigned int) speed/1000), in print_speed()
118 ((unsigned int) (speed%1000)/100)); in print_speed()
164 /* --boost / -b */
179 " on CPU %d -- are you root?\n"), cpu); in get_boost_mode()
206 printf(_(" Pstate-Pb%d: %luMHz (boost state)" in get_boost_mode()
209 printf(_(" Pstate-P%d: %luMHz\n"), in get_boost_mode()
210 i - b_states, pstates[i]); in get_boost_mode()
223 dprint (" Ratio: 0x%llx - bclk: %f\n", in get_boost_mode()
228 printf(_(" %.0f MHz max turbo 4 active cores\n"), in get_boost_mode()
233 printf(_(" %.0f MHz max turbo 3 active cores\n"), in get_boost_mode()
238 printf(_(" %.0f MHz max turbo 2 active cores\n"), in get_boost_mode()
243 printf(_(" %.0f MHz max turbo 1 active cores\n"), in get_boost_mode()
249 /* --freq / -f */
257 return -EINVAL; in get_freq_kernel()
268 /* --hwfreq / -w */
276 return -EINVAL; in get_freq_hardware()
286 /* --hwlimits / -l */
290 unsigned long min, max; in get_hardware_limits() local
292 if (cpufreq_get_hardware_limits(cpu, &min, &max)) { in get_hardware_limits()
294 return -EINVAL; in get_hardware_limits()
300 printf(" - "); in get_hardware_limits()
301 print_speed(max); in get_hardware_limits()
304 printf("%lu %lu\n", min, max); in get_hardware_limits()
309 /* --driver / -d */
316 return -EINVAL; in get_driver()
323 /* --policy / -p */
330 return -EINVAL; in get_policy()
333 print_speed(policy->min); in get_policy()
335 print_speed(policy->max); in get_policy()
338 printf(_("The governor \"%s\" may decide which speed to use\n" in get_policy()
340 policy->governor); in get_policy()
345 /* --governors / -g */
355 return -EINVAL; in get_available_governors()
358 while (governors->next) { in get_available_governors()
359 printf("%s ", governors->governor); in get_available_governors()
360 governors = governors->next; in get_available_governors()
362 printf("%s\n", governors->governor); in get_available_governors()
368 /* --affected-cpus / -a */
377 return -EINVAL; in get_affected_cpus()
380 while (cpus->next) { in get_affected_cpus()
381 printf("%d ", cpus->cpu); in get_affected_cpus()
382 cpus = cpus->next; in get_affected_cpus()
384 printf("%d\n", cpus->cpu); in get_affected_cpus()
389 /* --related-cpus / -r */
398 return -EINVAL; in get_related_cpus()
401 while (cpus->next) { in get_related_cpus()
402 printf("%d ", cpus->cpu); in get_related_cpus()
403 cpus = cpus->next; in get_related_cpus()
405 printf("%d\n", cpus->cpu); in get_related_cpus()
410 /* --stats / -s */
419 print_speed(stats->frequency); in get_freq_stats()
421 (100.0 * stats->time_in_state) / total_time); in get_freq_stats()
424 stats->frequency, stats->time_in_state); in get_freq_stats()
425 stats = stats->next; in get_freq_stats()
435 /* --latency / -y */
444 return -EINVAL; in get_latency()
468 while (freqs->next) { in debug_output_one()
469 print_speed(freqs->frequency); in debug_output_one()
471 freqs = freqs->next; in debug_output_one()
473 print_speed(freqs->frequency); in debug_output_one()
494 {"related-cpus", no_argument, NULL, 'r'},
495 {"affected-cpus", no_argument, NULL, 'a'},
500 {"no-rounding", no_argument, NULL, 'n'},
521 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()