Commit 09b83193 authored by Pali Rohár's avatar Pali Rohár Committed by Yuntao Liu
Browse files

irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1

stable inclusion
from stable-v4.19.322
commit 1d755d4fb238315c3b3e50e6f3117a0d79f72c29
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IATEDW

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1d755d4fb238315c3b3e50e6f3117a0d79f72c29



--------------------------------

[ Upstream commit 3cef738208e5c3cb7084e208caf9bbf684f24feb ]

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: default avatarPali Rohár <pali@kernel.org>
Signed-off-by: default avatarMarek Behún <kabel@kernel.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYuntao Liu <liuyuntao12@huawei.com>
parent 1b137b21
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -350,6 +350,10 @@ static struct irq_chip armada_370_xp_irq_chip = {
static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
				      unsigned int virq, irq_hw_number_t hw)
{
	/* IRQs 0 and 1 cannot be mapped, they are handled internally */
	if (hw <= 1)
		return -EINVAL;

	armada_370_xp_irq_mask(irq_get_irq_data(virq));
	if (!is_percpu_irq(hw))
		writel(hw, per_cpu_int_base +