提交 b7ae9dd8 编写于 作者: H Heiko Carstens 提交者: Linus Torvalds

[PATCH] s390: show_cpuinfo fix

Disable preemption in show_cpuinfo to avoid problems and the warning about
smp_processor_id.
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 90f4e121
...@@ -634,6 +634,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -634,6 +634,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
struct cpuinfo_S390 *cpuinfo; struct cpuinfo_S390 *cpuinfo;
unsigned long n = (unsigned long) v - 1; unsigned long n = (unsigned long) v - 1;
preempt_disable();
if (!n) { if (!n) {
seq_printf(m, "vendor_id : IBM/S390\n" seq_printf(m, "vendor_id : IBM/S390\n"
"# processors : %i\n" "# processors : %i\n"
...@@ -658,6 +659,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -658,6 +659,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
cpuinfo->cpu_id.ident, cpuinfo->cpu_id.ident,
cpuinfo->cpu_id.machine); cpuinfo->cpu_id.machine);
} }
preempt_enable();
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册