* [PATCH v3] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP @ 2016-04-25 1:04 Andre Przywara 2016-05-02 6:48 ` Maxime Ripard 0 siblings, 1 reply; 7+ messages in thread From: Andre Przywara @ 2016-04-25 1:04 UTC (permalink / raw) To: linux-arm-kernel The Allwinner NMI irqchip driver requires GENERIC_IRQ_CHIP, but we can't select it directly, because there is no specific Kconfig entry for the driver. Compiling this NMI driver with certain arm64 configurations thus fails due to the missing dependency: 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' Add separate Kconfig options for both Allwinner specific irqchip drivers and select GENERIC_IRQ_CHIP for the NMI driver. The older sun4i IRQ driver only gets selected when support for these specific SoCs is compiled, while the NMI driver is selected for all Allwinner SoCs (copying the current behaviour and covering future SoCs automatically). Reported-by: Suzuki K Poulose <Suzuki.Poulose@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com> --- Hi, this is a new approach to the problem that Suzuki tried to address already. It separates the sun4i IRQ controller driver and the NMI driver as Maxime requested. While there should be no difference for the NMI driver, the sun4i driver now only gets selected for certain SoCs, which is admittedly a bold call for -rc5. If people find this too risky, I can bring the sun4i in line with the NMI driver (selected for all ARCH_SUNXI) for this release and re-create the more selective dependency as a merge window patch, so that it gets more testing. Please let me know. Cheers, Andre. arch/arm/mach-sunxi/Kconfig | 3 ++- drivers/irqchip/Kconfig | 8 ++++++++ drivers/irqchip/Makefile | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index c124d65..c092bc2 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -4,7 +4,6 @@ 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 RESET_CONTROLLER @@ -14,11 +13,13 @@ if ARCH_SUNXI config MACH_SUN4I bool "Allwinner A10 (sun4i) SoCs support" default ARCH_SUNXI + select SUN4I_IRQCHIP config MACH_SUN5I bool "Allwinner A10s / A13 (sun5i) SoCs support" default ARCH_SUNXI select SUN5I_HSTIMER + select SUN4I_IRQCHIP config MACH_SUN6I bool "Allwinner A31 (sun6i) SoCs support" diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index 3e12479..94f3f42 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -165,6 +165,14 @@ config ST_IRQCHIP help Enables SysCfg Controlled IRQs on STi based platforms. +config SUN4I_IRQCHIP + bool + +config SUNXI_NMI + bool "Allwinner SoC NMI controller" + default ARCH_SUNXI + select GENERIC_IRQ_CHIP + config TANGO_IRQ bool select IRQ_DOMAIN diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile index b03cfcb..34f2964 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_SUN4I_IRQCHIP) += irq-sun4i.o +obj-$(CONFIG_SUNXI_NMI) += 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 -- 2.7.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP 2016-04-25 1:04 [PATCH v3] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP Andre Przywara @ 2016-05-02 6:48 ` Maxime Ripard 2016-05-04 10:44 ` Andre Przywara 0 siblings, 1 reply; 7+ messages in thread From: Maxime Ripard @ 2016-05-02 6:48 UTC (permalink / raw) To: linux-arm-kernel Hi, On Mon, Apr 25, 2016 at 02:04:52AM +0100, Andre Przywara wrote: > The Allwinner NMI irqchip driver requires GENERIC_IRQ_CHIP, but > we can't select it directly, because there is no specific Kconfig entry > for the driver. Compiling this NMI driver with certain arm64 > configurations thus fails due to the missing dependency: > > 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' > > Add separate Kconfig options for both Allwinner specific irqchip > drivers and select GENERIC_IRQ_CHIP for the NMI driver. > The older sun4i IRQ driver only gets selected when support for these > specific SoCs is compiled, while the NMI driver is selected for all > Allwinner SoCs (copying the current behaviour and covering future SoCs > automatically). > > Reported-by: Suzuki K Poulose <Suzuki.Poulose@arm.com> > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > --- > Hi, > > this is a new approach to the problem that Suzuki tried to address > already. > It separates the sun4i IRQ controller driver and the NMI driver as > Maxime requested. > While there should be no difference for the NMI driver, the sun4i > driver now only gets selected for certain SoCs, which is admittedly > a bold call for -rc5. If people find this too risky, I can bring the > sun4i in line with the NMI driver (selected for all ARCH_SUNXI) for > this release and re-create the more selective dependency as a merge > window patch, so that it gets more testing. > Please let me know. > > Cheers, > Andre. > > arch/arm/mach-sunxi/Kconfig | 3 ++- > drivers/irqchip/Kconfig | 8 ++++++++ > drivers/irqchip/Makefile | 4 ++-- > 3 files changed, 12 insertions(+), 3 deletions(-) > > diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig > index c124d65..c092bc2 100644 > --- a/arch/arm/mach-sunxi/Kconfig > +++ b/arch/arm/mach-sunxi/Kconfig > @@ -4,7 +4,6 @@ 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 RESET_CONTROLLER > @@ -14,11 +13,13 @@ if ARCH_SUNXI > config MACH_SUN4I > bool "Allwinner A10 (sun4i) SoCs support" > default ARCH_SUNXI > + select SUN4I_IRQCHIP > > config MACH_SUN5I > bool "Allwinner A10s / A13 (sun5i) SoCs support" > default ARCH_SUNXI > select SUN5I_HSTIMER > + select SUN4I_IRQCHIP > > config MACH_SUN6I > bool "Allwinner A31 (sun6i) SoCs support" > diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig > index 3e12479..94f3f42 100644 > --- a/drivers/irqchip/Kconfig > +++ b/drivers/irqchip/Kconfig > @@ -165,6 +165,14 @@ config ST_IRQCHIP > help > Enables SysCfg Controlled IRQs on STi based platforms. > > +config SUN4I_IRQCHIP > + bool > + > +config SUNXI_NMI > + bool "Allwinner SoC NMI controller" > + default ARCH_SUNXI > + select GENERIC_IRQ_CHIP This one is only used on SUN6I, SUN7I and SUN8I. There's no need to enable it for all the SoCs. 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: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160502/d0f52893/attachment.sig> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP 2016-05-02 6:48 ` Maxime Ripard @ 2016-05-04 10:44 ` Andre Przywara 2016-05-04 12:02 ` Marc Zyngier 2016-05-05 13:21 ` Maxime Ripard 0 siblings, 2 replies; 7+ messages in thread From: Andre Przywara @ 2016-05-04 10:44 UTC (permalink / raw) To: linux-arm-kernel Hi Maxime, On 02/05/16 07:48, Maxime Ripard wrote: > Hi, > > On Mon, Apr 25, 2016 at 02:04:52AM +0100, Andre Przywara wrote: >> The Allwinner NMI irqchip driver requires GENERIC_IRQ_CHIP, but >> we can't select it directly, because there is no specific Kconfig entry >> for the driver. Compiling this NMI driver with certain arm64 >> configurations thus fails due to the missing dependency: >> >> 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' >> >> Add separate Kconfig options for both Allwinner specific irqchip >> drivers and select GENERIC_IRQ_CHIP for the NMI driver. >> The older sun4i IRQ driver only gets selected when support for these >> specific SoCs is compiled, while the NMI driver is selected for all >> Allwinner SoCs (copying the current behaviour and covering future SoCs >> automatically). >> >> Reported-by: Suzuki K Poulose <Suzuki.Poulose@arm.com> >> Signed-off-by: Andre Przywara <andre.przywara@arm.com> >> --- >> Hi, >> >> this is a new approach to the problem that Suzuki tried to address >> already. >> It separates the sun4i IRQ controller driver and the NMI driver as >> Maxime requested. >> While there should be no difference for the NMI driver, the sun4i >> driver now only gets selected for certain SoCs, which is admittedly >> a bold call for -rc5. If people find this too risky, I can bring the >> sun4i in line with the NMI driver (selected for all ARCH_SUNXI) for >> this release and re-create the more selective dependency as a merge >> window patch, so that it gets more testing. >> Please let me know. >> >> Cheers, >> Andre. >> >> arch/arm/mach-sunxi/Kconfig | 3 ++- >> drivers/irqchip/Kconfig | 8 ++++++++ >> drivers/irqchip/Makefile | 4 ++-- >> 3 files changed, 12 insertions(+), 3 deletions(-) >> >> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig >> index c124d65..c092bc2 100644 >> --- a/arch/arm/mach-sunxi/Kconfig >> +++ b/arch/arm/mach-sunxi/Kconfig >> @@ -4,7 +4,6 @@ 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 RESET_CONTROLLER >> @@ -14,11 +13,13 @@ if ARCH_SUNXI >> config MACH_SUN4I >> bool "Allwinner A10 (sun4i) SoCs support" >> default ARCH_SUNXI >> + select SUN4I_IRQCHIP >> >> config MACH_SUN5I >> bool "Allwinner A10s / A13 (sun5i) SoCs support" >> default ARCH_SUNXI >> select SUN5I_HSTIMER >> + select SUN4I_IRQCHIP >> >> config MACH_SUN6I >> bool "Allwinner A31 (sun6i) SoCs support" >> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig >> index 3e12479..94f3f42 100644 >> --- a/drivers/irqchip/Kconfig >> +++ b/drivers/irqchip/Kconfig >> @@ -165,6 +165,14 @@ config ST_IRQCHIP >> help >> Enables SysCfg Controlled IRQs on STi based platforms. >> >> +config SUN4I_IRQCHIP >> + bool >> + >> +config SUNXI_NMI >> + bool "Allwinner SoC NMI controller" >> + default ARCH_SUNXI >> + select GENERIC_IRQ_CHIP > > This one is only used on SUN6I, SUN7I and SUN8I. There's no need to > enable it for all the SoCs. But it is enabled for all SoCs at the moment - and as it is actually a fix (-rc1 does not compile for certain arm64 configs) I'd really like to not take chances here. As mentioned I am happy to send a follow up patch to restrict it further - given that it gets more testing, but at the moment I'd really like to just fix the arm64 build without accidentally breaking existing arm(32) boards. Also as you mention sun8i here: AFAIK the H3, which I consider the 32-bit sibling of the A64, is an sun8i, so it will include the code, but the A64 does not (atm) - which is a bit strange. As I don't plan to have MACH_SUN<n>I defines for arm64 unless desperately necessary, I'd really like to keep in on ARCH_SUNXI as it is in the moment. So how do we proceed from here? Is this too late for 4.6 now? That would be a pity as this qualifies as a fix. If not, I'd rather take this conservative patch for now and put a more fine grained selection into -next (or 4.7-rc1). Cheers, Andre. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP 2016-05-04 10:44 ` Andre Przywara @ 2016-05-04 12:02 ` Marc Zyngier 2016-05-05 13:21 ` Maxime Ripard 1 sibling, 0 replies; 7+ messages in thread From: Marc Zyngier @ 2016-05-04 12:02 UTC (permalink / raw) To: linux-arm-kernel On 04/05/16 11:44, Andre Przywara wrote: > Hi Maxime, > > On 02/05/16 07:48, Maxime Ripard wrote: >> Hi, >> >> On Mon, Apr 25, 2016 at 02:04:52AM +0100, Andre Przywara wrote: >>> The Allwinner NMI irqchip driver requires GENERIC_IRQ_CHIP, but >>> we can't select it directly, because there is no specific Kconfig entry >>> for the driver. Compiling this NMI driver with certain arm64 >>> configurations thus fails due to the missing dependency: >>> >>> 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' >>> >>> Add separate Kconfig options for both Allwinner specific irqchip >>> drivers and select GENERIC_IRQ_CHIP for the NMI driver. >>> The older sun4i IRQ driver only gets selected when support for these >>> specific SoCs is compiled, while the NMI driver is selected for all >>> Allwinner SoCs (copying the current behaviour and covering future SoCs >>> automatically). >>> >>> Reported-by: Suzuki K Poulose <Suzuki.Poulose@arm.com> >>> Signed-off-by: Andre Przywara <andre.przywara@arm.com> >>> --- >>> Hi, >>> >>> this is a new approach to the problem that Suzuki tried to address >>> already. >>> It separates the sun4i IRQ controller driver and the NMI driver as >>> Maxime requested. >>> While there should be no difference for the NMI driver, the sun4i >>> driver now only gets selected for certain SoCs, which is admittedly >>> a bold call for -rc5. If people find this too risky, I can bring the >>> sun4i in line with the NMI driver (selected for all ARCH_SUNXI) for >>> this release and re-create the more selective dependency as a merge >>> window patch, so that it gets more testing. >>> Please let me know. >>> >>> Cheers, >>> Andre. >>> >>> arch/arm/mach-sunxi/Kconfig | 3 ++- >>> drivers/irqchip/Kconfig | 8 ++++++++ >>> drivers/irqchip/Makefile | 4 ++-- >>> 3 files changed, 12 insertions(+), 3 deletions(-) >>> >>> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig >>> index c124d65..c092bc2 100644 >>> --- a/arch/arm/mach-sunxi/Kconfig >>> +++ b/arch/arm/mach-sunxi/Kconfig >>> @@ -4,7 +4,6 @@ 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 RESET_CONTROLLER >>> @@ -14,11 +13,13 @@ if ARCH_SUNXI >>> config MACH_SUN4I >>> bool "Allwinner A10 (sun4i) SoCs support" >>> default ARCH_SUNXI >>> + select SUN4I_IRQCHIP >>> >>> config MACH_SUN5I >>> bool "Allwinner A10s / A13 (sun5i) SoCs support" >>> default ARCH_SUNXI >>> select SUN5I_HSTIMER >>> + select SUN4I_IRQCHIP >>> >>> config MACH_SUN6I >>> bool "Allwinner A31 (sun6i) SoCs support" >>> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig >>> index 3e12479..94f3f42 100644 >>> --- a/drivers/irqchip/Kconfig >>> +++ b/drivers/irqchip/Kconfig >>> @@ -165,6 +165,14 @@ config ST_IRQCHIP >>> help >>> Enables SysCfg Controlled IRQs on STi based platforms. >>> >>> +config SUN4I_IRQCHIP >>> + bool >>> + >>> +config SUNXI_NMI >>> + bool "Allwinner SoC NMI controller" >>> + default ARCH_SUNXI >>> + select GENERIC_IRQ_CHIP >> >> This one is only used on SUN6I, SUN7I and SUN8I. There's no need to >> enable it for all the SoCs. > > But it is enabled for all SoCs at the moment - and as it is actually a > fix (-rc1 does not compile for certain arm64 configs) I'd really like to > not take chances here. If there is an arm64 config that breaks, let's revert the patch that introduces the breakage (ce3dd55), because it doesn't look like we're making forward progress on this (and given that we're -rc6, that's probably a suitable course of action). We can always merge the fixed patch when the interested parties have settled on a suitable shade of green for the shed... Thanks, M. -- Jazz is not dead. It just smells funny... ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP 2016-05-04 10:44 ` Andre Przywara 2016-05-04 12:02 ` Marc Zyngier @ 2016-05-05 13:21 ` Maxime Ripard 2016-05-05 14:16 ` Andre Przywara 1 sibling, 1 reply; 7+ messages in thread From: Maxime Ripard @ 2016-05-05 13:21 UTC (permalink / raw) To: linux-arm-kernel On Wed, May 04, 2016 at 11:44:48AM +0100, Andre Przywara wrote: > Hi Maxime, > > On 02/05/16 07:48, Maxime Ripard wrote: > > Hi, > > > > On Mon, Apr 25, 2016 at 02:04:52AM +0100, Andre Przywara wrote: > >> The Allwinner NMI irqchip driver requires GENERIC_IRQ_CHIP, but > >> we can't select it directly, because there is no specific Kconfig entry > >> for the driver. Compiling this NMI driver with certain arm64 > >> configurations thus fails due to the missing dependency: > >> > >> 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' > >> > >> Add separate Kconfig options for both Allwinner specific irqchip > >> drivers and select GENERIC_IRQ_CHIP for the NMI driver. > >> The older sun4i IRQ driver only gets selected when support for these > >> specific SoCs is compiled, while the NMI driver is selected for all > >> Allwinner SoCs (copying the current behaviour and covering future SoCs > >> automatically). > >> > >> Reported-by: Suzuki K Poulose <Suzuki.Poulose@arm.com> > >> Signed-off-by: Andre Przywara <andre.przywara@arm.com> > >> --- > >> Hi, > >> > >> this is a new approach to the problem that Suzuki tried to address > >> already. > >> It separates the sun4i IRQ controller driver and the NMI driver as > >> Maxime requested. > >> While there should be no difference for the NMI driver, the sun4i > >> driver now only gets selected for certain SoCs, which is admittedly > >> a bold call for -rc5. If people find this too risky, I can bring the > >> sun4i in line with the NMI driver (selected for all ARCH_SUNXI) for > >> this release and re-create the more selective dependency as a merge > >> window patch, so that it gets more testing. > >> Please let me know. > >> > >> Cheers, > >> Andre. > >> > >> arch/arm/mach-sunxi/Kconfig | 3 ++- > >> drivers/irqchip/Kconfig | 8 ++++++++ > >> drivers/irqchip/Makefile | 4 ++-- > >> 3 files changed, 12 insertions(+), 3 deletions(-) > >> > >> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig > >> index c124d65..c092bc2 100644 > >> --- a/arch/arm/mach-sunxi/Kconfig > >> +++ b/arch/arm/mach-sunxi/Kconfig > >> @@ -4,7 +4,6 @@ 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 RESET_CONTROLLER > >> @@ -14,11 +13,13 @@ if ARCH_SUNXI > >> config MACH_SUN4I > >> bool "Allwinner A10 (sun4i) SoCs support" > >> default ARCH_SUNXI > >> + select SUN4I_IRQCHIP > >> > >> config MACH_SUN5I > >> bool "Allwinner A10s / A13 (sun5i) SoCs support" > >> default ARCH_SUNXI > >> select SUN5I_HSTIMER > >> + select SUN4I_IRQCHIP > >> > >> config MACH_SUN6I > >> bool "Allwinner A31 (sun6i) SoCs support" > >> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig > >> index 3e12479..94f3f42 100644 > >> --- a/drivers/irqchip/Kconfig > >> +++ b/drivers/irqchip/Kconfig > >> @@ -165,6 +165,14 @@ config ST_IRQCHIP > >> help > >> Enables SysCfg Controlled IRQs on STi based platforms. > >> > >> +config SUN4I_IRQCHIP > >> + bool > >> + > >> +config SUNXI_NMI > >> + bool "Allwinner SoC NMI controller" > >> + default ARCH_SUNXI > >> + select GENERIC_IRQ_CHIP > > > > This one is only used on SUN6I, SUN7I and SUN8I. There's no need to > > enable it for all the SoCs. > > But it is enabled for all SoCs at the moment - and as it is actually a > fix (-rc1 does not compile for certain arm64 configs) I'd really like to > not take chances here. > As mentioned I am happy to send a follow up patch to restrict it further > - given that it gets more testing, but at the moment I'd really like to > just fix the arm64 build without accidentally breaking existing arm(32) > boards. Then at least be consistent and do the same thing for the A10 irq controller too. 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: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160505/f9ed910f/attachment.sig> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP 2016-05-05 13:21 ` Maxime Ripard @ 2016-05-05 14:16 ` Andre Przywara 2016-05-08 19:13 ` Maxime Ripard 0 siblings, 1 reply; 7+ messages in thread From: Andre Przywara @ 2016-05-05 14:16 UTC (permalink / raw) To: linux-arm-kernel Hi Maxime, On 05/05/16 14:21, Maxime Ripard wrote: > On Wed, May 04, 2016 at 11:44:48AM +0100, Andre Przywara wrote: >> Hi Maxime, >> >> On 02/05/16 07:48, Maxime Ripard wrote: >>> Hi, >>> >>> On Mon, Apr 25, 2016 at 02:04:52AM +0100, Andre Przywara wrote: >>>> The Allwinner NMI irqchip driver requires GENERIC_IRQ_CHIP, but >>>> we can't select it directly, because there is no specific Kconfig entry >>>> for the driver. Compiling this NMI driver with certain arm64 >>>> configurations thus fails due to the missing dependency: >>>> >>>> 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' >>>> >>>> Add separate Kconfig options for both Allwinner specific irqchip >>>> drivers and select GENERIC_IRQ_CHIP for the NMI driver. >>>> The older sun4i IRQ driver only gets selected when support for these >>>> specific SoCs is compiled, while the NMI driver is selected for all >>>> Allwinner SoCs (copying the current behaviour and covering future SoCs >>>> automatically). >>>> >>>> Reported-by: Suzuki K Poulose <Suzuki.Poulose@arm.com> >>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com> >>>> --- >>>> Hi, >>>> >>>> this is a new approach to the problem that Suzuki tried to address >>>> already. >>>> It separates the sun4i IRQ controller driver and the NMI driver as >>>> Maxime requested. >>>> While there should be no difference for the NMI driver, the sun4i >>>> driver now only gets selected for certain SoCs, which is admittedly >>>> a bold call for -rc5. If people find this too risky, I can bring the >>>> sun4i in line with the NMI driver (selected for all ARCH_SUNXI) for >>>> this release and re-create the more selective dependency as a merge >>>> window patch, so that it gets more testing. >>>> Please let me know. >>>> >>>> Cheers, >>>> Andre. >>>> >>>> arch/arm/mach-sunxi/Kconfig | 3 ++- >>>> drivers/irqchip/Kconfig | 8 ++++++++ >>>> drivers/irqchip/Makefile | 4 ++-- >>>> 3 files changed, 12 insertions(+), 3 deletions(-) >>>> >>>> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig >>>> index c124d65..c092bc2 100644 >>>> --- a/arch/arm/mach-sunxi/Kconfig >>>> +++ b/arch/arm/mach-sunxi/Kconfig >>>> @@ -4,7 +4,6 @@ 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 RESET_CONTROLLER >>>> @@ -14,11 +13,13 @@ if ARCH_SUNXI >>>> config MACH_SUN4I >>>> bool "Allwinner A10 (sun4i) SoCs support" >>>> default ARCH_SUNXI >>>> + select SUN4I_IRQCHIP >>>> >>>> config MACH_SUN5I >>>> bool "Allwinner A10s / A13 (sun5i) SoCs support" >>>> default ARCH_SUNXI >>>> select SUN5I_HSTIMER >>>> + select SUN4I_IRQCHIP >>>> >>>> config MACH_SUN6I >>>> bool "Allwinner A31 (sun6i) SoCs support" >>>> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig >>>> index 3e12479..94f3f42 100644 >>>> --- a/drivers/irqchip/Kconfig >>>> +++ b/drivers/irqchip/Kconfig >>>> @@ -165,6 +165,14 @@ config ST_IRQCHIP >>>> help >>>> Enables SysCfg Controlled IRQs on STi based platforms. >>>> >>>> +config SUN4I_IRQCHIP >>>> + bool >>>> + >>>> +config SUNXI_NMI >>>> + bool "Allwinner SoC NMI controller" >>>> + default ARCH_SUNXI >>>> + select GENERIC_IRQ_CHIP >>> >>> This one is only used on SUN6I, SUN7I and SUN8I. There's no need to >>> enable it for all the SoCs. >> >> But it is enabled for all SoCs at the moment - and as it is actually a >> fix (-rc1 does not compile for certain arm64 configs) I'd really like to >> not take chances here. >> As mentioned I am happy to send a follow up patch to restrict it further >> - given that it gets more testing, but at the moment I'd really like to >> just fix the arm64 build without accidentally breaking existing arm(32) >> boards. > > Then at least be consistent and do the same thing for the A10 irq > controller too. Which is basically what Suzuki proposed with v2: https://lkml.org/lkml/2016/4/13/592 This patch also has been acked by Marc, so can't we just take that for 4.6 and I'll send a patch on top of that to make a more fine grained selection for the next release? Cheers, Andre. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP 2016-05-05 14:16 ` Andre Przywara @ 2016-05-08 19:13 ` Maxime Ripard 0 siblings, 0 replies; 7+ messages in thread From: Maxime Ripard @ 2016-05-08 19:13 UTC (permalink / raw) To: linux-arm-kernel On Thu, May 05, 2016 at 03:16:44PM +0100, Andre Przywara wrote: > Hi Maxime, > > On 05/05/16 14:21, Maxime Ripard wrote: > > On Wed, May 04, 2016 at 11:44:48AM +0100, Andre Przywara wrote: > >> Hi Maxime, > >> > >> On 02/05/16 07:48, Maxime Ripard wrote: > >>> Hi, > >>> > >>> On Mon, Apr 25, 2016 at 02:04:52AM +0100, Andre Przywara wrote: > >>>> The Allwinner NMI irqchip driver requires GENERIC_IRQ_CHIP, but > >>>> we can't select it directly, because there is no specific Kconfig entry > >>>> for the driver. Compiling this NMI driver with certain arm64 > >>>> configurations thus fails due to the missing dependency: > >>>> > >>>> 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' > >>>> > >>>> Add separate Kconfig options for both Allwinner specific irqchip > >>>> drivers and select GENERIC_IRQ_CHIP for the NMI driver. > >>>> The older sun4i IRQ driver only gets selected when support for these > >>>> specific SoCs is compiled, while the NMI driver is selected for all > >>>> Allwinner SoCs (copying the current behaviour and covering future SoCs > >>>> automatically). > >>>> > >>>> Reported-by: Suzuki K Poulose <Suzuki.Poulose@arm.com> > >>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com> > >>>> --- > >>>> Hi, > >>>> > >>>> this is a new approach to the problem that Suzuki tried to address > >>>> already. > >>>> It separates the sun4i IRQ controller driver and the NMI driver as > >>>> Maxime requested. > >>>> While there should be no difference for the NMI driver, the sun4i > >>>> driver now only gets selected for certain SoCs, which is admittedly > >>>> a bold call for -rc5. If people find this too risky, I can bring the > >>>> sun4i in line with the NMI driver (selected for all ARCH_SUNXI) for > >>>> this release and re-create the more selective dependency as a merge > >>>> window patch, so that it gets more testing. > >>>> Please let me know. > >>>> > >>>> Cheers, > >>>> Andre. > >>>> > >>>> arch/arm/mach-sunxi/Kconfig | 3 ++- > >>>> drivers/irqchip/Kconfig | 8 ++++++++ > >>>> drivers/irqchip/Makefile | 4 ++-- > >>>> 3 files changed, 12 insertions(+), 3 deletions(-) > >>>> > >>>> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig > >>>> index c124d65..c092bc2 100644 > >>>> --- a/arch/arm/mach-sunxi/Kconfig > >>>> +++ b/arch/arm/mach-sunxi/Kconfig > >>>> @@ -4,7 +4,6 @@ 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 RESET_CONTROLLER > >>>> @@ -14,11 +13,13 @@ if ARCH_SUNXI > >>>> config MACH_SUN4I > >>>> bool "Allwinner A10 (sun4i) SoCs support" > >>>> default ARCH_SUNXI > >>>> + select SUN4I_IRQCHIP > >>>> > >>>> config MACH_SUN5I > >>>> bool "Allwinner A10s / A13 (sun5i) SoCs support" > >>>> default ARCH_SUNXI > >>>> select SUN5I_HSTIMER > >>>> + select SUN4I_IRQCHIP > >>>> > >>>> config MACH_SUN6I > >>>> bool "Allwinner A31 (sun6i) SoCs support" > >>>> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig > >>>> index 3e12479..94f3f42 100644 > >>>> --- a/drivers/irqchip/Kconfig > >>>> +++ b/drivers/irqchip/Kconfig > >>>> @@ -165,6 +165,14 @@ config ST_IRQCHIP > >>>> help > >>>> Enables SysCfg Controlled IRQs on STi based platforms. > >>>> > >>>> +config SUN4I_IRQCHIP > >>>> + bool > >>>> + > >>>> +config SUNXI_NMI > >>>> + bool "Allwinner SoC NMI controller" > >>>> + default ARCH_SUNXI > >>>> + select GENERIC_IRQ_CHIP > >>> > >>> This one is only used on SUN6I, SUN7I and SUN8I. There's no need to > >>> enable it for all the SoCs. > >> > >> But it is enabled for all SoCs at the moment - and as it is actually a > >> fix (-rc1 does not compile for certain arm64 configs) I'd really like to > >> not take chances here. > >> As mentioned I am happy to send a follow up patch to restrict it further > >> - given that it gets more testing, but at the moment I'd really like to > >> just fix the arm64 build without accidentally breaking existing arm(32) > >> boards. > > > > Then at least be consistent and do the same thing for the A10 irq > > controller too. > > Which is basically what Suzuki proposed with v2: > https://lkml.org/lkml/2016/4/13/592 And I already told that this was the wrong approach back then. A month down the road, we still have made no progress. > This patch also has been acked by Marc, so can't we just take that for > 4.6 and I'll send a patch on top of that to make a more fine grained > selection for the next release? I'm really not a fan of holding people hostage to get patches merged, but yeah, go ahead. We're very close from the merge window now, so I guess I won't even have a proper patch in 4.7... Great. 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: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160508/c24a883e/attachment.sig> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-05-08 19:13 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-04-25 1:04 [PATCH v3] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP Andre Przywara 2016-05-02 6:48 ` Maxime Ripard 2016-05-04 10:44 ` Andre Przywara 2016-05-04 12:02 ` Marc Zyngier 2016-05-05 13:21 ` Maxime Ripard 2016-05-05 14:16 ` Andre Przywara 2016-05-08 19:13 ` Maxime Ripard
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).