diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2011-01-05 06:48:17 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2011-01-05 06:47:31 -0500 |
commit | 19726cec63aeadad127f9e72ee69240336e37f15 (patch) | |
tree | e32d28dd4657bd01bb5af3a8b0ce786e769042ac /arch/s390/kernel | |
parent | 974de4d7e70a6d759457722a6f322cc86b480eea (diff) |
[S390] cpuinfo: use get_online_cpus() instead of preempt_disable()
Use get_online_cpus() instead of preempt_disable() to make sure cpus
don't go offline while accessing their per cpu data.
The preempt_disable() stuff is old code which was used before
get_online_cpus() was available.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/processor.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c index eeb651b48db3..753623bde8ec 100644 --- a/arch/s390/kernel/processor.c +++ b/arch/s390/kernel/processor.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | #include <linux/seq_file.h> | 14 | #include <linux/seq_file.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | 16 | #include <linux/cpu.h> | |
17 | #include <asm/elf.h> | 17 | #include <asm/elf.h> |
18 | #include <asm/lowcore.h> | 18 | #include <asm/lowcore.h> |
19 | #include <asm/param.h> | 19 | #include <asm/param.h> |
@@ -47,7 +47,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
47 | int i; | 47 | int i; |
48 | 48 | ||
49 | s390_adjust_jiffies(); | 49 | s390_adjust_jiffies(); |
50 | preempt_disable(); | ||
51 | if (!n) { | 50 | if (!n) { |
52 | seq_printf(m, "vendor_id : IBM/S390\n" | 51 | seq_printf(m, "vendor_id : IBM/S390\n" |
53 | "# processors : %i\n" | 52 | "# processors : %i\n" |
@@ -60,7 +59,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
60 | seq_printf(m, "%s ", hwcap_str[i]); | 59 | seq_printf(m, "%s ", hwcap_str[i]); |
61 | seq_puts(m, "\n"); | 60 | seq_puts(m, "\n"); |
62 | } | 61 | } |
63 | 62 | get_online_cpus(); | |
64 | if (cpu_online(n)) { | 63 | if (cpu_online(n)) { |
65 | struct cpuid *id = &per_cpu(cpu_id, n); | 64 | struct cpuid *id = &per_cpu(cpu_id, n); |
66 | seq_printf(m, "processor %li: " | 65 | seq_printf(m, "processor %li: " |
@@ -69,7 +68,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
69 | "machine = %04X\n", | 68 | "machine = %04X\n", |
70 | n, id->version, id->ident, id->machine); | 69 | n, id->version, id->ident, id->machine); |
71 | } | 70 | } |
72 | preempt_enable(); | 71 | put_online_cpus(); |
73 | return 0; | 72 | return 0; |
74 | } | 73 | } |
75 | 74 | ||