Lines Matching defs:cpu
42 if (strstr(value, "cpu "))
44 if (sscanf(value, "cpu%d ", &cpunr) != 1)
51 /* cpu count starts from 0, on error return 1 (UP) */
58 unsigned int cpu, nr_cpus;
67 for (cpu = 0; cpu < nr_cpus; cpu++) {
68 policy = cpufreq_get_policy(cpu);
72 if (cpufreq_get_hardware_limits(cpu, &min, &max)) {
79 cpu , policy->min, max ? min_pctg : 0, policy->max,
125 static int get_boost_mode_x86(unsigned int cpu)
131 ret = cpufreq_has_boost_support(cpu, &support, &active, &b_states);
134 " on CPU %d -- are you root?\n"), cpu);
154 ret = decode_pstates(cpu, b_states, pstates, &pstate_no);
180 intel_turbo_ratio = msr_intel_get_turbo_ratio(cpu);
209 static int get_boost_mode(unsigned int cpu)
216 return get_boost_mode_x86(cpu);
218 freqs = cpufreq_get_boost_frequencies(cpu);
236 static int get_freq_kernel(unsigned int cpu, unsigned int human)
238 unsigned long freq = cpufreq_get_freq_kernel(cpu);
255 static int get_freq_hardware(unsigned int cpu, unsigned int human)
262 freq = cpufreq_get_freq_hardware(cpu);
278 static int get_hardware_limits(unsigned int cpu, unsigned int human)
282 if (cpufreq_get_hardware_limits(cpu, &min, &max)) {
301 static int get_driver(unsigned int cpu)
303 char *driver = cpufreq_get_driver(cpu);
315 static int get_policy(unsigned int cpu)
317 struct cpufreq_policy *policy = cpufreq_get_policy(cpu);
337 static int get_available_governors(unsigned int cpu)
340 cpufreq_get_available_governors(cpu);
360 static int get_affected_cpus(unsigned int cpu)
362 struct cpufreq_affected_cpus *cpus = cpufreq_get_affected_cpus(cpu);
371 printf("%d ", cpus->cpu);
374 printf("%d\n", cpus->cpu);
381 static int get_related_cpus(unsigned int cpu)
383 struct cpufreq_affected_cpus *cpus = cpufreq_get_related_cpus(cpu);
392 printf("%d ", cpus->cpu);
395 printf("%d\n", cpus->cpu);
402 static int get_freq_stats(unsigned int cpu, unsigned int human)
404 unsigned long total_trans = cpufreq_get_transitions(cpu);
406 struct cpufreq_stats *stats = cpufreq_get_stats(cpu, &total_time);
427 static int get_epp(unsigned int cpu, bool interactive)
431 epp = cpufreq_get_energy_performance_preference(cpu);
444 static int get_latency(unsigned int cpu, unsigned int human)
446 unsigned long latency = cpufreq_get_transition_latency(cpu);
448 if (!get_epp(cpu, false))
467 static int get_perf_cap(unsigned int cpu)
471 amd_pstate_show_perf_and_freq(cpu, no_rounding);
476 static void debug_output_one(unsigned int cpu)
480 get_driver(cpu);
481 get_related_cpus(cpu);
482 get_affected_cpus(cpu);
483 get_latency(cpu, 1);
484 get_epp(cpu, true);
485 get_hardware_limits(cpu, 1);
487 freqs = cpufreq_get_available_frequencies(cpu);
500 get_available_governors(cpu);
501 get_policy(cpu);
502 if (get_freq_hardware(cpu, 1) < 0)
503 get_freq_kernel(cpu, 1);
504 get_boost_mode(cpu);
505 get_perf_cap(cpu);
534 unsigned int cpu = 0;
592 "combined with passing a --cpu argument\n"));
608 printf(_("You can't specify more than one --cpu parameter and/or\n"
619 for (cpu = bitmask_first(cpus_chosen);
620 cpu <= bitmask_last(cpus_chosen); cpu++) {
622 if (!bitmask_isbitset(cpus_chosen, cpu))
625 printf(_("analyzing CPU %d:\n"), cpu);
627 if (sysfs_is_cpu_online(cpu) != 1) {
635 get_boost_mode(cpu);
638 debug_output_one(cpu);
641 ret = get_affected_cpus(cpu);
644 ret = get_related_cpus(cpu);
647 ret = get_available_governors(cpu);
650 ret = get_policy(cpu);
653 ret = get_driver(cpu);
656 ret = get_hardware_limits(cpu, human);
659 ret = get_freq_hardware(cpu, human);
662 ret = get_freq_kernel(cpu, human);
665 ret = get_freq_stats(cpu, human);
668 ret = get_latency(cpu, human);
671 ret = get_perf_cap(cpu);
674 ret = get_epp(cpu, true);