Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275546
b: refs/heads/master
c: 72f3bea
h: refs/heads/master
v: v3
  • Loading branch information
Geoff Levand authored and Benjamin Herrenschmidt committed Nov 16, 2011
1 parent f8f4f9d commit 41ed7c8
Show file tree
Hide file tree
Showing 4 changed files with 26 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: de1d9248eadd27539eba449b4d09428252e80c04
refs/heads/master: 72f3bea075287785ed32b777b6dd2636aa7002e8
23 changes: 22 additions & 1 deletion trunk/arch/powerpc/platforms/ps3/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ struct ps3_private {
struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN)));
u64 ppe_id;
u64 thread_id;
unsigned long ipi_mask;
};

static DEFINE_PER_CPU(struct ps3_private, ps3_private);
Expand Down Expand Up @@ -144,7 +145,11 @@ static void ps3_chip_unmask(struct irq_data *d)
static void ps3_chip_eoi(struct irq_data *d)
{
const struct ps3_private *pd = irq_data_get_irq_chip_data(d);
lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, d->irq);

/* non-IPIs are EOIed here. */

if (!test_bit(63 - d->irq, &pd->ipi_mask))
lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, d->irq);
}

/**
Expand Down Expand Up @@ -691,6 +696,16 @@ void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)
cpu, virq, pd->bmp.ipi_debug_brk_mask);
}

void __init ps3_register_ipi_irq(unsigned int cpu, unsigned int virq)
{
struct ps3_private *pd = &per_cpu(ps3_private, cpu);

set_bit(63 - virq, &pd->ipi_mask);

DBG("%s:%d: cpu %u, virq %u, ipi_mask %lxh\n", __func__, __LINE__,
cpu, virq, pd->ipi_mask);
}

static unsigned int ps3_get_irq(void)
{
struct ps3_private *pd = &__get_cpu_var(ps3_private);
Expand Down Expand Up @@ -720,6 +735,12 @@ static unsigned int ps3_get_irq(void)
BUG();
}
#endif

/* IPIs are EOIed here. */

if (test_bit(63 - plug, &pd->ipi_mask))
lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, plug);

return plug;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/platforms/ps3/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ void ps3_mm_shutdown(void);
void ps3_init_IRQ(void);
void ps3_shutdown_IRQ(int cpu);
void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq);
void __init ps3_register_ipi_irq(unsigned int cpu, unsigned int virq);

/* smp */

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/powerpc/platforms/ps3/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ static void __init ps3_smp_setup_cpu(int cpu)

if (result)
virqs[i] = NO_IRQ;
else
ps3_register_ipi_irq(cpu, virqs[i]);
}

ps3_register_ipi_debug_brk(cpu, virqs[PPC_MSG_DEBUGGER_BREAK]);
Expand Down

0 comments on commit 41ed7c8

Please sign in to comment.