diff options
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r-- | arch/powerpc/kernel/traps.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 970d66ec4657..678fbff0d206 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -53,6 +53,9 @@ | |||
53 | #endif | 53 | #endif |
54 | #include <asm/kexec.h> | 54 | #include <asm/kexec.h> |
55 | #include <asm/ppc-opcode.h> | 55 | #include <asm/ppc-opcode.h> |
56 | #ifdef CONFIG_FSL_BOOKE | ||
57 | #include <asm/dbell.h> | ||
58 | #endif | ||
56 | 59 | ||
57 | #if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) | 60 | #if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) |
58 | int (*__debugger)(struct pt_regs *regs); | 61 | int (*__debugger)(struct pt_regs *regs); |
@@ -1122,6 +1125,24 @@ void vsx_assist_exception(struct pt_regs *regs) | |||
1122 | #endif /* CONFIG_VSX */ | 1125 | #endif /* CONFIG_VSX */ |
1123 | 1126 | ||
1124 | #ifdef CONFIG_FSL_BOOKE | 1127 | #ifdef CONFIG_FSL_BOOKE |
1128 | |||
1129 | void doorbell_exception(struct pt_regs *regs) | ||
1130 | { | ||
1131 | #ifdef CONFIG_SMP | ||
1132 | int cpu = smp_processor_id(); | ||
1133 | int msg; | ||
1134 | |||
1135 | if (num_online_cpus() < 2) | ||
1136 | return; | ||
1137 | |||
1138 | for (msg = 0; msg < 4; msg++) | ||
1139 | if (test_and_clear_bit(msg, &dbell_smp_message[cpu])) | ||
1140 | smp_message_recv(msg); | ||
1141 | #else | ||
1142 | printk(KERN_WARNING "Received doorbell on non-smp system\n"); | ||
1143 | #endif | ||
1144 | } | ||
1145 | |||
1125 | void CacheLockingException(struct pt_regs *regs, unsigned long address, | 1146 | void CacheLockingException(struct pt_regs *regs, unsigned long address, |
1126 | unsigned long error_code) | 1147 | unsigned long error_code) |
1127 | { | 1148 | { |