All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP
@ 2016-04-13 15:59 ` Suzuki K Poulose
  0 siblings, 0 replies; 14+ messages in thread
From: Suzuki K Poulose @ 2016-04-13 15:59 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-kernel, arm, robh, Suzuki K Poulose, Andre Przywara,
	Russell King, Maxime Ripard, Chen-Yu Tsai, Catalin Marinas,
	Will Deacon, Thomas Gleixner, Jason Cooper, Marc Zyngier

The sunxi-nmi and sun4i irq chips are selected by ARCH_SUNXI on both arm
and arm64 (recently added). However on arm64, we don't explicitly select
GENERIC_IRQ_CHIP which is required by the sunxi-nmi irq chip driver and
causes build breaks on 4.6-rc1 :

  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
drivers/built-in.o: In function `sunxi_sc_nmi_set_type':
drivers/irqchip/irq-sunxi-nmi.c:114: undefined reference to `irq_setup_alt_chip'
drivers/built-in.o: In function `irq_domain_add_linear':
include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
drivers/built-in.o: In function `sunxi_sc_nmi_irq_init':
drivers/irqchip/irq-sunxi-nmi.c:146: undefined reference to `irq_alloc_domain_generic_chips'
drivers/irqchip/irq-sunxi-nmi.c:161: undefined reference to `irq_get_domain_generic_chip'
drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
drivers/irqchip/irq-sunxi-nmi.c:171: undefined reference to `irq_gc_mask_set_bit'
drivers/irqchip/irq-sunxi-nmi.c:172: undefined reference to `irq_gc_ack_set_bit'
drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'

This patch fixes the dependency by introducing a separate Kconfig
symbol for sunxi irqchips which does the proper dependency selections.

Build tested on arm and arm64.

Fixes: commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option")
Suggested-by: Olof Johansson <olof@lixom.net>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
 arch/arm/mach-sunxi/Kconfig  |    2 +-
 arch/arm64/Kconfig.platforms |    1 +
 drivers/irqchip/Kconfig      |    6 ++++++
 drivers/irqchip/Makefile     |    4 ++--
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index c124d65..7a4fc8c 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -4,9 +4,9 @@ menuconfig ARCH_SUNXI
 	select ARCH_REQUIRE_GPIOLIB
 	select ARCH_HAS_RESET_CONTROLLER
 	select CLKSRC_MMIO
-	select GENERIC_IRQ_CHIP
 	select PINCTRL
 	select SUN4I_TIMER
+	select SUNXI_IRQCHIP
 	select RESET_CONTROLLER
 
 if ARCH_SUNXI
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index efa77c1..c77ad2d 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -2,6 +2,7 @@ menu "Platform selection"
 
 config ARCH_SUNXI
 	bool "Allwinner sunxi 64-bit SoC Family"
+	select SUNXI_IRQCHIP
 	help
 	  This enables support for Allwinner sunxi based SoCs like the A64.
 
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 3e12479..772c8ba 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -165,6 +165,12 @@ config ST_IRQCHIP
 	help
 	  Enables SysCfg Controlled IRQs on STi based platforms.
 
+config SUNXI_IRQCHIP
+	bool
+	select GENERIC_IRQ_CHIP
+	help
+		Support for Allwinner A1x/A20/A31 SoCs NMI IRQ chip driver
+
 config TANGO_IRQ
 	bool
 	select IRQ_DOMAIN
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index b03cfcb..c9626f4 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -19,8 +19,8 @@ obj-$(CONFIG_CLPS711X_IRQCHIP)		+= irq-clps711x.o
 obj-$(CONFIG_OR1K_PIC)			+= irq-or1k-pic.o
 obj-$(CONFIG_ORION_IRQCHIP)		+= irq-orion.o
 obj-$(CONFIG_OMAP_IRQCHIP)		+= irq-omap-intc.o
-obj-$(CONFIG_ARCH_SUNXI)		+= irq-sun4i.o
-obj-$(CONFIG_ARCH_SUNXI)		+= irq-sunxi-nmi.o
+obj-$(CONFIG_SUNXI_IRQCHIP)		+= irq-sun4i.o
+obj-$(CONFIG_SUNXI_IRQCHIP)		+= irq-sunxi-nmi.o
 obj-$(CONFIG_ARCH_SPEAR3XX)		+= spear-shirq.o
 obj-$(CONFIG_ARM_GIC)			+= irq-gic.o irq-gic-common.o
 obj-$(CONFIG_REALVIEW_DT)		+= irq-gic-realview.o
-- 
1.7.9.5

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

* [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP
@ 2016-04-13 15:59 ` Suzuki K Poulose
  0 siblings, 0 replies; 14+ messages in thread
From: Suzuki K Poulose @ 2016-04-13 15:59 UTC (permalink / raw)
  To: linux-arm-kernel

The sunxi-nmi and sun4i irq chips are selected by ARCH_SUNXI on both arm
and arm64 (recently added). However on arm64, we don't explicitly select
GENERIC_IRQ_CHIP which is required by the sunxi-nmi irq chip driver and
causes build breaks on 4.6-rc1 :

  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
drivers/built-in.o: In function `sunxi_sc_nmi_set_type':
drivers/irqchip/irq-sunxi-nmi.c:114: undefined reference to `irq_setup_alt_chip'
drivers/built-in.o: In function `irq_domain_add_linear':
include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
drivers/built-in.o: In function `sunxi_sc_nmi_irq_init':
drivers/irqchip/irq-sunxi-nmi.c:146: undefined reference to `irq_alloc_domain_generic_chips'
drivers/irqchip/irq-sunxi-nmi.c:161: undefined reference to `irq_get_domain_generic_chip'
drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
drivers/irqchip/irq-sunxi-nmi.c:171: undefined reference to `irq_gc_mask_set_bit'
drivers/irqchip/irq-sunxi-nmi.c:172: undefined reference to `irq_gc_ack_set_bit'
drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'

This patch fixes the dependency by introducing a separate Kconfig
symbol for sunxi irqchips which does the proper dependency selections.

Build tested on arm and arm64.

Fixes: commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option")
Suggested-by: Olof Johansson <olof@lixom.net>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
 arch/arm/mach-sunxi/Kconfig  |    2 +-
 arch/arm64/Kconfig.platforms |    1 +
 drivers/irqchip/Kconfig      |    6 ++++++
 drivers/irqchip/Makefile     |    4 ++--
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index c124d65..7a4fc8c 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -4,9 +4,9 @@ menuconfig ARCH_SUNXI
 	select ARCH_REQUIRE_GPIOLIB
 	select ARCH_HAS_RESET_CONTROLLER
 	select CLKSRC_MMIO
-	select GENERIC_IRQ_CHIP
 	select PINCTRL
 	select SUN4I_TIMER
+	select SUNXI_IRQCHIP
 	select RESET_CONTROLLER
 
 if ARCH_SUNXI
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index efa77c1..c77ad2d 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -2,6 +2,7 @@ menu "Platform selection"
 
 config ARCH_SUNXI
 	bool "Allwinner sunxi 64-bit SoC Family"
+	select SUNXI_IRQCHIP
 	help
 	  This enables support for Allwinner sunxi based SoCs like the A64.
 
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 3e12479..772c8ba 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -165,6 +165,12 @@ config ST_IRQCHIP
 	help
 	  Enables SysCfg Controlled IRQs on STi based platforms.
 
+config SUNXI_IRQCHIP
+	bool
+	select GENERIC_IRQ_CHIP
+	help
+		Support for Allwinner A1x/A20/A31 SoCs NMI IRQ chip driver
+
 config TANGO_IRQ
 	bool
 	select IRQ_DOMAIN
diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
index b03cfcb..c9626f4 100644
--- a/drivers/irqchip/Makefile
+++ b/drivers/irqchip/Makefile
@@ -19,8 +19,8 @@ obj-$(CONFIG_CLPS711X_IRQCHIP)		+= irq-clps711x.o
 obj-$(CONFIG_OR1K_PIC)			+= irq-or1k-pic.o
 obj-$(CONFIG_ORION_IRQCHIP)		+= irq-orion.o
 obj-$(CONFIG_OMAP_IRQCHIP)		+= irq-omap-intc.o
-obj-$(CONFIG_ARCH_SUNXI)		+= irq-sun4i.o
-obj-$(CONFIG_ARCH_SUNXI)		+= irq-sunxi-nmi.o
+obj-$(CONFIG_SUNXI_IRQCHIP)		+= irq-sun4i.o
+obj-$(CONFIG_SUNXI_IRQCHIP)		+= irq-sunxi-nmi.o
 obj-$(CONFIG_ARCH_SPEAR3XX)		+= spear-shirq.o
 obj-$(CONFIG_ARM_GIC)			+= irq-gic.o irq-gic-common.o
 obj-$(CONFIG_REALVIEW_DT)		+= irq-gic-realview.o
-- 
1.7.9.5

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

* Re: [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP
  2016-04-13 15:59 ` Suzuki K Poulose
@ 2016-04-13 16:18   ` Marc Zyngier
  -1 siblings, 0 replies; 14+ messages in thread
From: Marc Zyngier @ 2016-04-13 16:18 UTC (permalink / raw)
  To: Suzuki K Poulose, linux-arm-kernel
  Cc: linux-kernel, arm, robh, Andre Przywara, Russell King,
	Maxime Ripard, Chen-Yu Tsai, Catalin Marinas, Will Deacon,
	Thomas Gleixner, Jason Cooper

On 13/04/16 16:59, Suzuki K Poulose wrote:
> The sunxi-nmi and sun4i irq chips are selected by ARCH_SUNXI on both arm
> and arm64 (recently added). However on arm64, we don't explicitly select
> GENERIC_IRQ_CHIP which is required by the sunxi-nmi irq chip driver and
> causes build breaks on 4.6-rc1 :
> 
>   UPD     include/generated/compile.h
>   CC      init/version.o
>   LD      init/built-in.o
> drivers/built-in.o: In function `sunxi_sc_nmi_set_type':
> drivers/irqchip/irq-sunxi-nmi.c:114: undefined reference to `irq_setup_alt_chip'
> drivers/built-in.o: In function `irq_domain_add_linear':
> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
> drivers/built-in.o: In function `sunxi_sc_nmi_irq_init':
> drivers/irqchip/irq-sunxi-nmi.c:146: undefined reference to `irq_alloc_domain_generic_chips'
> drivers/irqchip/irq-sunxi-nmi.c:161: undefined reference to `irq_get_domain_generic_chip'
> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
> drivers/irqchip/irq-sunxi-nmi.c:171: undefined reference to `irq_gc_mask_set_bit'
> drivers/irqchip/irq-sunxi-nmi.c:172: undefined reference to `irq_gc_ack_set_bit'
> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
> 
> This patch fixes the dependency by introducing a separate Kconfig
> symbol for sunxi irqchips which does the proper dependency selections.
> 
> Build tested on arm and arm64.
> 
> Fixes: commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option")
> Suggested-by: Olof Johansson <olof@lixom.net>
> Cc: Andre Przywara <andre.przywara@arm.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>

Acked-by: Marc Zyngier <marc.zyngier@arm.com>

	M.
-- 
Jazz is not dead. It just smells funny...

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

* [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP
@ 2016-04-13 16:18   ` Marc Zyngier
  0 siblings, 0 replies; 14+ messages in thread
From: Marc Zyngier @ 2016-04-13 16:18 UTC (permalink / raw)
  To: linux-arm-kernel

On 13/04/16 16:59, Suzuki K Poulose wrote:
> The sunxi-nmi and sun4i irq chips are selected by ARCH_SUNXI on both arm
> and arm64 (recently added). However on arm64, we don't explicitly select
> GENERIC_IRQ_CHIP which is required by the sunxi-nmi irq chip driver and
> causes build breaks on 4.6-rc1 :
> 
>   UPD     include/generated/compile.h
>   CC      init/version.o
>   LD      init/built-in.o
> drivers/built-in.o: In function `sunxi_sc_nmi_set_type':
> drivers/irqchip/irq-sunxi-nmi.c:114: undefined reference to `irq_setup_alt_chip'
> drivers/built-in.o: In function `irq_domain_add_linear':
> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
> drivers/built-in.o: In function `sunxi_sc_nmi_irq_init':
> drivers/irqchip/irq-sunxi-nmi.c:146: undefined reference to `irq_alloc_domain_generic_chips'
> drivers/irqchip/irq-sunxi-nmi.c:161: undefined reference to `irq_get_domain_generic_chip'
> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
> drivers/irqchip/irq-sunxi-nmi.c:171: undefined reference to `irq_gc_mask_set_bit'
> drivers/irqchip/irq-sunxi-nmi.c:172: undefined reference to `irq_gc_ack_set_bit'
> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
> 
> This patch fixes the dependency by introducing a separate Kconfig
> symbol for sunxi irqchips which does the proper dependency selections.
> 
> Build tested on arm and arm64.
> 
> Fixes: commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option")
> Suggested-by: Olof Johansson <olof@lixom.net>
> Cc: Andre Przywara <andre.przywara@arm.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>

Acked-by: Marc Zyngier <marc.zyngier@arm.com>

	M.
-- 
Jazz is not dead. It just smells funny...

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

* Re: [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP
  2016-04-13 15:59 ` Suzuki K Poulose
@ 2016-04-13 20:07   ` Maxime Ripard
  -1 siblings, 0 replies; 14+ messages in thread
From: Maxime Ripard @ 2016-04-13 20:07 UTC (permalink / raw)
  To: Suzuki K Poulose
  Cc: linux-arm-kernel, linux-kernel, arm, robh, Andre Przywara,
	Russell King, Chen-Yu Tsai, Catalin Marinas, Will Deacon,
	Thomas Gleixner, Jason Cooper, Marc Zyngier

[-- Attachment #1: Type: text/plain, Size: 4655 bytes --]

Hi,

On Wed, Apr 13, 2016 at 04:59:27PM +0100, Suzuki K Poulose wrote:
> The sunxi-nmi and sun4i irq chips are selected by ARCH_SUNXI on both arm
> and arm64 (recently added). However on arm64, we don't explicitly select
> GENERIC_IRQ_CHIP which is required by the sunxi-nmi irq chip driver and
> causes build breaks on 4.6-rc1 :
> 
>   UPD     include/generated/compile.h
>   CC      init/version.o
>   LD      init/built-in.o
> drivers/built-in.o: In function `sunxi_sc_nmi_set_type':
> drivers/irqchip/irq-sunxi-nmi.c:114: undefined reference to `irq_setup_alt_chip'
> drivers/built-in.o: In function `irq_domain_add_linear':
> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
> drivers/built-in.o: In function `sunxi_sc_nmi_irq_init':
> drivers/irqchip/irq-sunxi-nmi.c:146: undefined reference to `irq_alloc_domain_generic_chips'
> drivers/irqchip/irq-sunxi-nmi.c:161: undefined reference to `irq_get_domain_generic_chip'
> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
> drivers/irqchip/irq-sunxi-nmi.c:171: undefined reference to `irq_gc_mask_set_bit'
> drivers/irqchip/irq-sunxi-nmi.c:172: undefined reference to `irq_gc_ack_set_bit'
> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
> 
> This patch fixes the dependency by introducing a separate Kconfig
> symbol for sunxi irqchips which does the proper dependency selections.
> 
> Build tested on arm and arm64.
> 
> Fixes: commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option")
> Suggested-by: Olof Johansson <olof@lixom.net>
> Cc: Andre Przywara <andre.przywara@arm.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
>  arch/arm/mach-sunxi/Kconfig  |    2 +-
>  arch/arm64/Kconfig.platforms |    1 +
>  drivers/irqchip/Kconfig      |    6 ++++++
>  drivers/irqchip/Makefile     |    4 ++--
>  4 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> index c124d65..7a4fc8c 100644
> --- a/arch/arm/mach-sunxi/Kconfig
> +++ b/arch/arm/mach-sunxi/Kconfig
> @@ -4,9 +4,9 @@ menuconfig ARCH_SUNXI
>  	select ARCH_REQUIRE_GPIOLIB
>  	select ARCH_HAS_RESET_CONTROLLER
>  	select CLKSRC_MMIO
> -	select GENERIC_IRQ_CHIP
>  	select PINCTRL
>  	select SUN4I_TIMER
> +	select SUNXI_IRQCHIP
>  	select RESET_CONTROLLER
>  
>  if ARCH_SUNXI
> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
> index efa77c1..c77ad2d 100644
> --- a/arch/arm64/Kconfig.platforms
> +++ b/arch/arm64/Kconfig.platforms
> @@ -2,6 +2,7 @@ menu "Platform selection"
>  
>  config ARCH_SUNXI
>  	bool "Allwinner sunxi 64-bit SoC Family"
> +	select SUNXI_IRQCHIP
>  	help
>  	  This enables support for Allwinner sunxi based SoCs like the A64.
>  
> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
> index 3e12479..772c8ba 100644
> --- a/drivers/irqchip/Kconfig
> +++ b/drivers/irqchip/Kconfig
> @@ -165,6 +165,12 @@ config ST_IRQCHIP
>  	help
>  	  Enables SysCfg Controlled IRQs on STi based platforms.
>  
> +config SUNXI_IRQCHIP
> +	bool
> +	select GENERIC_IRQ_CHIP
> +	help
> +		Support for Allwinner A1x/A20/A31 SoCs NMI IRQ chip driver
> +
>  config TANGO_IRQ
>  	bool
>  	select IRQ_DOMAIN
> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
> index b03cfcb..c9626f4 100644
> --- a/drivers/irqchip/Makefile
> +++ b/drivers/irqchip/Makefile
> @@ -19,8 +19,8 @@ obj-$(CONFIG_CLPS711X_IRQCHIP)		+= irq-clps711x.o
>  obj-$(CONFIG_OR1K_PIC)			+= irq-or1k-pic.o
>  obj-$(CONFIG_ORION_IRQCHIP)		+= irq-orion.o
>  obj-$(CONFIG_OMAP_IRQCHIP)		+= irq-omap-intc.o
> -obj-$(CONFIG_ARCH_SUNXI)		+= irq-sun4i.o
> -obj-$(CONFIG_ARCH_SUNXI)		+= irq-sunxi-nmi.o
> +obj-$(CONFIG_SUNXI_IRQCHIP)		+= irq-sun4i.o
> +obj-$(CONFIG_SUNXI_IRQCHIP)		+= irq-sunxi-nmi.o

Those are two different drivers, that should be selected by different
SoCs (MACH_SUN4I and MACH_SUN5I for the former, SUN6I, SUN7I and SUN8I
for the latter)

Thanks,
Maxime

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP
@ 2016-04-13 20:07   ` Maxime Ripard
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Ripard @ 2016-04-13 20:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wed, Apr 13, 2016 at 04:59:27PM +0100, Suzuki K Poulose wrote:
> The sunxi-nmi and sun4i irq chips are selected by ARCH_SUNXI on both arm
> and arm64 (recently added). However on arm64, we don't explicitly select
> GENERIC_IRQ_CHIP which is required by the sunxi-nmi irq chip driver and
> causes build breaks on 4.6-rc1 :
> 
>   UPD     include/generated/compile.h
>   CC      init/version.o
>   LD      init/built-in.o
> drivers/built-in.o: In function `sunxi_sc_nmi_set_type':
> drivers/irqchip/irq-sunxi-nmi.c:114: undefined reference to `irq_setup_alt_chip'
> drivers/built-in.o: In function `irq_domain_add_linear':
> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
> drivers/built-in.o: In function `sunxi_sc_nmi_irq_init':
> drivers/irqchip/irq-sunxi-nmi.c:146: undefined reference to `irq_alloc_domain_generic_chips'
> drivers/irqchip/irq-sunxi-nmi.c:161: undefined reference to `irq_get_domain_generic_chip'
> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
> drivers/irqchip/irq-sunxi-nmi.c:171: undefined reference to `irq_gc_mask_set_bit'
> drivers/irqchip/irq-sunxi-nmi.c:172: undefined reference to `irq_gc_ack_set_bit'
> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
> 
> This patch fixes the dependency by introducing a separate Kconfig
> symbol for sunxi irqchips which does the proper dependency selections.
> 
> Build tested on arm and arm64.
> 
> Fixes: commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option")
> Suggested-by: Olof Johansson <olof@lixom.net>
> Cc: Andre Przywara <andre.przywara@arm.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
>  arch/arm/mach-sunxi/Kconfig  |    2 +-
>  arch/arm64/Kconfig.platforms |    1 +
>  drivers/irqchip/Kconfig      |    6 ++++++
>  drivers/irqchip/Makefile     |    4 ++--
>  4 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> index c124d65..7a4fc8c 100644
> --- a/arch/arm/mach-sunxi/Kconfig
> +++ b/arch/arm/mach-sunxi/Kconfig
> @@ -4,9 +4,9 @@ menuconfig ARCH_SUNXI
>  	select ARCH_REQUIRE_GPIOLIB
>  	select ARCH_HAS_RESET_CONTROLLER
>  	select CLKSRC_MMIO
> -	select GENERIC_IRQ_CHIP
>  	select PINCTRL
>  	select SUN4I_TIMER
> +	select SUNXI_IRQCHIP
>  	select RESET_CONTROLLER
>  
>  if ARCH_SUNXI
> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
> index efa77c1..c77ad2d 100644
> --- a/arch/arm64/Kconfig.platforms
> +++ b/arch/arm64/Kconfig.platforms
> @@ -2,6 +2,7 @@ menu "Platform selection"
>  
>  config ARCH_SUNXI
>  	bool "Allwinner sunxi 64-bit SoC Family"
> +	select SUNXI_IRQCHIP
>  	help
>  	  This enables support for Allwinner sunxi based SoCs like the A64.
>  
> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
> index 3e12479..772c8ba 100644
> --- a/drivers/irqchip/Kconfig
> +++ b/drivers/irqchip/Kconfig
> @@ -165,6 +165,12 @@ config ST_IRQCHIP
>  	help
>  	  Enables SysCfg Controlled IRQs on STi based platforms.
>  
> +config SUNXI_IRQCHIP
> +	bool
> +	select GENERIC_IRQ_CHIP
> +	help
> +		Support for Allwinner A1x/A20/A31 SoCs NMI IRQ chip driver
> +
>  config TANGO_IRQ
>  	bool
>  	select IRQ_DOMAIN
> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
> index b03cfcb..c9626f4 100644
> --- a/drivers/irqchip/Makefile
> +++ b/drivers/irqchip/Makefile
> @@ -19,8 +19,8 @@ obj-$(CONFIG_CLPS711X_IRQCHIP)		+= irq-clps711x.o
>  obj-$(CONFIG_OR1K_PIC)			+= irq-or1k-pic.o
>  obj-$(CONFIG_ORION_IRQCHIP)		+= irq-orion.o
>  obj-$(CONFIG_OMAP_IRQCHIP)		+= irq-omap-intc.o
> -obj-$(CONFIG_ARCH_SUNXI)		+= irq-sun4i.o
> -obj-$(CONFIG_ARCH_SUNXI)		+= irq-sunxi-nmi.o
> +obj-$(CONFIG_SUNXI_IRQCHIP)		+= irq-sun4i.o
> +obj-$(CONFIG_SUNXI_IRQCHIP)		+= irq-sunxi-nmi.o

Those are two different drivers, that should be selected by different
SoCs (MACH_SUN4I and MACH_SUN5I for the former, SUN6I, SUN7I and SUN8I
for the latter)

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160413/67390468/attachment.sig>

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

* Re: [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP
  2016-04-13 20:07   ` Maxime Ripard
@ 2016-04-14  8:47     ` Suzuki K Poulose
  -1 siblings, 0 replies; 14+ messages in thread
From: Suzuki K Poulose @ 2016-04-14  8:47 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-arm-kernel, linux-kernel, arm, robh, Andre Przywara,
	Russell King, Chen-Yu Tsai, Catalin Marinas, Will Deacon,
	Thomas Gleixner, Jason Cooper, Marc Zyngier

On 13/04/16 21:07, Maxime Ripard wrote:
> Hi,
>
> On Wed, Apr 13, 2016 at 04:59:27PM +0100, Suzuki K Poulose wrote:
>> The sunxi-nmi and sun4i irq chips are selected by ARCH_SUNXI on both arm
>> and arm64 (recently added). However on arm64, we don't explicitly select
>> GENERIC_IRQ_CHIP which is required by the sunxi-nmi irq chip driver and
>> causes build breaks on 4.6-rc1 :

>> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
>> index b03cfcb..c9626f4 100644
>> --- a/drivers/irqchip/Makefile
>> +++ b/drivers/irqchip/Makefile
>> @@ -19,8 +19,8 @@ obj-$(CONFIG_CLPS711X_IRQCHIP)		+= irq-clps711x.o
>>   obj-$(CONFIG_OR1K_PIC)			+= irq-or1k-pic.o
>>   obj-$(CONFIG_ORION_IRQCHIP)		+= irq-orion.o
>>   obj-$(CONFIG_OMAP_IRQCHIP)		+= irq-omap-intc.o
>> -obj-$(CONFIG_ARCH_SUNXI)		+= irq-sun4i.o
>> -obj-$(CONFIG_ARCH_SUNXI)		+= irq-sunxi-nmi.o
>> +obj-$(CONFIG_SUNXI_IRQCHIP)		+= irq-sun4i.o
>> +obj-$(CONFIG_SUNXI_IRQCHIP)		+= irq-sunxi-nmi.o
>
> Those are two different drivers, that should be selected by different
> SoCs (MACH_SUN4I and MACH_SUN5I for the former, SUN6I, SUN7I and SUN8I
> for the latter)

OK. I had thought about that, but wasn't sure who needs what. So went with
what existed already. I can respin it.

Cheers
Suzuki

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

* [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP
@ 2016-04-14  8:47     ` Suzuki K Poulose
  0 siblings, 0 replies; 14+ messages in thread
From: Suzuki K Poulose @ 2016-04-14  8:47 UTC (permalink / raw)
  To: linux-arm-kernel

On 13/04/16 21:07, Maxime Ripard wrote:
> Hi,
>
> On Wed, Apr 13, 2016 at 04:59:27PM +0100, Suzuki K Poulose wrote:
>> The sunxi-nmi and sun4i irq chips are selected by ARCH_SUNXI on both arm
>> and arm64 (recently added). However on arm64, we don't explicitly select
>> GENERIC_IRQ_CHIP which is required by the sunxi-nmi irq chip driver and
>> causes build breaks on 4.6-rc1 :

>> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
>> index b03cfcb..c9626f4 100644
>> --- a/drivers/irqchip/Makefile
>> +++ b/drivers/irqchip/Makefile
>> @@ -19,8 +19,8 @@ obj-$(CONFIG_CLPS711X_IRQCHIP)		+= irq-clps711x.o
>>   obj-$(CONFIG_OR1K_PIC)			+= irq-or1k-pic.o
>>   obj-$(CONFIG_ORION_IRQCHIP)		+= irq-orion.o
>>   obj-$(CONFIG_OMAP_IRQCHIP)		+= irq-omap-intc.o
>> -obj-$(CONFIG_ARCH_SUNXI)		+= irq-sun4i.o
>> -obj-$(CONFIG_ARCH_SUNXI)		+= irq-sunxi-nmi.o
>> +obj-$(CONFIG_SUNXI_IRQCHIP)		+= irq-sun4i.o
>> +obj-$(CONFIG_SUNXI_IRQCHIP)		+= irq-sunxi-nmi.o
>
> Those are two different drivers, that should be selected by different
> SoCs (MACH_SUN4I and MACH_SUN5I for the former, SUN6I, SUN7I and SUN8I
> for the latter)

OK. I had thought about that, but wasn't sure who needs what. So went with
what existed already. I can respin it.

Cheers
Suzuki

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

* Re: [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP
  2016-04-14  8:47     ` Suzuki K Poulose
@ 2016-04-14  8:56       ` Suzuki K Poulose
  -1 siblings, 0 replies; 14+ messages in thread
From: Suzuki K Poulose @ 2016-04-14  8:56 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: linux-arm-kernel, linux-kernel, arm, robh, Andre Przywara,
	Russell King, Chen-Yu Tsai, Catalin Marinas, Will Deacon,
	Thomas Gleixner, Jason Cooper, Marc Zyngier

On 14/04/16 09:47, Suzuki K Poulose wrote:
> On 13/04/16 21:07, Maxime Ripard wrote:
>> Hi,
>>
>> On Wed, Apr 13, 2016 at 04:59:27PM +0100, Suzuki K Poulose wrote:
>>> The sunxi-nmi and sun4i irq chips are selected by ARCH_SUNXI on both arm
>>> and arm64 (recently added). However on arm64, we don't explicitly select
>>> GENERIC_IRQ_CHIP which is required by the sunxi-nmi irq chip driver and
>>> causes build breaks on 4.6-rc1 :
>
>>> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
>>> index b03cfcb..c9626f4 100644
>>> --- a/drivers/irqchip/Makefile
>>> +++ b/drivers/irqchip/Makefile
>>> @@ -19,8 +19,8 @@ obj-$(CONFIG_CLPS711X_IRQCHIP)        += irq-clps711x.o
>>>   obj-$(CONFIG_OR1K_PIC)            += irq-or1k-pic.o
>>>   obj-$(CONFIG_ORION_IRQCHIP)        += irq-orion.o
>>>   obj-$(CONFIG_OMAP_IRQCHIP)        += irq-omap-intc.o
>>> -obj-$(CONFIG_ARCH_SUNXI)        += irq-sun4i.o
>>> -obj-$(CONFIG_ARCH_SUNXI)        += irq-sunxi-nmi.o
>>> +obj-$(CONFIG_SUNXI_IRQCHIP)        += irq-sun4i.o
>>> +obj-$(CONFIG_SUNXI_IRQCHIP)        += irq-sunxi-nmi.o
>>
>> Those are two different drivers, that should be selected by different
>> SoCs (MACH_SUN4I and MACH_SUN5I for the former, SUN6I, SUN7I and SUN8I
>> for the latter)
>
> OK. I had thought about that, but wasn't sure who needs what. So went with
> what existed already. I can respin it.

As a follow up question, what does the arm64 port need ? just sunxi-nmi ? or both ?
I would be happy if someone who has better understanding of the dependencies can fix
it up, rather than me trying to figure out all the dependencies.

Cheers
Suzuki

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

* [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP
@ 2016-04-14  8:56       ` Suzuki K Poulose
  0 siblings, 0 replies; 14+ messages in thread
From: Suzuki K Poulose @ 2016-04-14  8:56 UTC (permalink / raw)
  To: linux-arm-kernel

On 14/04/16 09:47, Suzuki K Poulose wrote:
> On 13/04/16 21:07, Maxime Ripard wrote:
>> Hi,
>>
>> On Wed, Apr 13, 2016 at 04:59:27PM +0100, Suzuki K Poulose wrote:
>>> The sunxi-nmi and sun4i irq chips are selected by ARCH_SUNXI on both arm
>>> and arm64 (recently added). However on arm64, we don't explicitly select
>>> GENERIC_IRQ_CHIP which is required by the sunxi-nmi irq chip driver and
>>> causes build breaks on 4.6-rc1 :
>
>>> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
>>> index b03cfcb..c9626f4 100644
>>> --- a/drivers/irqchip/Makefile
>>> +++ b/drivers/irqchip/Makefile
>>> @@ -19,8 +19,8 @@ obj-$(CONFIG_CLPS711X_IRQCHIP)        += irq-clps711x.o
>>>   obj-$(CONFIG_OR1K_PIC)            += irq-or1k-pic.o
>>>   obj-$(CONFIG_ORION_IRQCHIP)        += irq-orion.o
>>>   obj-$(CONFIG_OMAP_IRQCHIP)        += irq-omap-intc.o
>>> -obj-$(CONFIG_ARCH_SUNXI)        += irq-sun4i.o
>>> -obj-$(CONFIG_ARCH_SUNXI)        += irq-sunxi-nmi.o
>>> +obj-$(CONFIG_SUNXI_IRQCHIP)        += irq-sun4i.o
>>> +obj-$(CONFIG_SUNXI_IRQCHIP)        += irq-sunxi-nmi.o
>>
>> Those are two different drivers, that should be selected by different
>> SoCs (MACH_SUN4I and MACH_SUN5I for the former, SUN6I, SUN7I and SUN8I
>> for the latter)
>
> OK. I had thought about that, but wasn't sure who needs what. So went with
> what existed already. I can respin it.

As a follow up question, what does the arm64 port need ? just sunxi-nmi ? or both ?
I would be happy if someone who has better understanding of the dependencies can fix
it up, rather than me trying to figure out all the dependencies.

Cheers
Suzuki

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

* Re: [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP
  2016-04-14  8:56       ` Suzuki K Poulose
@ 2016-04-14  9:15         ` Andre Przywara
  -1 siblings, 0 replies; 14+ messages in thread
From: Andre Przywara @ 2016-04-14  9:15 UTC (permalink / raw)
  To: Suzuki K Poulose, Maxime Ripard
  Cc: linux-arm-kernel, linux-kernel, arm, robh, Russell King,
	Chen-Yu Tsai, Catalin Marinas, Will Deacon, Thomas Gleixner,
	Jason Cooper, Marc Zyngier

Hi,

On 14/04/16 09:56, Suzuki K Poulose wrote:
> On 14/04/16 09:47, Suzuki K Poulose wrote:
>> On 13/04/16 21:07, Maxime Ripard wrote:
>>> Hi,
>>>
>>> On Wed, Apr 13, 2016 at 04:59:27PM +0100, Suzuki K Poulose wrote:
>>>> The sunxi-nmi and sun4i irq chips are selected by ARCH_SUNXI on both
>>>> arm
>>>> and arm64 (recently added). However on arm64, we don't explicitly
>>>> select
>>>> GENERIC_IRQ_CHIP which is required by the sunxi-nmi irq chip driver and
>>>> causes build breaks on 4.6-rc1 :
>>
>>>> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
>>>> index b03cfcb..c9626f4 100644
>>>> --- a/drivers/irqchip/Makefile
>>>> +++ b/drivers/irqchip/Makefile
>>>> @@ -19,8 +19,8 @@ obj-$(CONFIG_CLPS711X_IRQCHIP)        +=
>>>> irq-clps711x.o
>>>>   obj-$(CONFIG_OR1K_PIC)            += irq-or1k-pic.o
>>>>   obj-$(CONFIG_ORION_IRQCHIP)        += irq-orion.o
>>>>   obj-$(CONFIG_OMAP_IRQCHIP)        += irq-omap-intc.o
>>>> -obj-$(CONFIG_ARCH_SUNXI)        += irq-sun4i.o
>>>> -obj-$(CONFIG_ARCH_SUNXI)        += irq-sunxi-nmi.o
>>>> +obj-$(CONFIG_SUNXI_IRQCHIP)        += irq-sun4i.o
>>>> +obj-$(CONFIG_SUNXI_IRQCHIP)        += irq-sunxi-nmi.o
>>>
>>> Those are two different drivers, that should be selected by different
>>> SoCs (MACH_SUN4I and MACH_SUN5I for the former, SUN6I, SUN7I and SUN8I
>>> for the latter)

But actually they aren't at the moment - and this is a post-rc1 fix, so
I'd prefer to not introduce this right now.

I can bake a proper patch for 4.7 which separates the two, if people
want this change.

>> OK. I had thought about that, but wasn't sure who needs what. So went
>> with
>> what existed already. I can respin it.

I would rather not do this right now.
Maxime, can't we just go with this patch? That seems like the proper fix
for this part of the release cycle to me.

> As a follow up question, what does the arm64 port need ? just sunxi-nmi
> ? or both ?

Currently none of them, frankly.
irq-sun4i will definitely not be needed, and I don't see the NMI
controller documented in the manual (which does not mean too much, though).

So my hunch is that we may need the nmi driver in the future, but then
we can still enable it once we merge the respective DT node or add
support for a peripheral that needs it.

Cheers,
Andre.

> I would be happy if someone who has better understanding of the
> dependencies can fix
> it up, rather than me trying to figure out all the dependencies.

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

* [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP
@ 2016-04-14  9:15         ` Andre Przywara
  0 siblings, 0 replies; 14+ messages in thread
From: Andre Przywara @ 2016-04-14  9:15 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 14/04/16 09:56, Suzuki K Poulose wrote:
> On 14/04/16 09:47, Suzuki K Poulose wrote:
>> On 13/04/16 21:07, Maxime Ripard wrote:
>>> Hi,
>>>
>>> On Wed, Apr 13, 2016 at 04:59:27PM +0100, Suzuki K Poulose wrote:
>>>> The sunxi-nmi and sun4i irq chips are selected by ARCH_SUNXI on both
>>>> arm
>>>> and arm64 (recently added). However on arm64, we don't explicitly
>>>> select
>>>> GENERIC_IRQ_CHIP which is required by the sunxi-nmi irq chip driver and
>>>> causes build breaks on 4.6-rc1 :
>>
>>>> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
>>>> index b03cfcb..c9626f4 100644
>>>> --- a/drivers/irqchip/Makefile
>>>> +++ b/drivers/irqchip/Makefile
>>>> @@ -19,8 +19,8 @@ obj-$(CONFIG_CLPS711X_IRQCHIP)        +=
>>>> irq-clps711x.o
>>>>   obj-$(CONFIG_OR1K_PIC)            += irq-or1k-pic.o
>>>>   obj-$(CONFIG_ORION_IRQCHIP)        += irq-orion.o
>>>>   obj-$(CONFIG_OMAP_IRQCHIP)        += irq-omap-intc.o
>>>> -obj-$(CONFIG_ARCH_SUNXI)        += irq-sun4i.o
>>>> -obj-$(CONFIG_ARCH_SUNXI)        += irq-sunxi-nmi.o
>>>> +obj-$(CONFIG_SUNXI_IRQCHIP)        += irq-sun4i.o
>>>> +obj-$(CONFIG_SUNXI_IRQCHIP)        += irq-sunxi-nmi.o
>>>
>>> Those are two different drivers, that should be selected by different
>>> SoCs (MACH_SUN4I and MACH_SUN5I for the former, SUN6I, SUN7I and SUN8I
>>> for the latter)

But actually they aren't at the moment - and this is a post-rc1 fix, so
I'd prefer to not introduce this right now.

I can bake a proper patch for 4.7 which separates the two, if people
want this change.

>> OK. I had thought about that, but wasn't sure who needs what. So went
>> with
>> what existed already. I can respin it.

I would rather not do this right now.
Maxime, can't we just go with this patch? That seems like the proper fix
for this part of the release cycle to me.

> As a follow up question, what does the arm64 port need ? just sunxi-nmi
> ? or both ?

Currently none of them, frankly.
irq-sun4i will definitely not be needed, and I don't see the NMI
controller documented in the manual (which does not mean too much, though).

So my hunch is that we may need the nmi driver in the future, but then
we can still enable it once we merge the respective DT node or add
support for a peripheral that needs it.

Cheers,
Andre.

> I would be happy if someone who has better understanding of the
> dependencies can fix
> it up, rather than me trying to figure out all the dependencies.

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

* Re: [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP
  2016-04-14  9:15         ` Andre Przywara
@ 2016-04-14 17:12           ` Maxime Ripard
  -1 siblings, 0 replies; 14+ messages in thread
From: Maxime Ripard @ 2016-04-14 17:12 UTC (permalink / raw)
  To: Andre Przywara
  Cc: Suzuki K Poulose, linux-arm-kernel, linux-kernel, arm, robh,
	Russell King, Chen-Yu Tsai, Catalin Marinas, Will Deacon,
	Thomas Gleixner, Jason Cooper, Marc Zyngier

[-- Attachment #1: Type: text/plain, Size: 2311 bytes --]

On Thu, Apr 14, 2016 at 10:15:00AM +0100, Andre Przywara wrote:
> Hi,
> 
> On 14/04/16 09:56, Suzuki K Poulose wrote:
> > On 14/04/16 09:47, Suzuki K Poulose wrote:
> >> On 13/04/16 21:07, Maxime Ripard wrote:
> >>> Hi,
> >>>
> >>> On Wed, Apr 13, 2016 at 04:59:27PM +0100, Suzuki K Poulose wrote:
> >>>> The sunxi-nmi and sun4i irq chips are selected by ARCH_SUNXI on both
> >>>> arm
> >>>> and arm64 (recently added). However on arm64, we don't explicitly
> >>>> select
> >>>> GENERIC_IRQ_CHIP which is required by the sunxi-nmi irq chip driver and
> >>>> causes build breaks on 4.6-rc1 :
> >>
> >>>> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
> >>>> index b03cfcb..c9626f4 100644
> >>>> --- a/drivers/irqchip/Makefile
> >>>> +++ b/drivers/irqchip/Makefile
> >>>> @@ -19,8 +19,8 @@ obj-$(CONFIG_CLPS711X_IRQCHIP)        +=
> >>>> irq-clps711x.o
> >>>>   obj-$(CONFIG_OR1K_PIC)            += irq-or1k-pic.o
> >>>>   obj-$(CONFIG_ORION_IRQCHIP)        += irq-orion.o
> >>>>   obj-$(CONFIG_OMAP_IRQCHIP)        += irq-omap-intc.o
> >>>> -obj-$(CONFIG_ARCH_SUNXI)        += irq-sun4i.o
> >>>> -obj-$(CONFIG_ARCH_SUNXI)        += irq-sunxi-nmi.o
> >>>> +obj-$(CONFIG_SUNXI_IRQCHIP)        += irq-sun4i.o
> >>>> +obj-$(CONFIG_SUNXI_IRQCHIP)        += irq-sunxi-nmi.o
> >>>
> >>> Those are two different drivers, that should be selected by different
> >>> SoCs (MACH_SUN4I and MACH_SUN5I for the former, SUN6I, SUN7I and SUN8I
> >>> for the latter)
> 
> But actually they aren't at the moment - and this is a post-rc1 fix, so
> I'd prefer to not introduce this right now.
> 
> I can bake a proper patch for 4.7 which separates the two, if people
> want this change.
> 
> >> OK. I had thought about that, but wasn't sure who needs what. So went
> >> with
> >> what existed already. I can respin it.
> 
> I would rather not do this right now.
> Maxime, can't we just go with this patch? That seems like the proper fix
> for this part of the release cycle to me.

I don't really see the difference. We're going to shuffle around
Kconfig options anyway.

But yeah, if we have a patch properly fixing it in 4.7, fine by me.

Maxime

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP
@ 2016-04-14 17:12           ` Maxime Ripard
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Ripard @ 2016-04-14 17:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Apr 14, 2016 at 10:15:00AM +0100, Andre Przywara wrote:
> Hi,
> 
> On 14/04/16 09:56, Suzuki K Poulose wrote:
> > On 14/04/16 09:47, Suzuki K Poulose wrote:
> >> On 13/04/16 21:07, Maxime Ripard wrote:
> >>> Hi,
> >>>
> >>> On Wed, Apr 13, 2016 at 04:59:27PM +0100, Suzuki K Poulose wrote:
> >>>> The sunxi-nmi and sun4i irq chips are selected by ARCH_SUNXI on both
> >>>> arm
> >>>> and arm64 (recently added). However on arm64, we don't explicitly
> >>>> select
> >>>> GENERIC_IRQ_CHIP which is required by the sunxi-nmi irq chip driver and
> >>>> causes build breaks on 4.6-rc1 :
> >>
> >>>> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
> >>>> index b03cfcb..c9626f4 100644
> >>>> --- a/drivers/irqchip/Makefile
> >>>> +++ b/drivers/irqchip/Makefile
> >>>> @@ -19,8 +19,8 @@ obj-$(CONFIG_CLPS711X_IRQCHIP)        +=
> >>>> irq-clps711x.o
> >>>>   obj-$(CONFIG_OR1K_PIC)            += irq-or1k-pic.o
> >>>>   obj-$(CONFIG_ORION_IRQCHIP)        += irq-orion.o
> >>>>   obj-$(CONFIG_OMAP_IRQCHIP)        += irq-omap-intc.o
> >>>> -obj-$(CONFIG_ARCH_SUNXI)        += irq-sun4i.o
> >>>> -obj-$(CONFIG_ARCH_SUNXI)        += irq-sunxi-nmi.o
> >>>> +obj-$(CONFIG_SUNXI_IRQCHIP)        += irq-sun4i.o
> >>>> +obj-$(CONFIG_SUNXI_IRQCHIP)        += irq-sunxi-nmi.o
> >>>
> >>> Those are two different drivers, that should be selected by different
> >>> SoCs (MACH_SUN4I and MACH_SUN5I for the former, SUN6I, SUN7I and SUN8I
> >>> for the latter)
> 
> But actually they aren't at the moment - and this is a post-rc1 fix, so
> I'd prefer to not introduce this right now.
> 
> I can bake a proper patch for 4.7 which separates the two, if people
> want this change.
> 
> >> OK. I had thought about that, but wasn't sure who needs what. So went
> >> with
> >> what existed already. I can respin it.
> 
> I would rather not do this right now.
> Maxime, can't we just go with this patch? That seems like the proper fix
> for this part of the release cycle to me.

I don't really see the difference. We're going to shuffle around
Kconfig options anyway.

But yeah, if we have a patch properly fixing it in 4.7, fine by me.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160414/ff794836/attachment-0001.sig>

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

end of thread, other threads:[~2016-04-14 17:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 15:59 [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP Suzuki K Poulose
2016-04-13 15:59 ` Suzuki K Poulose
2016-04-13 16:18 ` Marc Zyngier
2016-04-13 16:18   ` Marc Zyngier
2016-04-13 20:07 ` Maxime Ripard
2016-04-13 20:07   ` Maxime Ripard
2016-04-14  8:47   ` Suzuki K Poulose
2016-04-14  8:47     ` Suzuki K Poulose
2016-04-14  8:56     ` Suzuki K Poulose
2016-04-14  8:56       ` Suzuki K Poulose
2016-04-14  9:15       ` Andre Przywara
2016-04-14  9:15         ` Andre Przywara
2016-04-14 17:12         ` Maxime Ripard
2016-04-14 17:12           ` Maxime Ripard

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.