linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: Remove boilerplate irqchip_init code
@ 2013-03-28  9:41 Maxime Ripard
  2013-03-28  9:41 ` [PATCH 1/2] ARM: irq: Call irqchit_init if no init_irq function is specified Maxime Ripard
  2013-03-28  9:41 ` [PATCH 2/2] ARM: remove mach .init_irq for irqchip_init users Maxime Ripard
  0 siblings, 2 replies; 17+ messages in thread
From: Maxime Ripard @ 2013-03-28  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

The introduction of the irqchip architecture has made possible to define
a central common function, irqchip_init, as our .init_irq callback in the
machine_desc structure.

We actually see more and more sub-architectures using only the irqchip_init
as their init_irq function, so in order to remove some boilerplate code,
this patchset makes the ARM core to call irqchip_init if no function has
been specified in the init_irq machine_desc field.

This has been tested on the sunxi platform, on top of the cleanup patches,and
it is based on the current arm-soc/for-next branch.

Maxime Ripard (2):
  ARM: irq: Call irqchit_init if no init_irq function is specified
  ARM: remove mach .init_irq for irqchip_init users

 arch/arm/kernel/irq.c                          |    6 +++++-
 arch/arm/mach-bcm/board_bcm.c                  |    1 -
 arch/arm/mach-msm/board-dt-8660.c              |    1 -
 arch/arm/mach-msm/board-dt-8960.c              |    1 -
 arch/arm/mach-nomadik/cpu-8815.c               |    1 -
 arch/arm/mach-picoxcell/common.c               |    1 -
 arch/arm/mach-prima2/common.c                  |    1 -
 arch/arm/mach-shmobile/board-kzm9g-reference.c |    1 -
 arch/arm/mach-shmobile/setup-emev2.c           |    1 -
 arch/arm/mach-shmobile/setup-sh73a0.c          |    1 -
 arch/arm/mach-spear/spear1310.c                |    1 -
 arch/arm/mach-spear/spear1340.c                |    1 -
 arch/arm/mach-spear/spear300.c                 |    1 -
 arch/arm/mach-spear/spear310.c                 |    1 -
 arch/arm/mach-spear/spear320.c                 |    1 -
 arch/arm/mach-spear/spear6xx.c                 |    1 -
 arch/arm/mach-vexpress/v2m.c                   |    1 -
 arch/arm/mach-virt/virt.c                      |    1 -
 arch/arm/mach-zynq/common.c                    |    1 -
 19 files changed, 5 insertions(+), 19 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/2] ARM: irq: Call irqchit_init if no init_irq function is specified
  2013-03-28  9:41 [PATCH 0/2] ARM: Remove boilerplate irqchip_init code Maxime Ripard
@ 2013-03-28  9:41 ` Maxime Ripard
  2013-03-28 14:48   ` Rob Herring
  2013-03-28  9:41 ` [PATCH 2/2] ARM: remove mach .init_irq for irqchip_init users Maxime Ripard
  1 sibling, 1 reply; 17+ messages in thread
From: Maxime Ripard @ 2013-03-28  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

More and more sub-architectures are using only the irqchip_init
function. Make the core code call this function if no init_irq field is
provided in the machine description to remove some boilerplate code.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/kernel/irq.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 8e4ef4c..df6f9a1 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -26,6 +26,7 @@
 #include <linux/ioport.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/irqchip.h>
 #include <linux/random.h>
 #include <linux/smp.h>
 #include <linux/init.h>
@@ -114,7 +115,10 @@ EXPORT_SYMBOL_GPL(set_irq_flags);
 
 void __init init_IRQ(void)
 {
-	machine_desc->init_irq();
+	if (machine_desc->init_irq)
+		machine_desc->init_irq();
+	else
+		irqchip_init();
 }
 
 #ifdef CONFIG_MULTI_IRQ_HANDLER
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/2] ARM: remove mach .init_irq for irqchip_init users
  2013-03-28  9:41 [PATCH 0/2] ARM: Remove boilerplate irqchip_init code Maxime Ripard
  2013-03-28  9:41 ` [PATCH 1/2] ARM: irq: Call irqchit_init if no init_irq function is specified Maxime Ripard
@ 2013-03-28  9:41 ` Maxime Ripard
  2013-03-28 12:42   ` Simon Horman
  1 sibling, 1 reply; 17+ messages in thread
From: Maxime Ripard @ 2013-03-28  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

Now that the arm core code calls irqchip_init, we can remove it from all
the machines that were using it.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/mach-bcm/board_bcm.c                  |    1 -
 arch/arm/mach-msm/board-dt-8660.c              |    1 -
 arch/arm/mach-msm/board-dt-8960.c              |    1 -
 arch/arm/mach-nomadik/cpu-8815.c               |    1 -
 arch/arm/mach-picoxcell/common.c               |    1 -
 arch/arm/mach-prima2/common.c                  |    1 -
 arch/arm/mach-shmobile/board-kzm9g-reference.c |    1 -
 arch/arm/mach-shmobile/setup-emev2.c           |    1 -
 arch/arm/mach-shmobile/setup-sh73a0.c          |    1 -
 arch/arm/mach-spear/spear1310.c                |    1 -
 arch/arm/mach-spear/spear1340.c                |    1 -
 arch/arm/mach-spear/spear300.c                 |    1 -
 arch/arm/mach-spear/spear310.c                 |    1 -
 arch/arm/mach-spear/spear320.c                 |    1 -
 arch/arm/mach-spear/spear6xx.c                 |    1 -
 arch/arm/mach-vexpress/v2m.c                   |    1 -
 arch/arm/mach-virt/virt.c                      |    1 -
 arch/arm/mach-zynq/common.c                    |    1 -
 18 files changed, 18 deletions(-)

diff --git a/arch/arm/mach-bcm/board_bcm.c b/arch/arm/mach-bcm/board_bcm.c
index f0f9aba..4c819e2 100644
--- a/arch/arm/mach-bcm/board_bcm.c
+++ b/arch/arm/mach-bcm/board_bcm.c
@@ -34,7 +34,6 @@ static void __init board_init(void)
 static const char * const bcm11351_dt_compat[] = { "bcm,bcm11351", NULL, };
 
 DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor")
-	.init_irq = irqchip_init,
 	.init_time = timer_init,
 	.init_machine = board_init,
 	.dt_compat = bcm11351_dt_compat,
diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c
index 7dcfc53..1360226 100644
--- a/arch/arm/mach-msm/board-dt-8660.c
+++ b/arch/arm/mach-msm/board-dt-8660.c
@@ -44,7 +44,6 @@ static const char *msm8x60_fluid_match[] __initdata = {
 DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
 	.smp = smp_ops(msm_smp_ops),
 	.map_io = msm_map_msm8x60_io,
-	.init_irq = irqchip_init,
 	.init_machine = msm8x60_dt_init,
 	.init_late = msm8x60_init_late,
 	.init_time	= msm_dt_timer_init,
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt-8960.c
index 7301936..1e8eb1d 100644
--- a/arch/arm/mach-msm/board-dt-8960.c
+++ b/arch/arm/mach-msm/board-dt-8960.c
@@ -31,7 +31,6 @@ static const char * const msm8960_dt_match[] __initconst = {
 DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")
 	.smp = smp_ops(msm_smp_ops),
 	.map_io = msm_map_msm8960_io,
-	.init_irq = irqchip_init,
 	.init_time	= msm_dt_timer_init,
 	.init_machine = msm_dt_init,
 	.dt_compat = msm8960_dt_match,
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 59f6ff5..3d43f95 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -323,7 +323,6 @@ static const char * cpu8815_board_compat[] = {
 
 DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815")
 	.map_io		= cpu8815_map_io,
-	.init_irq	= irqchip_init,
 	.init_time	= cpu8815_timer_init_of,
 	.init_machine	= cpu8815_init_of,
 	.restart	= cpu8815_restart,
diff --git a/arch/arm/mach-picoxcell/common.c b/arch/arm/mach-picoxcell/common.c
index 70b441a..b444947 100644
--- a/arch/arm/mach-picoxcell/common.c
+++ b/arch/arm/mach-picoxcell/common.c
@@ -87,7 +87,6 @@ static void picoxcell_wdt_restart(char mode, const char *cmd)
 DT_MACHINE_START(PICOXCELL, "Picochip picoXcell")
 	.map_io		= picoxcell_map_io,
 	.nr_irqs	= NR_IRQS_LEGACY,
-	.init_irq	= irqchip_init,
 	.init_time	= dw_apb_timer_init,
 	.init_machine	= picoxcell_init_machine,
 	.dt_compat	= picoxcell_dt_match,
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c
index 72efb4f..efdfc32 100644
--- a/arch/arm/mach-prima2/common.c
+++ b/arch/arm/mach-prima2/common.c
@@ -90,7 +90,6 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
 	/* Maintainer: Barry Song <baohua.song@csr.com> */
 	.smp            = smp_ops(sirfsoc_smp_ops),
 	.map_io         = sirfsoc_map_io,
-	.init_irq	= irqchip_init,
 	.init_time	= sirfsoc_marco_timer_init,
 	.init_machine	= sirfsoc_mach_init,
 	.init_late	= sirfsoc_init_late,
diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
index aefa50d..eaec498 100644
--- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
+++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c
@@ -100,7 +100,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g-reference")
 	.map_io		= sh73a0_map_io,
 	.init_early	= sh73a0_init_delay,
 	.nr_irqs	= NR_IRQS_LEGACY,
-	.init_irq	= irqchip_init,
 	.init_machine	= kzm_init,
 	.init_time	= shmobile_timer_init,
 	.dt_compat	= kzm9g_boards_compat_dt,
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
index e4545c1..36d1ac7 100644
--- a/arch/arm/mach-shmobile/setup-emev2.c
+++ b/arch/arm/mach-shmobile/setup-emev2.c
@@ -454,7 +454,6 @@ DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
 	.smp		= smp_ops(emev2_smp_ops),
 	.init_early	= emev2_init_delay,
 	.nr_irqs	= NR_IRQS_LEGACY,
-	.init_irq	= irqchip_init,
 	.init_machine	= emev2_add_standard_devices_dt,
 	.init_time	= shmobile_timer_init,
 	.dt_compat	= emev2_boards_compat_dt,
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index e8cd93a..ad13508 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -1035,7 +1035,6 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
 	.map_io		= sh73a0_map_io,
 	.init_early	= sh73a0_init_delay,
 	.nr_irqs	= NR_IRQS_LEGACY,
-	.init_irq	= irqchip_init,
 	.init_machine	= sh73a0_add_standard_devices_dt,
 	.init_time	= shmobile_timer_init,
 	.dt_compat	= sh73a0_boards_compat_dt,
diff --git a/arch/arm/mach-spear/spear1310.c b/arch/arm/mach-spear/spear1310.c
index ed3b5c2..673783f 100644
--- a/arch/arm/mach-spear/spear1310.c
+++ b/arch/arm/mach-spear/spear1310.c
@@ -88,7 +88,6 @@ static void __init spear1310_map_io(void)
 DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree")
 	.smp		=	smp_ops(spear13xx_smp_ops),
 	.map_io		=	spear1310_map_io,
-	.init_irq	=	irqchip_init,
 	.init_time	=	spear13xx_timer_init,
 	.init_machine	=	spear1310_dt_init,
 	.restart	=	spear_restart,
diff --git a/arch/arm/mach-spear/spear1340.c b/arch/arm/mach-spear/spear1340.c
index 75e3864..ea78f93 100644
--- a/arch/arm/mach-spear/spear1340.c
+++ b/arch/arm/mach-spear/spear1340.c
@@ -185,7 +185,6 @@ static const char * const spear1340_dt_board_compat[] = {
 DT_MACHINE_START(SPEAR1340_DT, "ST SPEAr1340 SoC with Flattened Device Tree")
 	.smp		=	smp_ops(spear13xx_smp_ops),
 	.map_io		=	spear13xx_map_io,
-	.init_irq	=	irqchip_init,
 	.init_time	=	spear13xx_timer_init,
 	.init_machine	=	spear1340_dt_init,
 	.restart	=	spear_restart,
diff --git a/arch/arm/mach-spear/spear300.c b/arch/arm/mach-spear/spear300.c
index bac56e8..185b9ba 100644
--- a/arch/arm/mach-spear/spear300.c
+++ b/arch/arm/mach-spear/spear300.c
@@ -212,7 +212,6 @@ static void __init spear300_map_io(void)
 
 DT_MACHINE_START(SPEAR300_DT, "ST SPEAr300 SoC with Flattened Device Tree")
 	.map_io		=	spear300_map_io,
-	.init_irq	=	irqchip_init,
 	.init_time	=	spear3xx_timer_init,
 	.init_machine	=	spear300_dt_init,
 	.restart	=	spear_restart,
diff --git a/arch/arm/mach-spear/spear310.c b/arch/arm/mach-spear/spear310.c
index 6ffbc63..ebc07e6 100644
--- a/arch/arm/mach-spear/spear310.c
+++ b/arch/arm/mach-spear/spear310.c
@@ -254,7 +254,6 @@ static void __init spear310_map_io(void)
 
 DT_MACHINE_START(SPEAR310_DT, "ST SPEAr310 SoC with Flattened Device Tree")
 	.map_io		=	spear310_map_io,
-	.init_irq	=	irqchip_init,
 	.init_time	=	spear3xx_timer_init,
 	.init_machine	=	spear310_dt_init,
 	.restart	=	spear_restart,
diff --git a/arch/arm/mach-spear/spear320.c b/arch/arm/mach-spear/spear320.c
index 6eb3eec..1fa4929 100644
--- a/arch/arm/mach-spear/spear320.c
+++ b/arch/arm/mach-spear/spear320.c
@@ -269,7 +269,6 @@ static void __init spear320_map_io(void)
 
 DT_MACHINE_START(SPEAR320_DT, "ST SPEAr320 SoC with Flattened Device Tree")
 	.map_io		=	spear320_map_io,
-	.init_irq	=	irqchip_init,
 	.init_time	=	spear3xx_timer_init,
 	.init_machine	=	spear320_dt_init,
 	.restart	=	spear_restart,
diff --git a/arch/arm/mach-spear/spear6xx.c b/arch/arm/mach-spear/spear6xx.c
index ec8eefb..0359f2e 100644
--- a/arch/arm/mach-spear/spear6xx.c
+++ b/arch/arm/mach-spear/spear6xx.c
@@ -423,7 +423,6 @@ static const char *spear600_dt_board_compat[] = {
 
 DT_MACHINE_START(SPEAR600_DT, "ST SPEAr600 (Flattened Device Tree)")
 	.map_io		=	spear6xx_map_io,
-	.init_irq	=	irqchip_init,
 	.init_time	=	spear6xx_timer_init,
 	.init_machine	=	spear600_dt_init,
 	.restart	=	spear_restart,
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index d0ad789..bc1493d 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -478,7 +478,6 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express")
 	.smp		= smp_ops(vexpress_smp_ops),
 	.map_io		= v2m_dt_map_io,
 	.init_early	= v2m_dt_init_early,
-	.init_irq	= irqchip_init,
 	.init_time	= v2m_dt_timer_init,
 	.init_machine	= v2m_dt_init,
 	.restart	= vexpress_restart,
diff --git a/arch/arm/mach-virt/virt.c b/arch/arm/mach-virt/virt.c
index 31666f6..6c1c46e 100644
--- a/arch/arm/mach-virt/virt.c
+++ b/arch/arm/mach-virt/virt.c
@@ -46,7 +46,6 @@ static const char *virt_dt_match[] = {
 extern struct smp_operations virt_smp_ops;
 
 DT_MACHINE_START(VIRT, "Dummy Virtual Machine")
-	.init_irq	= irqchip_init,
 	.init_time	= virt_timer_init,
 	.init_machine	= virt_init,
 	.smp		= smp_ops(virt_smp_ops),
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 5c89832..23b2d54 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -97,7 +97,6 @@ static const char *xilinx_dt_match[] = {
 
 MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
 	.map_io		= xilinx_map_io,
-	.init_irq	= irqchip_init,
 	.init_machine	= xilinx_init_machine,
 	.init_time	= xilinx_zynq_timer_init,
 	.dt_compat	= xilinx_dt_match,
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/2] ARM: remove mach .init_irq for irqchip_init users
  2013-03-28  9:41 ` [PATCH 2/2] ARM: remove mach .init_irq for irqchip_init users Maxime Ripard
@ 2013-03-28 12:42   ` Simon Horman
  2013-03-28 18:24     ` Maxime Ripard
  0 siblings, 1 reply; 17+ messages in thread
From: Simon Horman @ 2013-03-28 12:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 28, 2013 at 10:41:44AM +0100, Maxime Ripard wrote:
> Now that the arm core code calls irqchip_init, we can remove it from all
> the machines that were using it.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  arch/arm/mach-bcm/board_bcm.c                  |    1 -
>  arch/arm/mach-msm/board-dt-8660.c              |    1 -
>  arch/arm/mach-msm/board-dt-8960.c              |    1 -
>  arch/arm/mach-nomadik/cpu-8815.c               |    1 -
>  arch/arm/mach-picoxcell/common.c               |    1 -
>  arch/arm/mach-prima2/common.c                  |    1 -
>  arch/arm/mach-shmobile/board-kzm9g-reference.c |    1 -
>  arch/arm/mach-shmobile/setup-emev2.c           |    1 -
>  arch/arm/mach-shmobile/setup-sh73a0.c          |    1 -
>  arch/arm/mach-spear/spear1310.c                |    1 -
>  arch/arm/mach-spear/spear1340.c                |    1 -
>  arch/arm/mach-spear/spear300.c                 |    1 -
>  arch/arm/mach-spear/spear310.c                 |    1 -
>  arch/arm/mach-spear/spear320.c                 |    1 -
>  arch/arm/mach-spear/spear6xx.c                 |    1 -
>  arch/arm/mach-vexpress/v2m.c                   |    1 -
>  arch/arm/mach-virt/virt.c                      |    1 -
>  arch/arm/mach-zynq/common.c                    |    1 -
>  18 files changed, 18 deletions(-)

mach-shmobile portion:

Acked-by: Simon Horman <horms+renesas@verge.net.au>

I have some new users of this queued up for v3.10.
How should we handle that?

In particular:

arch/arm/mach-shmobile/setup-r8a73a4.c
arch/arm/mach-shmobile/intc-r8a7779.c
arch/arm/mach-shmobile/setup-r8a7778.c

You can find these in the renesas-next-20130328 tag of
my renesas tree on kernel.org. They are or will soon
be in linux-next.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/2] ARM: irq: Call irqchit_init if no init_irq function is specified
  2013-03-28  9:41 ` [PATCH 1/2] ARM: irq: Call irqchit_init if no init_irq function is specified Maxime Ripard
@ 2013-03-28 14:48   ` Rob Herring
  2013-03-28 14:51     ` Russell King - ARM Linux
  0 siblings, 1 reply; 17+ messages in thread
From: Rob Herring @ 2013-03-28 14:48 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/28/2013 04:41 AM, Maxime Ripard wrote:
> More and more sub-architectures are using only the irqchip_init
> function. Make the core code call this function if no init_irq field is
> provided in the machine description to remove some boilerplate code.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  arch/arm/kernel/irq.c |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
> index 8e4ef4c..df6f9a1 100644
> --- a/arch/arm/kernel/irq.c
> +++ b/arch/arm/kernel/irq.c
> @@ -26,6 +26,7 @@
>  #include <linux/ioport.h>
>  #include <linux/interrupt.h>
>  #include <linux/irq.h>
> +#include <linux/irqchip.h>
>  #include <linux/random.h>
>  #include <linux/smp.h>
>  #include <linux/init.h>
> @@ -114,7 +115,10 @@ EXPORT_SYMBOL_GPL(set_irq_flags);
>  
>  void __init init_IRQ(void)
>  {
> -	machine_desc->init_irq();
> +	if (machine_desc->init_irq)
> +		machine_desc->init_irq();
> +	else
> +		irqchip_init();

There needs to be an empty version defined for !OF.

Rob

>  }
>  
>  #ifdef CONFIG_MULTI_IRQ_HANDLER
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/2] ARM: irq: Call irqchit_init if no init_irq function is specified
  2013-03-28 14:48   ` Rob Herring
@ 2013-03-28 14:51     ` Russell King - ARM Linux
  2013-03-28 15:25       ` Arnd Bergmann
  2013-03-28 18:40       ` Rob Herring
  0 siblings, 2 replies; 17+ messages in thread
From: Russell King - ARM Linux @ 2013-03-28 14:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 28, 2013 at 09:48:18AM -0500, Rob Herring wrote:
> On 03/28/2013 04:41 AM, Maxime Ripard wrote:
> > +	if (machine_desc->init_irq)
> > +		machine_desc->init_irq();
> > +	else
> > +		irqchip_init();
> 
> There needs to be an empty version defined for !OF.

Better:

#ifdef CONFIG_OF
	if (!machine_desc->init_irq)
		irqchip_init();
	else
#endif
		machine_desc->init_irq();

which means we don't even get the test if !OF, and if someone mistakenly
sets this to NULL for a !OF platform, they get to know about it.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/2] ARM: irq: Call irqchit_init if no init_irq function is specified
  2013-03-28 14:51     ` Russell King - ARM Linux
@ 2013-03-28 15:25       ` Arnd Bergmann
  2013-03-28 15:36         ` Russell King - ARM Linux
  2013-03-28 18:40       ` Rob Herring
  1 sibling, 1 reply; 17+ messages in thread
From: Arnd Bergmann @ 2013-03-28 15:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 28 March 2013, Russell King - ARM Linux wrote:
> Better:
> 
> #ifdef CONFIG_OF
>         if (!machine_desc->init_irq)
>                 irqchip_init();
>         else
> #endif
>                 machine_desc->init_irq();
> 
> which means we don't even get the test if !OF, and if someone mistakenly
> sets this to NULL for a !OF platform, they get to know about it.

Right. With the new IS_DEFINED() macro, we could even turn this into

	if (IS_DEFINED(CONFIG_OF) && !machine_desc->init_irq)
		irqchip_init();
	else
		machine_desc->init_irq();

to the same effect.

	Arnd

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/2] ARM: irq: Call irqchit_init if no init_irq function is specified
  2013-03-28 15:25       ` Arnd Bergmann
@ 2013-03-28 15:36         ` Russell King - ARM Linux
  2013-03-28 15:49           ` Arnd Bergmann
  0 siblings, 1 reply; 17+ messages in thread
From: Russell King - ARM Linux @ 2013-03-28 15:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 28, 2013 at 03:25:42PM +0000, Arnd Bergmann wrote:
> On Thursday 28 March 2013, Russell King - ARM Linux wrote:
> > Better:
> > 
> > #ifdef CONFIG_OF
> >         if (!machine_desc->init_irq)
> >                 irqchip_init();
> >         else
> > #endif
> >                 machine_desc->init_irq();
> > 
> > which means we don't even get the test if !OF, and if someone mistakenly
> > sets this to NULL for a !OF platform, they get to know about it.
> 
> Right. With the new IS_DEFINED() macro, we could even turn this into
> 
> 	if (IS_DEFINED(CONFIG_OF) && !machine_desc->init_irq)
> 		irqchip_init();
> 	else
> 		machine_desc->init_irq();
> 
> to the same effect.

Provided irqchip_init() keeps its prototype visible, then yes.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/2] ARM: irq: Call irqchit_init if no init_irq function is specified
  2013-03-28 15:36         ` Russell King - ARM Linux
@ 2013-03-28 15:49           ` Arnd Bergmann
  2013-03-28 18:20             ` Maxime Ripard
  0 siblings, 1 reply; 17+ messages in thread
From: Arnd Bergmann @ 2013-03-28 15:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday 28 March 2013, Russell King - ARM Linux wrote:
> On Thu, Mar 28, 2013 at 03:25:42PM +0000, Arnd Bergmann wrote:
> >       if (IS_DEFINED(CONFIG_OF) && !machine_desc->init_irq)
> >               irqchip_init();
> >       else
> >               machine_desc->init_irq();
> > 
> > to the same effect.
> 
> Provided irqchip_init() keeps its prototype visible, then yes.

Yes, I checked that before my reply. We have a few function declarations
that are unfortunately completely hidden when some config symbol is not
defined, but this is not one of them.

	Arnd

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/2] ARM: irq: Call irqchit_init if no init_irq function is specified
  2013-03-28 15:49           ` Arnd Bergmann
@ 2013-03-28 18:20             ` Maxime Ripard
  0 siblings, 0 replies; 17+ messages in thread
From: Maxime Ripard @ 2013-03-28 18:20 UTC (permalink / raw)
  To: linux-arm-kernel

Le 28/03/2013 16:49, Arnd Bergmann a ?crit :
> On Thursday 28 March 2013, Russell King - ARM Linux wrote:
>> On Thu, Mar 28, 2013 at 03:25:42PM +0000, Arnd Bergmann wrote:
>>>       if (IS_DEFINED(CONFIG_OF) && !machine_desc->init_irq)
>>>               irqchip_init();
>>>       else
>>>               machine_desc->init_irq();
>>>
>>> to the same effect.
>>
>> Provided irqchip_init() keeps its prototype visible, then yes.
> 
> Yes, I checked that before my reply. We have a few function declarations
> that are unfortunately completely hidden when some config symbol is not
> defined, but this is not one of them.

I'll send a v2 with the suggested change.

Thanks!
Maxime


-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 2/2] ARM: remove mach .init_irq for irqchip_init users
  2013-03-28 12:42   ` Simon Horman
@ 2013-03-28 18:24     ` Maxime Ripard
  2013-03-29  3:48       ` Simon Horman
  0 siblings, 1 reply; 17+ messages in thread
From: Maxime Ripard @ 2013-03-28 18:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon,

Le 28/03/2013 13:42, Simon Horman a ?crit :
> On Thu, Mar 28, 2013 at 10:41:44AM +0100, Maxime Ripard wrote:
>> Now that the arm core code calls irqchip_init, we can remove it from all
>> the machines that were using it.
>>
>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>> ---
>>  arch/arm/mach-bcm/board_bcm.c                  |    1 -
>>  arch/arm/mach-msm/board-dt-8660.c              |    1 -
>>  arch/arm/mach-msm/board-dt-8960.c              |    1 -
>>  arch/arm/mach-nomadik/cpu-8815.c               |    1 -
>>  arch/arm/mach-picoxcell/common.c               |    1 -
>>  arch/arm/mach-prima2/common.c                  |    1 -
>>  arch/arm/mach-shmobile/board-kzm9g-reference.c |    1 -
>>  arch/arm/mach-shmobile/setup-emev2.c           |    1 -
>>  arch/arm/mach-shmobile/setup-sh73a0.c          |    1 -
>>  arch/arm/mach-spear/spear1310.c                |    1 -
>>  arch/arm/mach-spear/spear1340.c                |    1 -
>>  arch/arm/mach-spear/spear300.c                 |    1 -
>>  arch/arm/mach-spear/spear310.c                 |    1 -
>>  arch/arm/mach-spear/spear320.c                 |    1 -
>>  arch/arm/mach-spear/spear6xx.c                 |    1 -
>>  arch/arm/mach-vexpress/v2m.c                   |    1 -
>>  arch/arm/mach-virt/virt.c                      |    1 -
>>  arch/arm/mach-zynq/common.c                    |    1 -
>>  18 files changed, 18 deletions(-)
> 
> mach-shmobile portion:
> 
> Acked-by: Simon Horman <horms+renesas@verge.net.au>

Thanks!

> 
> I have some new users of this queued up for v3.10.
> How should we handle that?

Since the old behaviour is preserved, I guess it doesn't matter much,
and one of us can always make a followup patch on top of these patches.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/2] ARM: irq: Call irqchit_init if no init_irq function is specified
  2013-03-28 14:51     ` Russell King - ARM Linux
  2013-03-28 15:25       ` Arnd Bergmann
@ 2013-03-28 18:40       ` Rob Herring
  2013-03-28 19:02         ` Russell King - ARM Linux
  1 sibling, 1 reply; 17+ messages in thread
From: Rob Herring @ 2013-03-28 18:40 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/28/2013 09:51 AM, Russell King - ARM Linux wrote:
> On Thu, Mar 28, 2013 at 09:48:18AM -0500, Rob Herring wrote:
>> On 03/28/2013 04:41 AM, Maxime Ripard wrote:
>>> +	if (machine_desc->init_irq)
>>> +		machine_desc->init_irq();
>>> +	else
>>> +		irqchip_init();
>>
>> There needs to be an empty version defined for !OF.
> 
> Better:
> 
> #ifdef CONFIG_OF
> 	if (!machine_desc->init_irq)
> 		irqchip_init();
> 	else
> #endif

Or the new style:

	if (IS_ENABLED(CONFIG_OF) && !machine_desc->init_irq)
		irqchip_init();
	else

That needs the empty version, but handles your case.

Rob

> 		machine_desc->init_irq();
> 
> which means we don't even get the test if !OF, and if someone mistakenly
> sets this to NULL for a !OF platform, they get to know about it.
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/2] ARM: irq: Call irqchit_init if no init_irq function is specified
  2013-03-28 18:40       ` Rob Herring
@ 2013-03-28 19:02         ` Russell King - ARM Linux
  0 siblings, 0 replies; 17+ messages in thread
From: Russell King - ARM Linux @ 2013-03-28 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 28, 2013 at 01:40:09PM -0500, Rob Herring wrote:
> On 03/28/2013 09:51 AM, Russell King - ARM Linux wrote:
> > On Thu, Mar 28, 2013 at 09:48:18AM -0500, Rob Herring wrote:
> >> On 03/28/2013 04:41 AM, Maxime Ripard wrote:
> >>> +	if (machine_desc->init_irq)
> >>> +		machine_desc->init_irq();
> >>> +	else
> >>> +		irqchip_init();
> >>
> >> There needs to be an empty version defined for !OF.
> > 
> > Better:
> > 
> > #ifdef CONFIG_OF
> > 	if (!machine_desc->init_irq)
> > 		irqchip_init();
> > 	else
> > #endif
> 
> Or the new style:
> 
> 	if (IS_ENABLED(CONFIG_OF) && !machine_desc->init_irq)
> 		irqchip_init();
> 	else
> 
> That needs the empty version, but handles your case.

It shouldn't need the empty version at all - because the compiler should
optimize the "true" case away entirely.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 2/2] ARM: remove mach .init_irq for irqchip_init users
  2013-03-28 20:46 [PATCHv2 0/2] ARM: Remove boilerplate irqchip_init code Maxime Ripard
@ 2013-03-28 20:46 ` Maxime Ripard
  2013-04-03 12:35   ` Linus Walleij
  2013-04-03 13:20   ` Jamie Iles
  0 siblings, 2 replies; 17+ messages in thread
From: Maxime Ripard @ 2013-03-28 20:46 UTC (permalink / raw)
  To: linux-arm-kernel

Now that the arm core code calls irqchip_init, we can remove it from all
the machines that were using it.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-bcm/board_bcm.c                  |    1 -
 arch/arm/mach-msm/board-dt-8660.c              |    1 -
 arch/arm/mach-msm/board-dt-8960.c              |    1 -
 arch/arm/mach-nomadik/cpu-8815.c               |    1 -
 arch/arm/mach-picoxcell/common.c               |    1 -
 arch/arm/mach-prima2/common.c                  |    1 -
 arch/arm/mach-shmobile/board-kzm9g-reference.c |    1 -
 arch/arm/mach-shmobile/setup-emev2.c           |    1 -
 arch/arm/mach-shmobile/setup-sh73a0.c          |    1 -
 arch/arm/mach-spear/spear1310.c                |    1 -
 arch/arm/mach-spear/spear1340.c                |    1 -
 arch/arm/mach-spear/spear300.c                 |    1 -
 arch/arm/mach-spear/spear310.c                 |    1 -
 arch/arm/mach-spear/spear320.c                 |    1 -
 arch/arm/mach-spear/spear6xx.c                 |    1 -
 arch/arm/mach-vexpress/v2m.c                   |    1 -
 arch/arm/mach-virt/virt.c                      |    1 -
 arch/arm/mach-zynq/common.c                    |    1 -
 18 files changed, 18 deletions(-)

diff --git a/arch/arm/mach-bcm/board_bcm.c b/arch/arm/mach-bcm/board_bcm.c
index f0f9aba..4c819e2 100644
--- a/arch/arm/mach-bcm/board_bcm.c
+++ b/arch/arm/mach-bcm/board_bcm.c
@@ -34,7 +34,6 @@ static void __init board_init(void)
 static const char * const bcm11351_dt_compat[] = { "bcm,bcm11351", NULL, };
 
 DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor")
-	.init_irq = irqchip_init,
 	.init_time = timer_init,
 	.init_machine = board_init,
 	.dt_compat = bcm11351_dt_compat,
diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c
index 7dcfc53..1360226 100644
--- a/arch/arm/mach-msm/board-dt-8660.c
+++ b/arch/arm/mach-msm/board-dt-8660.c
@@ -44,7 +44,6 @@ static const char *msm8x60_fluid_match[] __initdata = {
 DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
 	.smp = smp_ops(msm_smp_ops),
 	.map_io = msm_map_msm8x60_io,
-	.init_irq = irqchip_init,
 	.init_machine = msm8x60_dt_init,
 	.init_late = msm8x60_init_late,
 	.init_time	= msm_dt_timer_init,
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt-8960.c
index 7301936..1e8eb1d 100644
--- a/arch/arm/mach-msm/board-dt-8960.c
+++ b/arch/arm/mach-msm/board-dt-8960.c
@@ -31,7 +31,6 @@ static const char * const msm8960_dt_match[] __initconst = {
 DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")
 	.smp = smp_ops(msm_smp_ops),
 	.map_io = msm_map_msm8960_io,
-	.init_irq = irqchip_init,
 	.init_time	= msm_dt_timer_init,
 	.init_machine = msm_dt_init,
 	.dt_compat = msm8960_dt_match,
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 59f6ff5..3d43f95 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -323,7 +323,6 @@ static const char * cpu8815_board_compat[] = {
 
 DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815")
 	.map_io		= cpu8815_map_io,
-	.init_irq	= irqchip_init,
 	.init_time	= cpu8815_timer_init_of,
 	.init_machine	= cpu8815_init_of,
 	.restart	= cpu8815_restart,
diff --git a/arch/arm/mach-picoxcell/common.c b/arch/arm/mach-picoxcell/common.c
index 70b441a..b444947 100644
--- a/arch/arm/mach-picoxcell/common.c
+++ b/arch/arm/mach-picoxcell/common.c
@@ -87,7 +87,6 @@ static void picoxcell_wdt_restart(char mode, const char *cmd)
 DT_MACHINE_START(PICOXCELL, "Picochip picoXcell")
 	.map_io		= picoxcell_map_io,
 	.nr_irqs	= NR_IRQS_LEGACY,
-	.init_irq	= irqchip_init,
 	.init_time	= dw_apb_timer_init,
 	.init_machine	= picoxcell_init_machine,
 	.dt_compat	= picoxcell_dt_match,
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c
index 72efb4f..efdfc32 100644
--- a/arch/arm/mach-prima2/common.c
+++ b/arch/arm/mach-prima2/common.c
@@ -90,7 +90,6 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
 	/* Maintainer: Barry Song <baohua.song@csr.com> */
 	.smp            = smp_ops(sirfsoc_smp_ops),
 	.map_io         = sirfsoc_map_io,
-	.init_irq	= irqchip_init,
 	.init_time	= sirfsoc_marco_timer_init,
 	.init_machine	= sirfsoc_mach_init,
 	.init_late	= sirfsoc_init_late,
diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
index aefa50d..eaec498 100644
--- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
+++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c
@@ -100,7 +100,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g-reference")
 	.map_io		= sh73a0_map_io,
 	.init_early	= sh73a0_init_delay,
 	.nr_irqs	= NR_IRQS_LEGACY,
-	.init_irq	= irqchip_init,
 	.init_machine	= kzm_init,
 	.init_time	= shmobile_timer_init,
 	.dt_compat	= kzm9g_boards_compat_dt,
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
index e4545c1..36d1ac7 100644
--- a/arch/arm/mach-shmobile/setup-emev2.c
+++ b/arch/arm/mach-shmobile/setup-emev2.c
@@ -454,7 +454,6 @@ DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
 	.smp		= smp_ops(emev2_smp_ops),
 	.init_early	= emev2_init_delay,
 	.nr_irqs	= NR_IRQS_LEGACY,
-	.init_irq	= irqchip_init,
 	.init_machine	= emev2_add_standard_devices_dt,
 	.init_time	= shmobile_timer_init,
 	.dt_compat	= emev2_boards_compat_dt,
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index e8cd93a..ad13508 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -1035,7 +1035,6 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
 	.map_io		= sh73a0_map_io,
 	.init_early	= sh73a0_init_delay,
 	.nr_irqs	= NR_IRQS_LEGACY,
-	.init_irq	= irqchip_init,
 	.init_machine	= sh73a0_add_standard_devices_dt,
 	.init_time	= shmobile_timer_init,
 	.dt_compat	= sh73a0_boards_compat_dt,
diff --git a/arch/arm/mach-spear/spear1310.c b/arch/arm/mach-spear/spear1310.c
index ed3b5c2..673783f 100644
--- a/arch/arm/mach-spear/spear1310.c
+++ b/arch/arm/mach-spear/spear1310.c
@@ -88,7 +88,6 @@ static void __init spear1310_map_io(void)
 DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree")
 	.smp		=	smp_ops(spear13xx_smp_ops),
 	.map_io		=	spear1310_map_io,
-	.init_irq	=	irqchip_init,
 	.init_time	=	spear13xx_timer_init,
 	.init_machine	=	spear1310_dt_init,
 	.restart	=	spear_restart,
diff --git a/arch/arm/mach-spear/spear1340.c b/arch/arm/mach-spear/spear1340.c
index 75e3864..ea78f93 100644
--- a/arch/arm/mach-spear/spear1340.c
+++ b/arch/arm/mach-spear/spear1340.c
@@ -185,7 +185,6 @@ static const char * const spear1340_dt_board_compat[] = {
 DT_MACHINE_START(SPEAR1340_DT, "ST SPEAr1340 SoC with Flattened Device Tree")
 	.smp		=	smp_ops(spear13xx_smp_ops),
 	.map_io		=	spear13xx_map_io,
-	.init_irq	=	irqchip_init,
 	.init_time	=	spear13xx_timer_init,
 	.init_machine	=	spear1340_dt_init,
 	.restart	=	spear_restart,
diff --git a/arch/arm/mach-spear/spear300.c b/arch/arm/mach-spear/spear300.c
index bac56e8..185b9ba 100644
--- a/arch/arm/mach-spear/spear300.c
+++ b/arch/arm/mach-spear/spear300.c
@@ -212,7 +212,6 @@ static void __init spear300_map_io(void)
 
 DT_MACHINE_START(SPEAR300_DT, "ST SPEAr300 SoC with Flattened Device Tree")
 	.map_io		=	spear300_map_io,
-	.init_irq	=	irqchip_init,
 	.init_time	=	spear3xx_timer_init,
 	.init_machine	=	spear300_dt_init,
 	.restart	=	spear_restart,
diff --git a/arch/arm/mach-spear/spear310.c b/arch/arm/mach-spear/spear310.c
index 6ffbc63..ebc07e6 100644
--- a/arch/arm/mach-spear/spear310.c
+++ b/arch/arm/mach-spear/spear310.c
@@ -254,7 +254,6 @@ static void __init spear310_map_io(void)
 
 DT_MACHINE_START(SPEAR310_DT, "ST SPEAr310 SoC with Flattened Device Tree")
 	.map_io		=	spear310_map_io,
-	.init_irq	=	irqchip_init,
 	.init_time	=	spear3xx_timer_init,
 	.init_machine	=	spear310_dt_init,
 	.restart	=	spear_restart,
diff --git a/arch/arm/mach-spear/spear320.c b/arch/arm/mach-spear/spear320.c
index 6eb3eec..1fa4929 100644
--- a/arch/arm/mach-spear/spear320.c
+++ b/arch/arm/mach-spear/spear320.c
@@ -269,7 +269,6 @@ static void __init spear320_map_io(void)
 
 DT_MACHINE_START(SPEAR320_DT, "ST SPEAr320 SoC with Flattened Device Tree")
 	.map_io		=	spear320_map_io,
-	.init_irq	=	irqchip_init,
 	.init_time	=	spear3xx_timer_init,
 	.init_machine	=	spear320_dt_init,
 	.restart	=	spear_restart,
diff --git a/arch/arm/mach-spear/spear6xx.c b/arch/arm/mach-spear/spear6xx.c
index ec8eefb..0359f2e 100644
--- a/arch/arm/mach-spear/spear6xx.c
+++ b/arch/arm/mach-spear/spear6xx.c
@@ -423,7 +423,6 @@ static const char *spear600_dt_board_compat[] = {
 
 DT_MACHINE_START(SPEAR600_DT, "ST SPEAr600 (Flattened Device Tree)")
 	.map_io		=	spear6xx_map_io,
-	.init_irq	=	irqchip_init,
 	.init_time	=	spear6xx_timer_init,
 	.init_machine	=	spear600_dt_init,
 	.restart	=	spear_restart,
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index d0ad789..bc1493d 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -478,7 +478,6 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express")
 	.smp		= smp_ops(vexpress_smp_ops),
 	.map_io		= v2m_dt_map_io,
 	.init_early	= v2m_dt_init_early,
-	.init_irq	= irqchip_init,
 	.init_time	= v2m_dt_timer_init,
 	.init_machine	= v2m_dt_init,
 	.restart	= vexpress_restart,
diff --git a/arch/arm/mach-virt/virt.c b/arch/arm/mach-virt/virt.c
index 31666f6..6c1c46e 100644
--- a/arch/arm/mach-virt/virt.c
+++ b/arch/arm/mach-virt/virt.c
@@ -46,7 +46,6 @@ static const char *virt_dt_match[] = {
 extern struct smp_operations virt_smp_ops;
 
 DT_MACHINE_START(VIRT, "Dummy Virtual Machine")
-	.init_irq	= irqchip_init,
 	.init_time	= virt_timer_init,
 	.init_machine	= virt_init,
 	.smp		= smp_ops(virt_smp_ops),
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 5c89832..23b2d54 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -97,7 +97,6 @@ static const char *xilinx_dt_match[] = {
 
 MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
 	.map_io		= xilinx_map_io,
-	.init_irq	= irqchip_init,
 	.init_machine	= xilinx_init_machine,
 	.init_time	= xilinx_zynq_timer_init,
 	.dt_compat	= xilinx_dt_match,
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/2] ARM: remove mach .init_irq for irqchip_init users
  2013-03-28 18:24     ` Maxime Ripard
@ 2013-03-29  3:48       ` Simon Horman
  0 siblings, 0 replies; 17+ messages in thread
From: Simon Horman @ 2013-03-29  3:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 28, 2013 at 07:24:02PM +0100, Maxime Ripard wrote:
> Hi Simon,
> 
> Le 28/03/2013 13:42, Simon Horman a ?crit :
> > On Thu, Mar 28, 2013 at 10:41:44AM +0100, Maxime Ripard wrote:
> >> Now that the arm core code calls irqchip_init, we can remove it from all
> >> the machines that were using it.
> >>
> >> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> >> ---
> >>  arch/arm/mach-bcm/board_bcm.c                  |    1 -
> >>  arch/arm/mach-msm/board-dt-8660.c              |    1 -
> >>  arch/arm/mach-msm/board-dt-8960.c              |    1 -
> >>  arch/arm/mach-nomadik/cpu-8815.c               |    1 -
> >>  arch/arm/mach-picoxcell/common.c               |    1 -
> >>  arch/arm/mach-prima2/common.c                  |    1 -
> >>  arch/arm/mach-shmobile/board-kzm9g-reference.c |    1 -
> >>  arch/arm/mach-shmobile/setup-emev2.c           |    1 -
> >>  arch/arm/mach-shmobile/setup-sh73a0.c          |    1 -
> >>  arch/arm/mach-spear/spear1310.c                |    1 -
> >>  arch/arm/mach-spear/spear1340.c                |    1 -
> >>  arch/arm/mach-spear/spear300.c                 |    1 -
> >>  arch/arm/mach-spear/spear310.c                 |    1 -
> >>  arch/arm/mach-spear/spear320.c                 |    1 -
> >>  arch/arm/mach-spear/spear6xx.c                 |    1 -
> >>  arch/arm/mach-vexpress/v2m.c                   |    1 -
> >>  arch/arm/mach-virt/virt.c                      |    1 -
> >>  arch/arm/mach-zynq/common.c                    |    1 -
> >>  18 files changed, 18 deletions(-)
> > 
> > mach-shmobile portion:
> > 
> > Acked-by: Simon Horman <horms+renesas@verge.net.au>
> 
> Thanks!
> 
> > 
> > I have some new users of this queued up for v3.10.
> > How should we handle that?
> 
> Since the old behaviour is preserved, I guess it doesn't matter much,
> and one of us can always make a followup patch on top of these patches.

Ok, sound good.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 2/2] ARM: remove mach .init_irq for irqchip_init users
  2013-03-28 20:46 ` [PATCH 2/2] ARM: remove mach .init_irq for irqchip_init users Maxime Ripard
@ 2013-04-03 12:35   ` Linus Walleij
  2013-04-03 13:20   ` Jamie Iles
  1 sibling, 0 replies; 17+ messages in thread
From: Linus Walleij @ 2013-04-03 12:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 28, 2013 at 9:46 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:

> Now that the arm core code calls irqchip_init, we can remove it from all
> the machines that were using it.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> Acked-by: Simon Horman <horms+renesas@verge.net.au>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

For Nomadik.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 2/2] ARM: remove mach .init_irq for irqchip_init users
  2013-03-28 20:46 ` [PATCH 2/2] ARM: remove mach .init_irq for irqchip_init users Maxime Ripard
  2013-04-03 12:35   ` Linus Walleij
@ 2013-04-03 13:20   ` Jamie Iles
  1 sibling, 0 replies; 17+ messages in thread
From: Jamie Iles @ 2013-04-03 13:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 28, 2013 at 09:46:45PM +0100, Maxime Ripard wrote:
> Now that the arm core code calls irqchip_init, we can remove it from all
> the machines that were using it.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> Acked-by: Simon Horman <horms+renesas@verge.net.au>

Acked-by: Jamie Iles <jamie@jamieiles.com>

Thanks Maxime!

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-04-03 13:20 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-28  9:41 [PATCH 0/2] ARM: Remove boilerplate irqchip_init code Maxime Ripard
2013-03-28  9:41 ` [PATCH 1/2] ARM: irq: Call irqchit_init if no init_irq function is specified Maxime Ripard
2013-03-28 14:48   ` Rob Herring
2013-03-28 14:51     ` Russell King - ARM Linux
2013-03-28 15:25       ` Arnd Bergmann
2013-03-28 15:36         ` Russell King - ARM Linux
2013-03-28 15:49           ` Arnd Bergmann
2013-03-28 18:20             ` Maxime Ripard
2013-03-28 18:40       ` Rob Herring
2013-03-28 19:02         ` Russell King - ARM Linux
2013-03-28  9:41 ` [PATCH 2/2] ARM: remove mach .init_irq for irqchip_init users Maxime Ripard
2013-03-28 12:42   ` Simon Horman
2013-03-28 18:24     ` Maxime Ripard
2013-03-29  3:48       ` Simon Horman
  -- strict thread matches above, loose matches on Subject: below --
2013-03-28 20:46 [PATCHv2 0/2] ARM: Remove boilerplate irqchip_init code Maxime Ripard
2013-03-28 20:46 ` [PATCH 2/2] ARM: remove mach .init_irq for irqchip_init users Maxime Ripard
2013-04-03 12:35   ` Linus Walleij
2013-04-03 13:20   ` Jamie Iles

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).