static int show_cpuinfo(struct seq_file *m, void *v) { #if defined(__sh3__) seq_printf(m, "cpu family\t: SH-3\n" "cache size\t: 8K-byte\n"); #elif defined(__SH4__) seq_printf(m, "cpu family\t: SH-4\n" "cache size\t: 8K-byte/16K-byte\n"); #endif seq_printf(m, "bogomips\t: %lu.%02lu\n\n", loops_per_jiffy/(500000/HZ), (loops_per_jiffy/(5000/HZ)) % 100); seq_printf(m, "Machine: %s\n", sh_mv.mv_name); #define PRINT_CLOCK(name, value) \ seq_printf(m, name " clock: %d.%02dMHz\n", \ ((value) / 1000000), ((value) % 1000000)/10000) PRINT_CLOCK("CPU", boot_cpu_data.cpu_clock); PRINT_CLOCK("Bus", boot_cpu_data.bus_clock); #ifdef CONFIG_CPU_SUBTYPE_ST40 PRINT_CLOCK("Memory", boot_cpu_data.memory_clock); #endif PRINT_CLOCK("Peripheral module", boot_cpu_data.module_clock); return 0; }
static void __init show_cpu_info(int cpu_id) { struct cpuinfo_m32r *ci = &cpu_data[cpu_id]; printk("CPU#%d : ", cpu_id); #define PRINT_CLOCK(name, value) \ printk(name " clock %d.%02dMHz", \ ((value) / 1000000), ((value) % 1000000) / 10000) PRINT_CLOCK("CPU", (int)ci->cpu_clock); PRINT_CLOCK(", Bus", (int)ci->bus_clock); printk(", loops_per_jiffy[%ld]\n", ci->loops_per_jiffy); }
/* * Get CPU information for use by the procfs. */ static int show_cpuinfo(struct seq_file *m, void *v) { unsigned int cpu = smp_processor_id(); if (!cpu && cpu_online(cpu)) seq_printf(m, "machine\t\t: %s\n", get_system_type()); seq_printf(m, "processor\t: %d\n", cpu); seq_printf(m, "cpu family\t: %s\n", system_utsname.machine); seq_printf(m, "cpu type\t: %s\n", get_cpu_subtype()); show_cpuflags(m); seq_printf(m, "cache type\t: "); /* * Check for what type of cache we have, we support both the * unified cache on the SH-2 and SH-3, as well as the harvard * style cache on the SH-4. */ if (test_bit(SH_CACHE_COMBINED, &(boot_cpu_data.icache.flags))) { seq_printf(m, "unified\n"); show_cacheinfo(m, "cache", boot_cpu_data.icache); } else { seq_printf(m, "split (harvard)\n"); show_cacheinfo(m, "icache", boot_cpu_data.icache); show_cacheinfo(m, "dcache", boot_cpu_data.dcache); } seq_printf(m, "bogomips\t: %lu.%02lu\n", boot_cpu_data.loops_per_jiffy/(500000/HZ), (boot_cpu_data.loops_per_jiffy/(5000/HZ)) % 100); #define PRINT_CLOCK(name, value) \ seq_printf(m, name " clock\t: %d.%02dMHz\n", \ ((value) / 1000000), ((value) % 1000000)/10000) PRINT_CLOCK("cpu", boot_cpu_data.cpu_clock); PRINT_CLOCK("bus", boot_cpu_data.bus_clock); #ifdef CONFIG_CPU_SUBTYPE_ST40STB1 PRINT_CLOCK("memory", boot_cpu_data.memory_clock); #endif PRINT_CLOCK("module", boot_cpu_data.module_clock); return 0; }
/* * Get CPU information for use by the procfs. */ static int show_cpuinfo(struct seq_file *m, void *v) { struct cpuinfo_m32r *c = v; unsigned long cpu = c - cpu_data; #ifdef CONFIG_SMP if (!cpu_online(cpu)) return 0; #endif /* CONFIG_SMP */ seq_printf(m, "processor\t: %ld\n", cpu); #if defined(CONFIG_CHIP_VDEC2) seq_printf(m, "cpu family\t: VDEC2\n" "cache size\t: Unknown\n"); #elif defined(CONFIG_CHIP_M32700) seq_printf(m,"cpu family\t: M32700\n" "cache size\t: I-8KB/D-8KB\n"); #elif defined(CONFIG_CHIP_M32102) seq_printf(m,"cpu family\t: M32102\n" "cache size\t: I-8KB\n"); #elif defined(CONFIG_CHIP_OPSP) seq_printf(m,"cpu family\t: OPSP\n" "cache size\t: I-8KB/D-8KB\n"); #elif defined(CONFIG_CHIP_MP) seq_printf(m, "cpu family\t: M32R-MP\n" "cache size\t: I-xxKB/D-xxKB\n"); #elif defined(CONFIG_CHIP_M32104) seq_printf(m,"cpu family\t: M32104\n" "cache size\t: I-8KB/D-8KB\n"); #else seq_printf(m, "cpu family\t: Unknown\n"); #endif seq_printf(m, "bogomips\t: %lu.%02lu\n", c->loops_per_jiffy/(500000/HZ), (c->loops_per_jiffy/(5000/HZ)) % 100); #if defined(CONFIG_PLAT_MAPPI) seq_printf(m, "Machine\t\t: Mappi Evaluation board\n"); #elif defined(CONFIG_PLAT_MAPPI2) seq_printf(m, "Machine\t\t: Mappi-II Evaluation board\n"); #elif defined(CONFIG_PLAT_MAPPI3) seq_printf(m, "Machine\t\t: Mappi-III Evaluation board\n"); #elif defined(CONFIG_PLAT_M32700UT) seq_printf(m, "Machine\t\t: M32700UT Evaluation board\n"); #elif defined(CONFIG_PLAT_OPSPUT) seq_printf(m, "Machine\t\t: OPSPUT Evaluation board\n"); #elif defined(CONFIG_PLAT_USRV) seq_printf(m, "Machine\t\t: uServer\n"); #elif defined(CONFIG_PLAT_OAKS32R) seq_printf(m, "Machine\t\t: OAKS32R\n"); #elif defined(CONFIG_PLAT_M32104UT) seq_printf(m, "Machine\t\t: M3T-M32104UT uT Engine board\n"); #else seq_printf(m, "Machine\t\t: Unknown\n"); #endif #define PRINT_CLOCK(name, value) \ seq_printf(m, name " clock\t: %d.%02dMHz\n", \ ((value) / 1000000), ((value) % 1000000)/10000) PRINT_CLOCK("CPU", (int)c->cpu_clock); PRINT_CLOCK("Bus", (int)c->bus_clock); seq_printf(m, "\n"); return 0; }