From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752740AbcDMUHy (ORCPT ); Wed, 13 Apr 2016 16:07:54 -0400 Received: from down.free-electrons.com ([37.187.137.238]:53700 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752127AbcDMUHw (ORCPT ); Wed, 13 Apr 2016 16:07:52 -0400 Date: Wed, 13 Apr 2016 22:07:35 +0200 From: Maxime Ripard To: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, arm@kernel.org, robh@kernel.org, Andre Przywara , Russell King , Chen-Yu Tsai , Catalin Marinas , Will Deacon , Thomas Gleixner , Jason Cooper , Marc Zyngier Subject: Re: [PATCH v2] sunxi-irq: Fix Kconfig dependency on GENERIC_IRQ_CHIP Message-ID: <20160413200735.GC4005@lukather> References: <1460563167-18517-1-git-send-email-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mJm6k4Vb/yFcL9ZU" Content-Disposition: inline In-Reply-To: <1460563167-18517-1-git-send-email-suzuki.poulose@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --mJm6k4Vb/yFcL9ZU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 : >=20 > 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_al= t_chip' > drivers/built-in.o: In function `irq_domain_add_linear': > include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_o= ps' > include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_o= ps' > drivers/built-in.o: In function `sunxi_sc_nmi_irq_init': > drivers/irqchip/irq-sunxi-nmi.c:146: undefined reference to `irq_alloc_do= main_generic_chips' > drivers/irqchip/irq-sunxi-nmi.c:161: undefined reference to `irq_get_doma= in_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_s= et_bit' > drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_= clr_bit' >=20 > This patch fixes the dependency by introducing a separate Kconfig > symbol for sunxi irqchips which does the proper dependency selections. >=20 > Build tested on arm and arm64. >=20 > Fixes: commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option= ") > Suggested-by: Olof Johansson > Cc: Andre Przywara > Cc: Russell King > Cc: Maxime Ripard > Cc: Chen-Yu Tsai > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Thomas Gleixner > Cc: Jason Cooper > Cc: Marc Zyngier > Signed-off-by: Suzuki K Poulose > --- > 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(-) >=20 > 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 > =20 > 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" > =20 > 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. > =20 > 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. > =20 > +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) +=3D irq-clps711x.o > obj-$(CONFIG_OR1K_PIC) +=3D irq-or1k-pic.o > obj-$(CONFIG_ORION_IRQCHIP) +=3D irq-orion.o > obj-$(CONFIG_OMAP_IRQCHIP) +=3D irq-omap-intc.o > -obj-$(CONFIG_ARCH_SUNXI) +=3D irq-sun4i.o > -obj-$(CONFIG_ARCH_SUNXI) +=3D irq-sunxi-nmi.o > +obj-$(CONFIG_SUNXI_IRQCHIP) +=3D irq-sun4i.o > +obj-$(CONFIG_SUNXI_IRQCHIP) +=3D 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 --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --mJm6k4Vb/yFcL9ZU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXDqcHAAoJEBx+YmzsjxAgvU0QAKybAY1N2zWfoexS4v0GeeOs lGRVzPF+Dow6Aazwm5Ir+UIRuSUPJZITC2yk/Tdgem9d7zFSVQeTndzoRO8CWHQO dY0JqntsO15pZ08eOr353Eju/+LbQUMs2YHZFQT0Sz7+b1ciBK9EXHn5oW43mTtB Gw+eabPNsLTD0NVSRrMx30Nkn1woD9s0ilO6iHdW0C0vap5XFA299cHymSy9BgAB c3oOj/hufy7DnBfKMRel2eS4CaGCdhjtNwktwCOut2gUDleU2oPzxnAv0UAGKtLh 9abNIrSx1ZbpU+iMWKaUhhhjA8MIMQpfaK/sT0W+moT54uoC0j+2ntTtF+HYd/3B Eo+P2/Inxf9DBPVcRdJboT6kOnQ99UIcXkXpkfDB+qQuQdim1DZhZHnGsLvCKKYr nGQIMhThdDrB+l4Y3PsWhALKCVcifIWvW4KMuKeCm4Cl4sQbHGiFYf2aFVzYcpR2 mJenj3ueDtYCptaywJPluNArupvoMfVKu1UFBEKa7/LxhA6nkCk0TlMvFizZIG9z hrTXYjTEvVzeUd2CZynCkwzKJcH0MbCyj1VxDEP5nG4xQH/5NVlFvSlzX6ccatzm URUpaF6I9B1QZ/c6+U4dPDA2s2WehgUDzUk+eoxskppiPCMHpezpD9JExZW0JTA/ /bP+yqtSW8vyzJyvWp6y =qqdL -----END PGP SIGNATURE----- --mJm6k4Vb/yFcL9ZU--