[PATCH 1/3] kernel/irq: __handle_domain_irq() makes irq_enter/exit arch optional
Pingfan Liu
kernelfans at gmail.com
Sun Dec 13 21:25:50 EST 2020
Arches may implement their own counterpart of irq_enter/exit in the
frontend. Hence make the pair in __handle_domain_irq() arch optional
Signed-off-by: Pingfan Liu <kernelfans at gmail.com>
Cc: Catalin Marinas <catalin.marinas at arm.com>
Cc: Will Deacon <will at kernel.org>
Cc: Mark Rutland <mark.rutland at arm.com>
Cc: Marc Zyngier <maz at kernel.org>
Cc: Julien Thierry <julien.thierry at arm.com>
To: linux-arm-kernel at lists.infradead.org
---
kernel/irq/Kconfig | 4 ++++
kernel/irq/irqdesc.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig
index 164a031cfdb6..f17a9c8771c1 100644
--- a/kernel/irq/Kconfig
+++ b/kernel/irq/Kconfig
@@ -100,6 +100,10 @@ config IRQ_MSI_IOMMU
config HANDLE_DOMAIN_IRQ
bool
+config ARCH_HAS_IRQENTRY_ENTER
+ bool
+ select HANDLE_DOMAIN_IRQ
+
config IRQ_TIMINGS
bool
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 1a7723604399..77819e489f9b 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -669,7 +669,9 @@ int __handle_domain_irq(struct irq_domain *domain, unsigned int hwirq,
unsigned int irq = hwirq;
int ret = 0;
+#ifndef CONFIG_ARCH_HAS_IRQENTRY_ENTER
irq_enter();
+#endif
#ifdef CONFIG_IRQ_DOMAIN
if (lookup)
@@ -687,7 +689,9 @@ int __handle_domain_irq(struct irq_domain *domain, unsigned int hwirq,
generic_handle_irq(irq);
}
+#ifndef CONFIG_ARCH_HAS_IRQENTRY_ENTER
irq_exit();
+#endif
set_irq_regs(old_regs);
return ret;
}
--
2.29.2
More information about the linux-arm-kernel
mailing list