diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-09 01:25:18 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-09 01:25:18 -0400 |
commit | e3145b387a02d4bf8b8033b1354d413fc0864494 (patch) | |
tree | f1d23c25022e097ee12d5ba9227a2dcf41eb2e44 | |
parent | a2e198116f97bb1cd5b37ff33a8cfdfb4010cf5b (diff) |
powerpc/book3e: Move doorbell_exception from traps.c to dbell.c
... where it belongs
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/kernel/dbell.c | 22 | ||||
-rw-r--r-- | arch/powerpc/kernel/traps.c | 21 |
2 files changed, 21 insertions, 22 deletions
diff --git a/arch/powerpc/kernel/dbell.c b/arch/powerpc/kernel/dbell.c index 1493734cd871..e3a717704fd6 100644 --- a/arch/powerpc/kernel/dbell.c +++ b/arch/powerpc/kernel/dbell.c | |||
@@ -41,4 +41,24 @@ void smp_dbell_message_pass(int target, int msg) | |||
41 | ppc_msgsnd(PPC_DBELL, PPC_DBELL_MSG_BRDCAST, 0); | 41 | ppc_msgsnd(PPC_DBELL, PPC_DBELL_MSG_BRDCAST, 0); |
42 | } | 42 | } |
43 | } | 43 | } |
44 | #endif | 44 | |
45 | void doorbell_exception(struct pt_regs *regs) | ||
46 | { | ||
47 | int cpu = smp_processor_id(); | ||
48 | int msg; | ||
49 | |||
50 | if (num_online_cpus() < 2) | ||
51 | return; | ||
52 | |||
53 | for (msg = 0; msg < 4; msg++) | ||
54 | if (test_and_clear_bit(msg, &dbell_smp_message[cpu])) | ||
55 | smp_message_recv(msg); | ||
56 | } | ||
57 | |||
58 | #else /* CONFIG_SMP */ | ||
59 | void doorbell_exception(struct pt_regs *regs) | ||
60 | { | ||
61 | printk(KERN_WARNING "Received doorbell on non-smp system\n"); | ||
62 | } | ||
63 | #endif /* CONFIG_SMP */ | ||
64 | |||
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index e5fe5a8522a6..a45a63c3a0c7 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -55,9 +55,6 @@ | |||
55 | #endif | 55 | #endif |
56 | #include <asm/kexec.h> | 56 | #include <asm/kexec.h> |
57 | #include <asm/ppc-opcode.h> | 57 | #include <asm/ppc-opcode.h> |
58 | #ifdef CONFIG_FSL_BOOKE | ||
59 | #include <asm/dbell.h> | ||
60 | #endif | ||
61 | 58 | ||
62 | #if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) | 59 | #if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) |
63 | int (*__debugger)(struct pt_regs *regs) __read_mostly; | 60 | int (*__debugger)(struct pt_regs *regs) __read_mostly; |
@@ -1342,24 +1339,6 @@ void vsx_assist_exception(struct pt_regs *regs) | |||
1342 | #endif /* CONFIG_VSX */ | 1339 | #endif /* CONFIG_VSX */ |
1343 | 1340 | ||
1344 | #ifdef CONFIG_FSL_BOOKE | 1341 | #ifdef CONFIG_FSL_BOOKE |
1345 | |||
1346 | void doorbell_exception(struct pt_regs *regs) | ||
1347 | { | ||
1348 | #ifdef CONFIG_SMP | ||
1349 | int cpu = smp_processor_id(); | ||
1350 | int msg; | ||
1351 | |||
1352 | if (num_online_cpus() < 2) | ||
1353 | return; | ||
1354 | |||
1355 | for (msg = 0; msg < 4; msg++) | ||
1356 | if (test_and_clear_bit(msg, &dbell_smp_message[cpu])) | ||
1357 | smp_message_recv(msg); | ||
1358 | #else | ||
1359 | printk(KERN_WARNING "Received doorbell on non-smp system\n"); | ||
1360 | #endif | ||
1361 | } | ||
1362 | |||
1363 | void CacheLockingException(struct pt_regs *regs, unsigned long address, | 1342 | void CacheLockingException(struct pt_regs *regs, unsigned long address, |
1364 | unsigned long error_code) | 1343 | unsigned long error_code) |
1365 | { | 1344 | { |