aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/dbell.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/dbell.c b/arch/powerpc/kernel/dbell.c
index 1c7a94580c3..f7b518894c8 100644
--- a/arch/powerpc/kernel/dbell.c
+++ b/arch/powerpc/kernel/dbell.c
@@ -16,6 +16,7 @@
16#include <linux/percpu.h> 16#include <linux/percpu.h>
17 17
18#include <asm/dbell.h> 18#include <asm/dbell.h>
19#include <asm/irq_regs.h>
19 20
20#ifdef CONFIG_SMP 21#ifdef CONFIG_SMP
21struct doorbell_cpu_info { 22struct doorbell_cpu_info {
@@ -63,17 +64,21 @@ void doorbell_message_pass(int target, int msg)
63 64
64void doorbell_exception(struct pt_regs *regs) 65void doorbell_exception(struct pt_regs *regs)
65{ 66{
67 struct pt_regs *old_regs = set_irq_regs(regs);
66 struct doorbell_cpu_info *info = &__get_cpu_var(doorbell_cpu_info); 68 struct doorbell_cpu_info *info = &__get_cpu_var(doorbell_cpu_info);
67 int msg; 69 int msg;
68 70
69 /* Warning: regs can be NULL when called from irq enable */ 71 /* Warning: regs can be NULL when called from irq enable */
70 72
71 if (!info->messages || (num_online_cpus() < 2)) 73 if (!info->messages || (num_online_cpus() < 2))
72 return; 74 goto out;
73 75
74 for (msg = 0; msg < 4; msg++) 76 for (msg = 0; msg < 4; msg++)
75 if (test_and_clear_bit(msg, &info->messages)) 77 if (test_and_clear_bit(msg, &info->messages))
76 smp_message_recv(msg); 78 smp_message_recv(msg);
79
80out:
81 set_irq_regs(old_regs);
77} 82}
78 83
79#else /* CONFIG_SMP */ 84#else /* CONFIG_SMP */