Lines Matching defs:cpu
1762 static const char model_marker[] = "cpu\t\t: ";
1768 static const char model_marker[] = "cpu model\t\t: ";
1770 static const char model_marker[] = "cpu family\t\t: ";
1796 struct cpu {
1805 unsigned cpu;
1809 struct cpu (*cpus)[8192]; /* Kernel maximum. */
1810 struct cpu* c;
1811 struct cpu t;
1841 n = fscanf(fp, "cpu%u %llu %llu %llu %llu %llu %llu",
1842 &cpu, &t.user, &t.nice, &t.sys, &t.idle, &skip, &t.irq);
1850 if (cpu >= ARRAY_SIZE(*cpus))
1853 (*cpus)[cpu] = t;
1855 bitmap[cpu >> 3] |= 1 << (cpu & 7);
1857 if (cpu >= maxcpu)
1858 maxcpu = cpu + 1;
1868 if (1 != fscanf(fp, "processor\t: %u\n", &cpu))
1901 if (cpu < maxcpu)
1902 (*cpus)[cpu].model = model - models;
1916 for (cpu = 0; cpu < maxcpu; cpu++) {
1917 if (!(bitmap[cpu >> 3] & (1 << (cpu & 7))))
1922 "/sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq", cpu);
1928 if (1 != fscanf(fp, "%llu", &(*cpus)[cpu].freq))
1947 for (cpu = 0; cpu < maxcpu; cpu++) {
1948 if (!(bitmap[cpu >> 3] & (1 << (cpu & 7))))
1951 c = *cpus + cpu;