Skip to contentSkip to conversation

ARM: Remove open-coded version of IRQCHIP_DECLARE

PATCH New Marc Zyngier 6 participants 7 messages Oct 2, 2015 – Oct 13, 2015

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: Remove open-coded version of IRQCHIP_DECLARE

Now that the IRQCHIP_DECLARE macro has been moved to linux/irqchip.h, it becomes possible to cleanup the open-coded versions of the same macro that have been added to some private irqchips implementations.

Cc Kukjin Kim <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Tony Lindgren <[email protected]>
---
 arch/arm/mach-exynos/suspend.c       | 3 ++-
 arch/arm/mach-imx/gpc.c              | 8 ++------
 arch/arm/mach-omap2/omap-wakeupgen.c | 8 ++------
 3 files changed, 6 insertions(+), 13 deletions(-)
arch/arm/mach-exynos/suspend.c +2 -1
index e00eb39..dfb1fcf 100644
@@ -19,6 +19,7 @@
 #include <linux/cpu_pm.h>
 #include <linux/io.h>
 #include <linux/irq.h>
+#include <linux/irqchip.h>
 #include <linux/irqdomain.h>
 #include <linux/of_address.h>
 #include <linux/err.h>
@@ -262,7 +263,7 @@ static int __init exynos_pmu_irq_init(struct device_node *node,
 	return 0;
 }
 
-#define EXYNOS_PMU_IRQ(symbol, name)	OF_DECLARE_2(irqchip, symbol, name, exynos_pmu_irq_init)
+#define EXYNOS_PMU_IRQ(symbol, name)	IRQCHIP_DECLARE(symbol, name, exynos_pmu_irq_init)
 
 EXYNOS_PMU_IRQ(exynos3250_pmu_irq, "samsung,exynos3250-pmu");
 EXYNOS_PMU_IRQ(exynos4210_pmu_irq, "samsung,exynos4210-pmu");
arch/arm/mach-imx/gpc.c +2 -6
index 8c4467f..f2783b0 100644
@@ -14,6 +14,7 @@
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/irq.h>
+#include <linux/irqchip.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
@@ -268,12 +269,7 @@ static int __init imx_gpc_init(struct device_node *node,
 
 	return 0;
 }
-
-/*
- * We cannot use the IRQCHIP_DECLARE macro that lives in
- * drivers/irqchip, so we're forced to roll our own. Not very nice.
- */
-OF_DECLARE_2(irqchip, imx_gpc, "fsl,imx6q-gpc", imx_gpc_init);
+IRQCHIP_DECLARE(imx_gpc, "fsl,imx6q-gpc", imx_gpc_init);
 
 void __init imx_gpc_check_dt(void)
 {
arch/arm/mach-omap2/omap-wakeupgen.c +2 -6
index e1d2e99..0f8c1d1 100644
@@ -20,6 +20,7 @@
 #include <linux/init.h>
 #include <linux/io.h>
 #include <linux/irq.h>
+#include <linux/irqchip.h>
 #include <linux/irqdomain.h>
 #include <linux/of_address.h>
 #include <linux/platform_device.h>
@@ -537,9 +538,4 @@ static int __init wakeupgen_init(struct device_node *node,
 
 	return 0;
 }
-
-/*
- * We cannot use the IRQCHIP_DECLARE macro that lives in
- * drivers/irqchip, so we're forced to roll our own. Not very nice.
- */
-OF_DECLARE_2(irqchip, ti_wakeupgen, "ti,omap4-wugen-mpu", wakeupgen_init);
+IRQCHIP_DECLARE(ti_wakeupgen, "ti,omap4-wugen-mpu", wakeupgen_init);
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 ARM: Remove open-coded version of IRQCHIP_DECLARE

Quoted 4 lines · Marc Zyngier

Now that the IRQCHIP_DECLARE macro has been moved to linux/irqchip.h, it becomes possible to cleanup the open-coded versions of the same macro that have been added to some private irqchips implementations.

Quoted 8 lines
Cc Kukjin Kim <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Tony Lindgren <[email protected]>
---
 arch/arm/mach-exynos/suspend.c       | 3 ++-

I guess you want to push it through the tip tree? If yes, then for Samsung:

(if not then please split it per mach)

Best regards,
Krzysztof

Quoted 4 lines
 arch/arm/mach-imx/gpc.c              | 8 ++------
 arch/arm/mach-omap2/omap-wakeupgen.c | 8 ++------
 3 files changed, 6 insertions(+), 13 deletions(-)
#2 lore raw

PATCH 1/1 ARM: Remove open-coded version of IRQCHIP_DECLARE

Quoted 14 lines · Krzysztof Kozlowski
Quoted 4 lines · Marc Zyngier

Now that the IRQCHIP_DECLARE macro has been moved to linux/irqchip.h, it becomes possible to cleanup the open-coded versions of the same macro that have been added to some private irqchips implementations.

Quoted 8 lines
Cc Kukjin Kim <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Tony Lindgren <[email protected]>
---
 arch/arm/mach-exynos/suspend.c       | 3 ++-
Quoted 4 lines

I guess you want to push it through the tip tree? If yes, then for Samsung:

(if not then please split it per mach)

I was more angling to have it directly picked up via arm-soc. But otherwise yes, I can get it merged via tip if everyone agrees to it.

Splitting it per platform is a waste of time.

Thanks,

	M.
Signature · 1 line
Jazz is not dead. It just smells funny...
#3 lore raw

PATCH 1/1 ARM: Remove open-coded version of IRQCHIP_DECLARE

In reply to Marc Zyngier
Quoted 11 lines · Marc Zyngier

Now that the IRQCHIP_DECLARE macro has been moved to linux/irqchip.h, it becomes possible to cleanup the open-coded versions of the same macro that have been added to some private irqchips implementations.

Cc Kukjin Kim <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Tony Lindgren <[email protected]>

---

...

Quoted 1 line
 arch/arm/mach-imx/gpc.c              | 8 ++------
#4 lore raw

PATCH 1/1 ARM: Remove open-coded version of IRQCHIP_DECLARE

In reply to Marc Zyngier
Quoted 5 lines · Marc Zyngier

Now that the IRQCHIP_DECLARE macro has been moved to linux/irqchip.h, it becomes possible to cleanup the open-coded versions of the same macro that have been added to some private irqchips implementations.

Cc Kukjin Kim <[email protected]>

Thanks,
Kukjin

Quoted 32 lines
Cc Krzysztof Kozlowski <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Tony Lindgren <[email protected]>
---
 arch/arm/mach-exynos/suspend.c       | 3 ++-
 arch/arm/mach-imx/gpc.c              | 8 ++------
 arch/arm/mach-omap2/omap-wakeupgen.c | 8 ++------
 3 files changed, 6 insertions(+), 13 deletions(-)
arch/arm/mach-exynos/suspend.c +2 -1
index e00eb39..dfb1fcf 100644
@@ -19,6 +19,7 @@
 #include <linux/cpu_pm.h>
 #include <linux/io.h>
 #include <linux/irq.h>
+#include <linux/irqchip.h>
 #include <linux/irqdomain.h>
 #include <linux/of_address.h>
 #include <linux/err.h>
@@ -262,7 +263,7 @@ static int __init exynos_pmu_irq_init(struct device_node *node,
 	return 0;
 }
 
-#define EXYNOS_PMU_IRQ(symbol, name)	OF_DECLARE_2(irqchip, symbol, name, exynos_pmu_irq_init)
+#define EXYNOS_PMU_IRQ(symbol, name)	IRQCHIP_DECLARE(symbol, name, exynos_pmu_irq_init)
 
 EXYNOS_PMU_IRQ(exynos3250_pmu_irq, "samsung,exynos3250-pmu");
 EXYNOS_PMU_IRQ(exynos4210_pmu_irq, "samsung,exynos4210-pmu");

[...]

maintainer
#5 lore raw

PATCH 1/1 ARM: Remove open-coded version of IRQCHIP_DECLARE

In reply to Marc Zyngier
Quoted 10 lines · Marc Zyngier

Now that the IRQCHIP_DECLARE macro has been moved to linux/irqchip.h, it becomes possible to cleanup the open-coded versions of the same macro that have been added to some private irqchips implementations.

Cc Kukjin Kim <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Tony Lindgren <[email protected]>

For omap:

#6 lore raw

PATCH 1/1 ARM: Remove open-coded version of IRQCHIP_DECLARE

In reply to Marc Zyngier
Quoted 11 lines · Marc Zyngier <marc.zyngier <at> arm.com> writes:

Now that the IRQCHIP_DECLARE macro has been moved to linux/irqchip.h, it becomes possible to cleanup the open-coded versions of the same macro that have been added to some private irqchips implementations.

Cc Kukjin Kim <kgene <at> kernel.org>
Cc Krzysztof Kozlowski <k.kozlowski <at> samsung.com>
Cc Shawn Guo <shawnguo <at> kernel.org>
Cc Sascha Hauer <kernel <at> pengutronix.de>
Cc Tony Lindgren <tony <at> atomide.com>
Signed-off-by Marc Zyngier <marc.zyngier <at> arm.com>
Quoted 5 lines
---
 arch/arm/mach-exynos/suspend.c       | 3 ++-
 arch/arm/mach-imx/gpc.c              | 8 ++------
 arch/arm/mach-omap2/omap-wakeupgen.c | 8 ++------
 3 files changed, 6 insertions(+), 13 deletions(-)

I had suggested the same patch a few months ago
(https://lkml.org/lkml/2015/7/7/1069) but without success although it had been acked by everybody :/
I didn't know how to have it pushed all at once...

Thanks,
Jo?l