lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200912125148.1271481-4-maz@kernel.org>
Date:   Sat, 12 Sep 2020 13:51:45 +0100
From:   Marc Zyngier <maz@...nel.org>
To:     devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Cc:     Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Frank Wunderlich <linux@...web.de>,
        John Stultz <john.stultz@...aro.org>,
        Saravana Kannan <saravanak@...gle.com>,
        Hanks Chen <hanks.chen@...iatek.com>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Jason Cooper <jason@...edaemon.net>,
        Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>, kernel-team@...roid.com
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 <maz@...nel.org>
---
 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 = {		\
 };									\
 builtin_platform_driver(drv_name##_driver)
 
+#ifdef MODULE
+#define IRQCHIP_HYBRID_DRIVER_BEGIN(drv)	\
+	IRQCHIP_PLATFORM_DRIVER_BEGIN(drv)
+#define IRQCHIP_HYBRID_DRIVER_END(drv)		\
+	IRQCHIP_PLATFORM_DRIVER_END(drv)
+#else
+#define IRQCHIP_HYBRID_DRIVER_BEGIN(drv)	\
+	_OF_DECLARE_ARRAY_START(irqchip, drv)
+#define IRQCHIP_HYBRID_DRIVER_END(drv)		\
+	_OF_DECLARE_ARRAY_END;
+#endif
+
 /*
  * This macro must be used by the different irqchip drivers to declare
  * the association between their version and their initialization function.
-- 
2.28.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ