From: Pingfan Liu <kernelfans@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Mark Rutland <mark.rutland@arm.com>,
Julien Thierry <julien.thierry@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Pingfan Liu <kernelfans@gmail.com>, Marc Zyngier <maz@kernel.org>,
Will Deacon <will@kernel.org>
Subject: [PATCH 1/3] kernel/irq: __handle_domain_irq() makes irq_enter/exit arch optional
Date: Mon, 14 Dec 2020 10:25:50 +0800 [thread overview]
Message-ID: <1607912752-12481-1-git-send-email-kernelfans@gmail.com> (raw)
In-Reply-To: <CAFgQCTvLud2qOWfSDK_HbKwid-2uLPDA_Uz-iTQzBYiWwqJX5Q@mail.gmail.com>
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@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Julien Thierry <julien.thierry@arm.com>
To: linux-arm-kernel@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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-12-14 2:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 13:14 [PATCH] arm64/irq: use NMI to send stop IPI Pingfan Liu
2020-12-08 14:04 ` Marc Zyngier
2020-12-14 2:20 ` Pingfan Liu
2020-12-14 2:25 ` Pingfan Liu [this message]
2020-12-14 2:25 ` [PATCH 2/3] arm64/irq-gic-v3: make gic_handle_irq() cope with enter_from_kernel_mode() Pingfan Liu
2020-12-14 2:25 ` [PATCH 3/3] arm64/irq-gic-v3: make reschedule-ipi light weight Pingfan Liu
2020-12-14 9:46 ` [PATCH] arm64/irq: use NMI to send stop IPI Marc Zyngier
2020-12-14 13:04 ` Pingfan Liu
2020-12-14 13:24 ` Marc Zyngier
2020-12-15 5:40 ` Pingfan Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1607912752-12481-1-git-send-email-kernelfans@gmail.com \
--to=kernelfans@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=julien.thierry@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.