Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204709
b: refs/heads/master
c: e3145b3
h: refs/heads/master
i:
  204707: a9313a3
v: v3
  • Loading branch information
Benjamin Herrenschmidt committed Jul 9, 2010
1 parent 69b9e07 commit 96dd727
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a2e198116f97bb1cd5b37ff33a8cfdfb4010cf5b
refs/heads/master: e3145b387a02d4bf8b8033b1354d413fc0864494
22 changes: 21 additions & 1 deletion trunk/arch/powerpc/kernel/dbell.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,24 @@ void smp_dbell_message_pass(int target, int msg)
ppc_msgsnd(PPC_DBELL, PPC_DBELL_MSG_BRDCAST, 0);
}
}
#endif

void doorbell_exception(struct pt_regs *regs)
{
int cpu = smp_processor_id();
int msg;

if (num_online_cpus() < 2)
return;

for (msg = 0; msg < 4; msg++)
if (test_and_clear_bit(msg, &dbell_smp_message[cpu]))
smp_message_recv(msg);
}

#else /* CONFIG_SMP */
void doorbell_exception(struct pt_regs *regs)
{
printk(KERN_WARNING "Received doorbell on non-smp system\n");
}
#endif /* CONFIG_SMP */

21 changes: 0 additions & 21 deletions trunk/arch/powerpc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@
#endif
#include <asm/kexec.h>
#include <asm/ppc-opcode.h>
#ifdef CONFIG_FSL_BOOKE
#include <asm/dbell.h>
#endif

#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
int (*__debugger)(struct pt_regs *regs) __read_mostly;
Expand Down Expand Up @@ -1342,24 +1339,6 @@ void vsx_assist_exception(struct pt_regs *regs)
#endif /* CONFIG_VSX */

#ifdef CONFIG_FSL_BOOKE

void doorbell_exception(struct pt_regs *regs)
{
#ifdef CONFIG_SMP
int cpu = smp_processor_id();
int msg;

if (num_online_cpus() < 2)
return;

for (msg = 0; msg < 4; msg++)
if (test_and_clear_bit(msg, &dbell_smp_message[cpu]))
smp_message_recv(msg);
#else
printk(KERN_WARNING "Received doorbell on non-smp system\n");
#endif
}

void CacheLockingException(struct pt_regs *regs, unsigned long address,
unsigned long error_code)
{
Expand Down

0 comments on commit 96dd727

Please sign in to comment.