From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757156AbcEENV5 (ORCPT ); Thu, 5 May 2016 09:21:57 -0400 Received: from down.free-electrons.com ([37.187.137.238]:52131 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755880AbcEENVy (ORCPT ); Thu, 5 May 2016 09:21:54 -0400 Date: Thu, 5 May 2016 15:21:46 +0200 From: Maxime Ripard To: Andre Przywara Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, arm@kernel.org, Rob Herring , suzuki.poulose@arm.com, Russell King , wens@csie.org, tglx@linutronix.de, Jason Cooper , marc.zyngier@arm.com Subject: Re: [PATCH v3] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP Message-ID: <20160505132146.GH17159@lukather> References: <1461546292-21110-1-git-send-email-andre.przywara@arm.com> <20160502064854.GL17159@lukather> <5729D2A0.70900@arm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p6+LJdTn2TZWk+EI" Content-Disposition: inline In-Reply-To: <5729D2A0.70900@arm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --p6+LJdTn2TZWk+EI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 04, 2016 at 11:44:48AM +0100, Andre Przywara wrote: > Hi Maxime, >=20 > On 02/05/16 07:48, Maxime Ripard wrote: > > Hi, > >=20 > > 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_chi= p_ops' > >> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chi= p_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_d= omain_generic_chip' > >> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_ma= sk_clr_bit' > >> drivers/irqchip/irq-sunxi-nmi.c:171: undefined reference to `irq_gc_ma= sk_set_bit' > >> drivers/irqchip/irq-sunxi-nmi.c:172: undefined reference to `irq_gc_ac= k_set_bit' > >> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_ma= sk_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 > >> Signed-off-by: Andre Przywara > >> --- > >> 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 > >> =20 > >> config MACH_SUN5I > >> bool "Allwinner A10s / A13 (sun5i) SoCs support" > >> default ARCH_SUNXI > >> select SUN5I_HSTIMER > >> + select SUN4I_IRQCHIP > >> =20 > >> 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. > >> =20 > >> +config SUN4I_IRQCHIP > >> + bool > >> + > >> +config SUNXI_NMI > >> + bool "Allwinner SoC NMI controller" > >> + default ARCH_SUNXI > >> + select GENERIC_IRQ_CHIP > >=20 > > This one is only used on SUN6I, SUN7I and SUN8I. There's no need to > > enable it for all the SoCs. >=20 > 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 --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --p6+LJdTn2TZWk+EI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXK0jqAAoJEBx+YmzsjxAgbdAP/iR9g5QflkVDH2rsYOvGn5zH 4+J/4nwI8JHb8nb3c7uj/9WLzmeOD9HcZ0sY/x+KcJtZOGaEjigRe9mx1pIGV43J esc7M+yICj/XcgOk5HO8Xso0dKJ1f76i5Otk4LIgCR69xdpF2WSb4nNej0NxwVik 71UV2UR1ksPPMldbB0soefhs92Xo+VpM10NvB8tz+k+z9nxP3iRVr7o65x7vIBnd BWABnFbU2sYKhhE/xcOTnTD31zutP4rr1JCluZV8d/O+suhmlhZMP+f270eT/YYZ nuuXA5gZ83WG1DbcPp8UB4QV2LeqSEkac1Pcw6/ZFUn+XNmg4N3vj81XsREGPAGr qxLio5taW0KKrkWuj5bP10ujBX55mHyrc+4lD1s6nnj3yQe2tUNvbMxIQu2rC7eX CZUAP8HCoYKTGQNj+8LtS8TVqD7b3DXAxlmbWpJXvdbpHqc0cogIiXUdhpesuE9u 2/arY9V2USURaaC1ph/+OkFtdIHegJmZebdu9nhRkB0Ys30+JrnJ6I5MBpdETziq V2KF4wBgZIJOLFVmX+n58LUImFrNOC/QclgJg2aht16kxkrE2l7uulnFquj6IHEe AObBHd5oG7nKNSsJ1gL7niEDWDUINmBqhKKA08sxcoo2/293SBEiWYMoGUwQH8z4 jc0AMQXGP+S0oGz7wRjo =8aXA -----END PGP SIGNATURE----- --p6+LJdTn2TZWk+EI--