提交 f2ad47ff 编写于 作者: M Mike Travis 提交者: Ingo Molnar

NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/proc.c

  * Use nr_cpu_ids instead of NR_CPUS to limit traversal of cpu online map.
Signed-off-by: NMike Travis <travis@sgi.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 6bca67f9
......@@ -160,7 +160,7 @@ static void *c_start(struct seq_file *m, loff_t *pos)
{
if (*pos == 0) /* just in case, cpu 0 is not the first */
*pos = first_cpu(cpu_online_map);
if ((*pos) < NR_CPUS && cpu_online(*pos))
if ((*pos) < nr_cpu_ids && cpu_online(*pos))
return &cpu_data(*pos);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册