From patchwork Thu Feb 21 09:31:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 2171041 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 017AC3FCA4 for ; Thu, 21 Feb 2013 09:36:37 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U8SWe-0001em-Hd; Thu, 21 Feb 2013 09:33:12 +0000 Received: from co9ehsobe005.messaging.microsoft.com ([207.46.163.28] helo=co9outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U8SWb-0001e7-71 for linux-arm-kernel@lists.infradead.org; Thu, 21 Feb 2013 09:33:10 +0000 Received: from mail198-co9-R.bigfish.com (10.236.132.251) by CO9EHSOBE020.bigfish.com (10.236.130.83) with Microsoft SMTP Server id 14.1.225.23; Thu, 21 Feb 2013 09:33:06 +0000 Received: from mail198-co9 (localhost [127.0.0.1]) by mail198-co9-R.bigfish.com (Postfix) with ESMTP id 6B84AC4018D; Thu, 21 Feb 2013 09:33:06 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: -2 X-BigFish: VS-2(zz98dIc89bh1432Izz1f42h1ee6h1de0h1202h1e76h1d1ah1d2ahzz8275dhz2dh87h2a8h668h839h93fhd25hf0ah1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh162dh1631h1758h18e1h1946h19b5h1155h) X-FB-DOMAIN-IP-MATCH: fail Received: from mail198-co9 (localhost.localdomain [127.0.0.1]) by mail198-co9 (MessageSwitch) id 1361439182344459_31783; Thu, 21 Feb 2013 09:33:02 +0000 (UTC) Received: from CO9EHSMHS022.bigfish.com (unknown [10.236.132.245]) by mail198-co9.bigfish.com (Postfix) with ESMTP id 41F5D64004B; Thu, 21 Feb 2013 09:33:02 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO9EHSMHS022.bigfish.com (10.236.130.32) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 21 Feb 2013 09:30:40 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server (TLS) id 14.2.328.11; Thu, 21 Feb 2013 09:30:37 +0000 Received: from S2101-09.ap.freescale.net ([10.192.185.41]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r1L9UaCh030358; Thu, 21 Feb 2013 02:30:37 -0700 Date: Thu, 21 Feb 2013 17:31:07 +0800 From: Shawn Guo To: Mark Rutland Subject: Re: arm64 defconfig breakage (gpio) in next-20130218 Message-ID: <20130221093104.GB23442@S2101-09.ap.freescale.net> References: <20130218111410.GA10572@e106331-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130218111410.GA10572@e106331-lin.cambridge.arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: sigmatel.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130221_043309_418024_073CA819 X-CRM114-Status: GOOD ( 15.61 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [207.46.163.28 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Grant Likely , Catalin Marinas , Linus Walleij , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On Mon, Feb 18, 2013 at 11:14:10AM +0000, Mark Rutland wrote: > Hello, > > When I attempt to build a defconfig arm64 kernel from next-20130218, it fails > with the following complaints from gcc: > > In file included from include/linux/gpio.h:48:0, > from drivers/gpio/devres.c:18: > include/asm-generic/gpio.h: In function ‘gpio_get_value_cansleep’: > include/asm-generic/gpio.h:270:2: error: implicit declaration of function ‘__gpio_get_value’ [-Werror=implicit-function-declaration] > include/asm-generic/gpio.h: In function ‘gpio_set_value_cansleep’: > include/asm-generic/gpio.h:276:2: error: implicit declaration of function ‘__gpio_set_value’ [-Werror=implicit-function-declaration] > In file included from drivers/gpio/devres.c:18:0: > include/linux/gpio.h: At top level: > include/linux/gpio.h:60:19: error: redefinition of ‘gpio_cansleep’ > In file included from include/linux/gpio.h:48:0, > from drivers/gpio/devres.c:18: > include/asm-generic/gpio.h:262:19: note: previous definition of ‘gpio_cansleep’ was here > In file included from drivers/gpio/devres.c:18:0: > include/linux/gpio.h: In function ‘gpio_cansleep’: > include/linux/gpio.h:62:2: error: implicit declaration of function ‘__gpio_cansleep’ [-Werror=implicit-function-declaration] > include/linux/gpio.h: In function ‘gpio_to_irq’: > include/linux/gpio.h:67:2: error: implicit declaration of function ‘__gpio_to_irq’ [-Werror=implicit-function-declaration] > drivers/gpio/devres.c: In function ‘devm_gpio_release’: > drivers/gpio/devres.c:26:2: error: implicit declaration of function ‘gpio_free’ [-Werror=implicit-function-declaration] > drivers/gpio/devres.c: In function ‘devm_gpio_request’: > drivers/gpio/devres.c:60:2: error: implicit declaration of function ‘gpio_request’ [-Werror=implicit-function-declaration] > drivers/gpio/devres.c: In function ‘devm_gpio_request_one’: > drivers/gpio/devres.c:90:2: error: implicit declaration of function ‘gpio_request_one’ [-Werror=implicit-function-declaration] > cc1: some warnings being treated as errors > make[2]: *** [drivers/gpio/devres.o] Error 1 > make[1]: *** [drivers/gpio] Error 2 > > I've bisected this down to 0fa2fd9a0d: "Merge branch 'linusw/devel' of > git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git into > gpio/next". Both parent commits build fine. > > I've played around a bit, and selecting ARCH_REQUIRE_GPIOLIB in the arm64 > Kconfig fixes the issue, but I'm unfamilar with gpio{,lib} and I'm not sure > that's the best/correct way of solving this. Kconfig GENERIC_GPIO is designed as an option defined at architecture level and select by platform who knows how gpio driver/API is implemented. The following change should fix the error. Shawn diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index f532ce5..aca4a25 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -93,7 +93,7 @@ config IOMMU_HELPER def_bool SWIOTLB config GENERIC_GPIO - def_bool y + bool source "init/Kconfig"