From patchwork Thu Nov 3 10:39:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 690762 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t8hNh1d7vz9t3N for ; Thu, 3 Nov 2016 21:41:56 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2FRK-0005g4-Dn; Thu, 03 Nov 2016 10:40:10 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2FRG-0005I6-VE for linux-arm-kernel@lists.infradead.org; Thu, 03 Nov 2016 10:40:07 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D4CCA28; Thu, 3 Nov 2016 03:39:45 -0700 (PDT) Received: from [10.1.206.28] (e107814-lin.cambridge.arm.com [10.1.206.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ED8DB3F318; Thu, 3 Nov 2016 03:39:44 -0700 (PDT) Subject: Re: arm64 build failure with CONFIG_ARM64_LSE_ATOMICS=y To: Will Deacon , Artem Savkov References: <20161102164427.GB24243@shodan.usersys.redhat.com> <20161102232854.GO22791@arm.com> From: Suzuki K Poulose Message-ID: <1efb101a-a8ab-5ad9-f2bd-e7d485c71904@arm.com> Date: Thu, 3 Nov 2016 10:39:43 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161102232854.GO22791@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161103_034007_184732_4131C8D8 X-CRM114-Status: GOOD ( 11.55 ) X-Spam-Score: -8.3 (--------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-8.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.101.70 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org On 02/11/16 23:28, Will Deacon wrote: > Hi Artem, > > On Wed, Nov 02, 2016 at 05:44:27PM +0100, Artem Savkov wrote: >> Hello Catalin, >> >> Looks like your patch "efd9e03 arm64: Use static keys for CPU features" >> breaks arm64 build with "CONFIG_ARM64_LSE_ATOMICS=y" because it creates a >> circular dependency for asm/lse.h through jump_label.h: >> >> CC arch/arm64/kernel/asm-offsets.s >> In file included from ./arch/arm64/include/asm/atomic.h:34:0, >> from ./include/linux/atomic.h:4, >> from ./include/linux/jump_label.h:169, >> from ./arch/arm64/include/asm/cpufeature.h:12, >> from ./arch/arm64/include/asm/alternative.h:4, >> from ./arch/arm64/include/asm/lse.h:7, >> from ./arch/arm64/include/asm/spinlock.h:19, >> from ./include/linux/spinlock.h:87, >> from ./include/linux/seqlock.h:35, >> from ./include/linux/time.h:5, >> from ./include/uapi/linux/timex.h:56, >> from ./include/linux/timex.h:56, >> from ./include/linux/sched.h:19, >> from arch/arm64/kernel/asm-offsets.c:21: >> ./arch/arm64/include/asm/atomic_lse.h: In function ‘atomic_andnot’: >> ./arch/arm64/include/asm/atomic_lse.h:35:15: error: expected string literal before ‘ ’ >> asm volatile(ARM64_LSE_ATOMIC_INSN(__LL_SC_ATOMIC(op), \ >> >> ... >> >> ./arch/arm64/include/asm/cmpxchg.h: In function ‘__xchg_case_1’: >> ./arch/arm64/include/asm/cmpxchg.h:38:15: error: expected string literal before ‘ARM64_LSE_ATOMIC_INSN’ >> asm volatile(ARM64_LSE_ATOMIC_INSN( \ > > I'm unable to reproduce this. I've tried enabling LSE with defconfig and > mainline, using compilers that both do and don't support the instructions. I am not able to reproduce it either. One minor problem I see with the commit could be fixed with the following change : Does it help ? ----8>----- Suzuki Tested-by: Artem Savkov diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h index 758d74f..62db988 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -9,7 +9,6 @@ #ifndef __ASM_CPUFEATURE_H #define __ASM_CPUFEATURE_H -#include #include #include @@ -45,6 +44,7 @@ #ifndef __ASSEMBLY__ +#include #include /* CPU feature register tracking */