diff options
Diffstat (limited to 'arch/i386/kernel/cpu')
-rw-r--r-- | arch/i386/kernel/cpu/amd.c | 5 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/proc.c | 25 |
2 files changed, 26 insertions, 4 deletions
diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c index 4397f61705e2..333578a4e91a 100644 --- a/arch/i386/kernel/cpu/amd.c +++ b/arch/i386/kernel/cpu/amd.c | |||
@@ -217,8 +217,9 @@ static void __init init_amd(struct cpuinfo_x86 *c) | |||
217 | } | 217 | } |
218 | 218 | ||
219 | if (cpuid_eax(0x80000000) >= 0x80000007) { | 219 | if (cpuid_eax(0x80000000) >= 0x80000007) { |
220 | if (cpuid_edx(0x80000007) & (1<<8)) | 220 | c->x86_power = cpuid_edx(0x80000007); |
221 | set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability); | 221 | if (c->x86_power & (1<<8)) |
222 | set_bit(X86_FEATURE_CONSTANT_TSC, c->x86_capability); | ||
222 | } | 223 | } |
223 | 224 | ||
224 | #ifdef CONFIG_X86_HT | 225 | #ifdef CONFIG_X86_HT |
diff --git a/arch/i386/kernel/cpu/proc.c b/arch/i386/kernel/cpu/proc.c index 66592fad2bfe..89a85af33d28 100644 --- a/arch/i386/kernel/cpu/proc.c +++ b/arch/i386/kernel/cpu/proc.c | |||
@@ -29,7 +29,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
29 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 29 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
30 | NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL, | 30 | NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL, |
31 | NULL, NULL, NULL, "mp", "nx", NULL, "mmxext", NULL, | 31 | NULL, NULL, NULL, "mp", "nx", NULL, "mmxext", NULL, |
32 | NULL, "fxsr_opt", NULL, NULL, NULL, "lm", "3dnowext", "3dnow", | 32 | NULL, "fxsr_opt", "rdtscp", NULL, NULL, "lm", "3dnowext", "3dnow", |
33 | 33 | ||
34 | /* Transmeta-defined */ | 34 | /* Transmeta-defined */ |
35 | "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL, | 35 | "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL, |
@@ -57,11 +57,21 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
57 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 57 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
58 | 58 | ||
59 | /* AMD-defined (#2) */ | 59 | /* AMD-defined (#2) */ |
60 | "lahf_lm", "cmp_legacy", NULL, NULL, NULL, NULL, NULL, NULL, | 60 | "lahf_lm", "cmp_legacy", "svm", NULL, "cr8legacy", NULL, NULL, NULL, |
61 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 61 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
62 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 62 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
63 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 63 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
64 | }; | 64 | }; |
65 | static char *x86_power_flags[] = { | ||
66 | "ts", /* temperature sensor */ | ||
67 | "fid", /* frequency id control */ | ||
68 | "vid", /* voltage id control */ | ||
69 | "ttp", /* thermal trip */ | ||
70 | "tm", | ||
71 | "stc", | ||
72 | NULL, | ||
73 | /* nothing */ /* constant_tsc - moved to flags */ | ||
74 | }; | ||
65 | struct cpuinfo_x86 *c = v; | 75 | struct cpuinfo_x86 *c = v; |
66 | int i, n = c - cpu_data; | 76 | int i, n = c - cpu_data; |
67 | int fpu_exception; | 77 | int fpu_exception; |
@@ -131,6 +141,17 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
131 | x86_cap_flags[i] != NULL ) | 141 | x86_cap_flags[i] != NULL ) |
132 | seq_printf(m, " %s", x86_cap_flags[i]); | 142 | seq_printf(m, " %s", x86_cap_flags[i]); |
133 | 143 | ||
144 | for (i = 0; i < 32; i++) | ||
145 | if (c->x86_power & (1 << i)) { | ||
146 | if (i < ARRAY_SIZE(x86_power_flags) && | ||
147 | x86_power_flags[i]) | ||
148 | seq_printf(m, "%s%s", | ||
149 | x86_power_flags[i][0]?" ":"", | ||
150 | x86_power_flags[i]); | ||
151 | else | ||
152 | seq_printf(m, " [%d]", i); | ||
153 | } | ||
154 | |||
134 | seq_printf(m, "\nbogomips\t: %lu.%02lu\n\n", | 155 | seq_printf(m, "\nbogomips\t: %lu.%02lu\n\n", |
135 | c->loops_per_jiffy/(500000/HZ), | 156 | c->loops_per_jiffy/(500000/HZ), |
136 | (c->loops_per_jiffy/(5000/HZ)) % 100); | 157 | (c->loops_per_jiffy/(5000/HZ)) % 100); |