[PATCH] s390: show_cpuinfo fix
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Sat, 17 Sep 2005 02:27:34 +0000 (19:27 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 17 Sep 2005 18:49:58 +0000 (11:49 -0700)
Disable preemption in show_cpuinfo to avoid problems and the warning about
smp_processor_id.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/s390/kernel/setup.c

index 5ba5a5485da9021c0cfc9ec3e63c6a1ecb9ea78c..907d16ac9dc96d8df9175c671c3444bf22da549f 100644 (file)
@@ -634,6 +634,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
         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 *m, void *v)
                               cpuinfo->cpu_id.ident,
                               cpuinfo->cpu_id.machine);
        }
+       preempt_enable();
         return 0;
 }