Skip to content

Commit 3cef738

Browse files
paliKAGA-KOKO
authored andcommitted
irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1
IRQs 0 (IPI) and 1 (MSI) are handled internally by this driver, generic_handle_domain_irq() is never called for these IRQs. Disallow mapping these IRQs. [ Marek: changed commit message ] Signed-off-by: Pali Rohár <[email protected]> Signed-off-by: Marek Behún <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Andrew Lunn <[email protected]>
1 parent 50c4344 commit 3cef738

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/irqchip/irq-armada-370-xp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,10 @@ static struct irq_chip armada_370_xp_irq_chip = {
560560
static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
561561
unsigned int virq, irq_hw_number_t hw)
562562
{
563+
/* IRQs 0 and 1 cannot be mapped, they are handled internally */
564+
if (hw <= 1)
565+
return -EINVAL;
566+
563567
armada_370_xp_irq_mask(irq_get_irq_data(virq));
564568
if (!is_percpu_irq(hw))
565569
writel(hw, per_cpu_int_base +

0 commit comments

Comments
 (0)