Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204713
b: refs/heads/master
c: 0e37d25
h: refs/heads/master
i:
  204711: 91f0190
v: v3
  • Loading branch information
David Gibson authored and Benjamin Herrenschmidt committed Jul 9, 2010
1 parent 2fe24c1 commit 4d3d012
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: 89c81797d4a0779a957f4ea1f0c676cda203615b
refs/heads/master: 0e37d25950f4fd5a7d74723e6ce608aaa972d24c
7 changes: 6 additions & 1 deletion trunk/arch/powerpc/kernel/dbell.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/percpu.h>

#include <asm/dbell.h>
#include <asm/irq_regs.h>

#ifdef CONFIG_SMP
struct doorbell_cpu_info {
Expand Down Expand Up @@ -63,17 +64,21 @@ void doorbell_message_pass(int target, int msg)

void doorbell_exception(struct pt_regs *regs)
{
struct pt_regs *old_regs = set_irq_regs(regs);
struct doorbell_cpu_info *info = &__get_cpu_var(doorbell_cpu_info);
int msg;

/* Warning: regs can be NULL when called from irq enable */

if (!info->messages || (num_online_cpus() < 2))
return;
goto out;

for (msg = 0; msg < 4; msg++)
if (test_and_clear_bit(msg, &info->messages))
smp_message_recv(msg);

out:
set_irq_regs(old_regs);
}

#else /* CONFIG_SMP */
Expand Down

0 comments on commit 4d3d012

Please sign in to comment.