From patchwork Fri Oct 16 19:19:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7420251 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2DB24BEEA4 for ; Fri, 16 Oct 2015 19:19:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E11912074E for ; Fri, 16 Oct 2015 19:19:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6869206C0 for ; Fri, 16 Oct 2015 19:19:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754340AbbJPTTP (ORCPT ); Fri, 16 Oct 2015 15:19:15 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:60935 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753855AbbJPTTO (ORCPT ); Fri, 16 Oct 2015 15:19:14 -0400 Received: from wuerfel.localnet ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0Mdurl-1aC7wB3Mbd-00Peov; Fri, 16 Oct 2015 21:19:10 +0200 From: Arnd Bergmann To: Stephen Boyd Cc: Andy Gross , arm@kernel.org, Olof Johansson , linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [GIT PULL] qcom SoC changes for 4.4 *RESEND* Date: Fri, 16 Oct 2015 21:19:06 +0200 Message-ID: <6622700.vqj78zoFs4@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <56212C3E.8010603@codeaurora.org> References: <1444860627-8258-1-git-send-email-agross@codeaurora.org> <5294153.vxTnuIq2gr@wuerfel> <56212C3E.8010603@codeaurora.org> MIME-Version: 1.0 X-Provags-ID: V03:K0:s1lfh8bYZQ+aA9kjrXXhmVI9//UkceDur76irBfN+Bw1QTj6JBn Rknf1+sLr1/OFy2+TBNgQAwJ/lbipYbwRcIk/CdhK5eLjSRcP3LqGOFW2qWUASZVxSdQrmW iil5QV8qcuI5w2P6CylwrKfq7DtIN5KTDE0JLXbAKwgtXpNh9YxvOzAgEyzhcC33YKEEOkO QHa3SUX14PtA8uddBxkMA== X-UI-Out-Filterresults: notjunk:1; V01:K0:mWqYUDncFO4=:ErrNMPMhOyqKnvL5LYaWFZ 9+dbVrb00VALbXsZNlIJF1Xc5q5LUyo3Fe+IX6DVJVx/wAZYsbC8hHOXE7GCcz0eCNplVSBzd EaXlUeQ92mbRZOWK3U1JPxzKJMdE/l4VaB2fGL0ahWZlRfRxozk1ZxvSIL8IfJ28naQ7JTeN1 WX6aGIqjFe1XwaCARwEAIfGB/uyXBrUKcAGFiMsE+FZbPuXv315ds3u+hWmA7Wb9MymvBrDEk YEttI3Qdup2E25C6Rpv+zk7Pf/9HDym4azNCVJePIA+dmidhs5IeJ9EVQWG0dnbjKxGNsclSE QF3tspEfO57AtZTfg6b3Vg4Q54bvlz2wL3Im3vaaPOnkBBbyBaDoCPQPETMmjMOlKXd91y8fD O4xravKZICrf6KFREAgNO6o+8aRze9G0L1/w7lzmnZ7vH44UXdh+gkRE7fT8gcyhZmvNXsAOX iL2h/Jw0dbWWLlCY1lFA+Is87uINp9vC2JNLaF05MzrICAeGEB2SwWzSx0epydx6QKCAxC5DI 6oMsvvHQYAlKEzGdy2OArcfTRFlKrrrAbve4sx8+8Sh5WWrME0iFhLsjKrHivubAp4zVKDzt3 AhiiBFTBqjlsMYbRLo05/wBIIuVBV6hK4CPEFMKvC7nO8PwKzgE0DlVdo1mX6a7b2FVgulPlc f/43r3T8Hytl3iRsb9g8GwSnl+NQwD+Pb4Ct1r0r0ahKM8VNEs806kKubIxIj4j4OcaN/jks5 Dy8rzm2qdNhUdwEt Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Friday 16 October 2015 09:56:30 Stephen Boyd wrote: > On 10/15/2015 02:05 PM, Arnd Bergmann wrote: > > > > This also seemed like the right place > > to add a bugfix that I had in my queue: > > > > commit 73ebb85444b0472d90bb70a1a9e6b5df3f92c14c > > Author: Arnd Bergmann > > Date: Tue Oct 13 17:05:39 2015 +0200 > > > > soc: qcom/smem: add HWSPINLOCK dependency > > > > This fixes a build error when smem is enabled without hwspinlock: > > > > drivers/built-in.o: In function `qcom_smem_alloc': > > rockchip-efuse.c:(.text+0x7a3e4): undefined reference to `__hwspin_lock_timeout' > > rockchip-efuse.c:(.text+0x7a568): undefined reference to `__hwspin_unlock' > > drivers/built-in.o: In function `qcom_smem_remove': > > rockchip-efuse.c:(.text+0x7a5cc): undefined reference to `hwspin_lock_free' > > drivers/built-in.o: In function `qcom_smem_probe': > > rockchip-efuse.c:(.text+0x7a960): undefined reference to `hwspin_lock_request_specific' > > rockchip-efuse.c:(.text+0x7a988): undefined reference to `of_hwspin_lock_get_id' > > drivers/built-in.o: In function `qcom_smem_get': > > rockchip-efuse.c:(.text+0x7aa24): undefined reference to `__hwspin_lock_timeout' > > rockchip-efuse.c:(.text+0x7aafc): undefined reference to `__hwspin_unlock' > > > > Can you share your .config? It looks like there are stubs for these, so > I'm lost how we got undefined references. > http://pastebin.com/HtrC510p The problem is CONFIG_HWSPINLOCK=m && CONFIG_QCOM_SMEM=y. Sorry for sending an incomplete patch description, I had not noticed those wrapper functions. My patch fixes the issue, but does not allow you to build QCOM_SMEM without HWSPINLOCK. If we want that configuration to be valid, we need one of the two changes below: Arnd --- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index eec76141d9b9..cae0ffa19bca 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -22,7 +22,7 @@ config QCOM_PM config QCOM_SMEM tristate "Qualcomm Shared Memory Manager (SMEM)" depends on ARCH_QCOM - depends on HWSPINLOCK + depends on HWSPINLOCK && !HWSPINLOCK help Say y here to enable support for the Qualcomm Shared Memory Manager. The driver provides an interface to items in a heap shared among all diff --git a/include/linux/hwspinlock.h b/include/linux/hwspinlock.h index 859d673d98c8..cdfd9fd2ba11 100644 --- a/include/linux/hwspinlock.h +++ b/include/linux/hwspinlock.h @@ -59,7 +59,7 @@ struct hwspinlock_pdata { int base_id; }; -#if defined(CONFIG_HWSPINLOCK) || defined(CONFIG_HWSPINLOCK_MODULE) +#if IS_REACHABLE(CONFIG_HWSPINLOCK) int hwspin_lock_register(struct hwspinlock_device *bank, struct device *dev, const struct hwspinlock_ops *ops, int base_id, int num_locks);