Lines Matching defs:cpu_type
98 int op_cpu_variations(op_cpu cpu_type)
100 switch (cpu_type) {
109 op_cpu op_cpu_base_type(op_cpu cpu_type)
112 switch (cpu_type) {
121 return cpu_type;
127 int cpu_type = CPU_NO_GOOD;
131 fp = fopen("/proc/sys/dev/oprofile/cpu_type", "r");
134 fp = fopen("/dev/oprofile/cpu_type", "r");
136 fprintf(stderr, "Unable to open cpu_type file for reading\n");
138 return cpu_type;
147 cpu_type = op_get_cpu_number(str);
149 if (op_cpu_variations(cpu_type))
150 cpu_type = op_cpu_specific_type(cpu_type);
154 return cpu_type;
160 int cpu_type = CPU_NO_GOOD;
165 cpu_type = cpu_descrs[i].cpu;
171 if (cpu_type == CPU_NO_GOOD)
172 sscanf(cpu_string, "%d\n", &cpu_type);
174 if (cpu_type <= CPU_NO_GOOD || cpu_type >= MAX_CPU_TYPE)
175 cpu_type = CPU_NO_GOOD;
177 return cpu_type;
181 char const * op_get_cpu_type_str(op_cpu cpu_type)
183 if (cpu_type <= CPU_NO_GOOD || cpu_type >= MAX_CPU_TYPE)
186 return cpu_descrs[cpu_type].pretty;
190 char const * op_get_cpu_name(op_cpu cpu_type)
192 if (cpu_type <= CPU_NO_GOOD || cpu_type >= MAX_CPU_TYPE)
195 return cpu_descrs[cpu_type].name;
199 int op_get_nr_counters(op_cpu cpu_type)
203 if (cpu_type <= CPU_NO_GOOD || cpu_type >= MAX_CPU_TYPE)
206 cnt = arch_num_counters(cpu_type);
210 return cpu_descrs[cpu_type].nr_counters;