irqchip/dw-apb-ictl: Fix generic domain chip wreckage
authorThomas Gleixner <tglx@linutronix.de>
Mon, 6 Jul 2015 13:32:25 +0000 (15:32 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 11 Jul 2015 21:14:23 +0000 (23:14 +0200)
commitb66231183a8542de1414e42326dd1c6bc4af75f4
tree7f857d7181876b84ca9c0019d30be36dd4cae7b7
parentd6ac4ffc61ace6ed6f183e9fd7f207c0ddafb897
irqchip/dw-apb-ictl: Fix generic domain chip wreckage

The num_ct argument of irq_alloc_domain_generic_chips() tells the core
code how many chip types (for different control flows,
e.g. edge/level) should be allocated. It does not control how many
generic chip instances are created because that's determined from the
irq domain size and the number of interrupts per chip.

The dw-apb init abuses the num_ct argument for allocating one or two
chip types depending on the number of interrupts. That's completely
wrong because the alternate type is never used.

This code was obviously never tested on a system which has more than
32 interrupts as that would have never worked due to the unitialized
second generic chip instance.

Hand in the proper num_ct=1 and fixup the chip initialization along
with the interrupt handler.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Jisheng Zhang <jszhang@marvell.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/20150706101543.373582262@linutronix.de
drivers/irqchip/irq-dw-apb-ictl.c
This page took 0.025902 seconds and 5 git commands to generate.