]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: aardvark: Add support for ERR interrupt on emulated bridge
authorPali Rohár <pali@kernel.org>
Wed, 4 May 2022 16:57:47 +0000 (18:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 May 2022 10:30:32 +0000 (12:30 +0200)
commit2e5bc6be5cf54705c3a4c7c4f5c06efdf7ad30a4
treeb32d755e6d8863335aa8b7d877cb397c8209fccf
parent499973c3f32340ec749bc746729bef9da0aabbf4
PCI: aardvark: Add support for ERR interrupt on emulated bridge

commit 6d7729adf9d05a0f4c664890c5aa4bca80b98362 upstream.

ERR interrupt is triggered when corresponding bit is unmasked in both ISR0
and PCI_EXP_DEVCTL registers. Unmasking ERR bits in PCI_EXP_DEVCTL register
is not enough. This means that currently the ERR interrupt is never
triggered.

Unmask ERR bits in ISR0 register at driver probe time. ERR interrupt is not
triggered until ERR bits are unmasked also in PCI_EXP_DEVCTL register,
which is done by AER driver. So it is safe to unconditionally unmask all
ERR bits in aardvark probe.

Aardvark HW sets PCI_ERR_ROOT_AER_IRQ to zero and when corresponding bits
in ISR0 and PCI_EXP_DEVCTL are enabled, the HW triggers a generic interrupt
on GIC. Chain this interrupt to PCIe interrupt 0 with
generic_handle_domain_irq() to allow processing of ERR interrupts.

Link: https://lore.kernel.org/r/20220110015018.26359-14-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/controller/pci-aardvark.c