|
@@ -160,14 +160,16 @@ static void *c_start(struct seq_file *m, loff_t *pos)
|
|
{
|
|
{
|
|
if (*pos == 0) /* just in case, cpu 0 is not the first */
|
|
if (*pos == 0) /* just in case, cpu 0 is not the first */
|
|
*pos = first_cpu(cpu_online_map);
|
|
*pos = first_cpu(cpu_online_map);
|
|
- if ((*pos) < nr_cpu_ids && cpu_online(*pos))
|
|
|
|
|
|
+ else
|
|
|
|
+ *pos = next_cpu_nr(*pos - 1, cpu_online_map);
|
|
|
|
+ if ((*pos) < nr_cpu_ids)
|
|
return &cpu_data(*pos);
|
|
return &cpu_data(*pos);
|
|
return NULL;
|
|
return NULL;
|
|
}
|
|
}
|
|
|
|
|
|
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
|
|
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
|
|
{
|
|
{
|
|
- *pos = next_cpu(*pos, cpu_online_map);
|
|
|
|
|
|
+ (*pos)++;
|
|
return c_start(m, pos);
|
|
return c_start(m, pos);
|
|
}
|
|
}
|
|
|
|
|