diff options
| -rw-r--r-- | arch/x86/kernel/cpu/proc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c index a26c480b9491..01b1244ef1c0 100644 --- a/arch/x86/kernel/cpu/proc.c +++ b/arch/x86/kernel/cpu/proc.c | |||
| @@ -160,14 +160,16 @@ static void *c_start(struct seq_file *m, loff_t *pos) | |||
| 160 | { | 160 | { |
| 161 | if (*pos == 0) /* just in case, cpu 0 is not the first */ | 161 | if (*pos == 0) /* just in case, cpu 0 is not the first */ |
| 162 | *pos = first_cpu(cpu_online_map); | 162 | *pos = first_cpu(cpu_online_map); |
| 163 | if ((*pos) < nr_cpu_ids && cpu_online(*pos)) | 163 | else |
| 164 | *pos = next_cpu_nr(*pos - 1, cpu_online_map); | ||
| 165 | if ((*pos) < nr_cpu_ids) | ||
| 164 | return &cpu_data(*pos); | 166 | return &cpu_data(*pos); |
| 165 | return NULL; | 167 | return NULL; |
| 166 | } | 168 | } |
| 167 | 169 | ||
| 168 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) | 170 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) |
| 169 | { | 171 | { |
| 170 | *pos = next_cpu(*pos, cpu_online_map); | 172 | (*pos)++; |
| 171 | return c_start(m, pos); | 173 | return c_start(m, pos); |
| 172 | } | 174 | } |
| 173 | 175 | ||
