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: 9410709 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B73F860585 for ; Thu, 3 Nov 2016 10:41:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8F9C2A9A2 for ; Thu, 3 Nov 2016 10:41:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9DA7D2A9A4; Thu, 3 Nov 2016 10:41:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 438F02A9A2 for ; Thu, 3 Nov 2016 10:41:46 +0000 (UTC) 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-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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 */