aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/proc.c
diff options
context:
space:
mode:
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>2008-02-20 13:48:02 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:48 -0400
commit2aef77204e1e3a8ed6345727afbcb2c1efdf7fc0 (patch)
tree124b5004c8bad84976352723db7d0ba1fc217d0b /arch/x86/kernel/cpu/proc.c
parentf84c3a429f83a98bb0b0fd7eed7ad1edc512b91c (diff)
x86: cosmetic unification cpu/proc|_64.c
make cpu/proc.c and cpu/proc_64.c same. Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/proc.c')
-rw-r--r--arch/x86/kernel/cpu/proc.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c
index fd3823a18c0b..15043a335ef1 100644
--- a/arch/x86/kernel/cpu/proc.c
+++ b/arch/x86/kernel/cpu/proc.c
@@ -8,6 +8,7 @@
8/* 8/*
9 * Get CPU information for use by the procfs. 9 * Get CPU information for use by the procfs.
10 */ 10 */
11#ifdef CONFIG_X86_32
11static void show_cpuinfo_core(struct seq_file *m, struct cpuinfo_x86 *c, 12static void show_cpuinfo_core(struct seq_file *m, struct cpuinfo_x86 *c,
12 unsigned int cpu) 13 unsigned int cpu)
13{ 14{
@@ -47,6 +48,31 @@ static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
47 c->cpuid_level, 48 c->cpuid_level,
48 c->wp_works_ok ? "yes" : "no"); 49 c->wp_works_ok ? "yes" : "no");
49} 50}
51#else
52static void show_cpuinfo_core(struct seq_file *m, struct cpuinfo_x86 *c,
53 unsigned int cpu)
54{
55#ifdef CONFIG_SMP
56 if (c->x86_max_cores * smp_num_siblings > 1) {
57 seq_printf(m, "physical id\t: %d\n", c->phys_proc_id);
58 seq_printf(m, "siblings\t: %d\n",
59 cpus_weight(per_cpu(cpu_core_map, cpu)));
60 seq_printf(m, "core id\t\t: %d\n", c->cpu_core_id);
61 seq_printf(m, "cpu cores\t: %d\n", c->booted_cores);
62 }
63#endif
64}
65
66static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
67{
68 seq_printf(m,
69 "fpu\t\t: yes\n"
70 "fpu_exception\t: yes\n"
71 "cpuid level\t: %d\n"
72 "wp\t\t: yes\n",
73 c->cpuid_level);
74}
75#endif
50 76
51static int show_cpuinfo(struct seq_file *m, void *v) 77static int show_cpuinfo(struct seq_file *m, void *v)
52{ 78{
@@ -97,7 +123,17 @@ static int show_cpuinfo(struct seq_file *m, void *v)
97 seq_printf(m, "\nbogomips\t: %lu.%02lu\n", 123 seq_printf(m, "\nbogomips\t: %lu.%02lu\n",
98 c->loops_per_jiffy/(500000/HZ), 124 c->loops_per_jiffy/(500000/HZ),
99 (c->loops_per_jiffy/(5000/HZ)) % 100); 125 (c->loops_per_jiffy/(5000/HZ)) % 100);
126
127#ifdef CONFIG_X86_64
128 if (c->x86_tlbsize > 0)
129 seq_printf(m, "TLB size\t: %d 4K pages\n", c->x86_tlbsize);
130#endif
100 seq_printf(m, "clflush size\t: %u\n", c->x86_clflush_size); 131 seq_printf(m, "clflush size\t: %u\n", c->x86_clflush_size);
132#ifdef CONFIG_X86_64
133 seq_printf(m, "cache_alignment\t: %d\n", c->x86_cache_alignment);
134 seq_printf(m, "address sizes\t: %u bits physical, %u bits virtual\n",
135 c->x86_phys_bits, c->x86_virt_bits);
136#endif
101 137
102 seq_printf(m, "power management:"); 138 seq_printf(m, "power management:");
103 for (i = 0; i < 32; i++) { 139 for (i = 0; i < 32; i++) {