Skip to contentSkip to conversation

s390: show_cpuinfo fix.

PATCH In review Martin Schwidefsky 1 participant 1 message Sep 14, 2005 s390

lore
Share & tools
lore
#0 lore raw

PATCH 5/7 s390: show_cpuinfo fix.

[patch 5/7] s390: show_cpuinfo fix.

From: Heiko Carstens <[email protected]>

Disable preemption in show_cpuinfo to avoid problems and the warning about smp_processor_id.

diffstat:

 arch/s390/kernel/setup.c |    2 ++
 1 files changed, 2 insertions(+)
arch/s390/kernel/setup.c +2 -0
diff -urpN linux-2.6/arch/s390/kernel/setup.c linux-2.6-patched/arch/s390/kernel/setup.c
@@ -634,6 +634,7 @@ static int show_cpuinfo(struct seq_file 
         struct cpuinfo_S390 *cpuinfo;
 	unsigned long n = (unsigned long) v - 1;
 
+	preempt_disable();
 	if (!n) {
 		seq_printf(m, "vendor_id       : IBM/S390\n"
 			       "# processors    : %i\n"
@@ -658,6 +659,7 @@ static int show_cpuinfo(struct seq_file 
 			       cpuinfo->cpu_id.ident,
 			       cpuinfo->cpu_id.machine);
 	}
+	preempt_enable();
         return 0;
 }