diff options
author | Milton Miller <miltonm@bga.com> | 2011-05-10 15:30:33 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-05-19 01:31:57 -0400 |
commit | 9553361499f9f9e8ca8c9dae2e103f651fa48217 (patch) | |
tree | bb96161231f4ff21805491238306f220c34cf99c /arch/powerpc/platforms/cell/axon_msi.c | |
parent | 6b0aea44d6b36b52010d206be69ce37c2f4f1bd1 (diff) |
powerpc/axon_msi: Validate msi irq via chip_data
Instead of checking for rogue msi numbers via the irq_map host field
set the chip_data to h.host_data (which is the msic struct pointer)
at map and compare it in get_irq.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/axon_msi.c')
-rw-r--r-- | arch/powerpc/platforms/cell/axon_msi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c index 1e3329e8578b..ac06903e136a 100644 --- a/arch/powerpc/platforms/cell/axon_msi.c +++ b/arch/powerpc/platforms/cell/axon_msi.c | |||
@@ -113,7 +113,7 @@ static void axon_msi_cascade(unsigned int irq, struct irq_desc *desc) | |||
113 | pr_devel("axon_msi: woff %x roff %x msi %x\n", | 113 | pr_devel("axon_msi: woff %x roff %x msi %x\n", |
114 | write_offset, msic->read_offset, msi); | 114 | write_offset, msic->read_offset, msi); |
115 | 115 | ||
116 | if (msi < NR_IRQS && virq_to_host(msi) == msic->irq_host) { | 116 | if (msi < NR_IRQS && irq_get_chip_data(msi) == msic) { |
117 | generic_handle_irq(msi); | 117 | generic_handle_irq(msi); |
118 | msic->fifo_virt[idx] = cpu_to_le32(0xffffffff); | 118 | msic->fifo_virt[idx] = cpu_to_le32(0xffffffff); |
119 | } else { | 119 | } else { |
@@ -320,6 +320,7 @@ static struct irq_chip msic_irq_chip = { | |||
320 | static int msic_host_map(struct irq_host *h, unsigned int virq, | 320 | static int msic_host_map(struct irq_host *h, unsigned int virq, |
321 | irq_hw_number_t hw) | 321 | irq_hw_number_t hw) |
322 | { | 322 | { |
323 | irq_set_chip_data(virq, h->host_data); | ||
323 | irq_set_chip_and_handler(virq, &msic_irq_chip, handle_simple_irq); | 324 | irq_set_chip_and_handler(virq, &msic_irq_chip, handle_simple_irq); |
324 | 325 | ||
325 | return 0; | 326 | return 0; |