提交 4c86231c 编写于 作者: V Vineet Gupta

ARC: fix /proc/cpuinfo for offline cpus

Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
上级 26bc420b
......@@ -412,6 +412,11 @@ static int show_cpuinfo(struct seq_file *m, void *v)
char *str;
int cpu_id = ptr_to_cpu(v);
if (!cpu_online(cpu_id)) {
seq_printf(m, "processor [%d]\t: Offline\n", cpu_id);
goto done;
}
str = (char *)__get_free_page(GFP_TEMPORARY);
if (!str)
goto done;
......@@ -429,7 +434,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
free_page((unsigned long)str);
done:
seq_printf(m, "\n\n");
seq_printf(m, "\n");
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册