[lkml]   [2020]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 3/6] irqchip: Introduce IRQCHIP_HYBRID_DRIVER_{BEGIN,END} macros
Although we are trying to move to a world where a large number
of irqchip drivers can safely be built as platform drivers
the reality is that most endpoint drivers are not ready for that,
and will fail to probe as they expect their interrupt controller
to be up and running.

A halfway house solution is to let the driver indicate that if
it is built-in (i.e. not a module), then it must use the earily
probe mechanism, IRQCHIP_DECLARE() style. Otherwise, it is a
normal module implemenenting a platform driver, and we can
fallback to the existing code.

Hopefully we'll one day be able to drop this code altogether,
but that's not for tomorrow.

Signed-off-by: Marc Zyngier <>
include/linux/irqchip.h | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h
index f8f25e9f8200..31fc9d00101f 100644
--- a/include/linux/irqchip.h
+++ b/include/linux/irqchip.h
@@ -50,6 +50,18 @@ static struct platform_driver drv_name##_driver = { \
}; \

+#ifdef MODULE
+ _OF_DECLARE_ARRAY_START(irqchip, drv)
* This macro must be used by the different irqchip drivers to declare
* the association between their version and their initialization function.
 \ /
  Last update: 2020-09-12 14:53    [W:0.173 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site