diff options
Diffstat (limited to 'arch/x86/kernel/cpu/proc.c')
-rw-r--r-- | arch/x86/kernel/cpu/proc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c index 066f8c6af4df..3900e46d66db 100644 --- a/arch/x86/kernel/cpu/proc.c +++ b/arch/x86/kernel/cpu/proc.c | |||
@@ -89,8 +89,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
89 | int fpu_exception; | 89 | int fpu_exception; |
90 | 90 | ||
91 | #ifdef CONFIG_SMP | 91 | #ifdef CONFIG_SMP |
92 | if (!cpu_online(n)) | ||
93 | return 0; | ||
94 | n = c->cpu_index; | 92 | n = c->cpu_index; |
95 | #endif | 93 | #endif |
96 | seq_printf(m, "processor\t: %d\n" | 94 | seq_printf(m, "processor\t: %d\n" |
@@ -177,14 +175,14 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
177 | static void *c_start(struct seq_file *m, loff_t *pos) | 175 | static void *c_start(struct seq_file *m, loff_t *pos) |
178 | { | 176 | { |
179 | if (*pos == 0) /* just in case, cpu 0 is not the first */ | 177 | if (*pos == 0) /* just in case, cpu 0 is not the first */ |
180 | *pos = first_cpu(cpu_possible_map); | 178 | *pos = first_cpu(cpu_online_map); |
181 | if ((*pos) < NR_CPUS && cpu_possible(*pos)) | 179 | if ((*pos) < NR_CPUS && cpu_online(*pos)) |
182 | return &cpu_data(*pos); | 180 | return &cpu_data(*pos); |
183 | return NULL; | 181 | return NULL; |
184 | } | 182 | } |
185 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) | 183 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) |
186 | { | 184 | { |
187 | *pos = next_cpu(*pos, cpu_possible_map); | 185 | *pos = next_cpu(*pos, cpu_online_map); |
188 | return c_start(m, pos); | 186 | return c_start(m, pos); |
189 | } | 187 | } |
190 | static void c_stop(struct seq_file *m, void *v) | 188 | static void c_stop(struct seq_file *m, void *v) |