From patchwork Thu Jan 3 21:48:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10747819 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 74FF06C5 for ; Thu, 3 Jan 2019 21:48:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62AAB212E8 for ; Thu, 3 Jan 2019 21:48:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 55B7522BF1; Thu, 3 Jan 2019 21:48:24 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 10C5E212E8 for ; Thu, 3 Jan 2019 21:48:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HQ+lyyQIOALg5ENtaXRINILNSjelmQWmpayd365dkKY=; b=j/piDV662JeZX2 zVF2P38qNWqOf7kXiQaZFce7Z6RIs+4719JECq1kUJXxe9P2P68W7MX1Oaw2mQZu/+XtktOvxtxVi 7HgW4dYGOc8wDPdwb1iFQQONckGoEmHVB5G36gfwWuBlJrN2/dh9hNwUP2vftm3rHlhBsEqBhJ83X d8/x2yfVDjsbhzOi1C7oCrP236ZPNrysgZnjG9pjH3fcOLFnUzl+92Y7u2TWs8BdqDOrhr+3RWH3e XMOtvgLoEcZvCnkGSgpgn/4bquA/rSOMQOpgBXrn8rO6zUV4StPv5CHwRaYkT1kfTXRYTqcfw2FRj +BZgpQbh18Qc4B6RVFWQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gfAqk-0001EJ-21; Thu, 03 Jan 2019 21:48:22 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gfAqW-00014X-GQ for linux-arm-kernel@lists.infradead.org; Thu, 03 Jan 2019 21:48:10 +0000 Received: from zyt.lan (unknown [IPv6:2a02:169:3465::564]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 95C825C0C23; Thu, 3 Jan 2019 22:48:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1546552084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4b4Aplok1v5A3OAOr1AuVES09IdBt8fC2qqk06hsBWY=; b=A/YEFhdPPu1YKy28afnl4+dEVHpb1cR7skEuH/MFDaHVDtu91yrEUNJJCkiUC3vhMJ4Cx6 ooWPIwuLH3WM18FRkOrv9qgPrg45zaxH/cAwC4+UPGM5pMTwBBEKcT2qU29OcHAx6i+vf7 wB1wwIDtdKXjpFqqHMqrERCfa5UrUkM= From: Stefan Agner To: linux@armlinux.org.uk Subject: [PATCH v2 1/3] ARM: fix argument count to match macro definition Date: Thu, 3 Jan 2019 22:48:13 +0100 Message-Id: <591c1d362838b8a83e1fdfea37f7b48fd85dbf44.1546551693.git.stefan@agner.ch> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190103_134808_871293_F471E3BF X-CRM114-Status: GOOD ( 12.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nicolas.pitre@linaro.org, mark.rutland@arm.com, arnd@arndb.de, ard.biesheuvel@linaro.org, peterz@infradead.org, will.deacon@arm.com, julien.thierry@arm.com, ndesaulniers@google.com, linux-kernel@vger.kernel.org, Stefan Agner , mingo@redhat.com, natechancellor@gmail.com, 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 The macro str8w takes 10 arguments, abort being the 10th. In this particular instantiation the abort argument is passed as 11th argument leading to an error when using LLVM's integrated assembler: :46:47: error: too many positional arguments str8w r0, r3, r4, r5, r6, r7, r8, r9, ip, , abort=19f ^ arch/arm/lib/copy_template.S:277:5: note: while in macro instantiation 18: forward_copy_shift pull=24 push=8 ^ The argument is not used in the macro hence this does not change code generation. Signed-off-by: Stefan Agner Reviewed-by: Nicolas Pitre --- arch/arm/lib/copy_template.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/lib/copy_template.S b/arch/arm/lib/copy_template.S index 652e4d98cd47..2d54491b0e22 100644 --- a/arch/arm/lib/copy_template.S +++ b/arch/arm/lib/copy_template.S @@ -241,7 +241,7 @@ orr r9, r9, ip, lspush #\push mov ip, ip, lspull #\pull orr ip, ip, lr, lspush #\push - str8w r0, r3, r4, r5, r6, r7, r8, r9, ip, , abort=19f + str8w r0, r3, r4, r5, r6, r7, r8, r9, ip, abort=19f bge 12b PLD( cmn r2, #96 ) PLD( bge 13b ) From patchwork Thu Jan 3 21:48:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10747821 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9D1AA14E2 for ; Thu, 3 Jan 2019 21:48:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 890B2212E8 for ; Thu, 3 Jan 2019 21:48:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79DA722BF1; Thu, 3 Jan 2019 21:48:40 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EEC0C212E8 for ; Thu, 3 Jan 2019 21:48:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IfP+4F0aTVstIF0Bek9VRluDt+6Z8cXa9kiygwsvqB0=; b=cUCMVNnjn3B0/b IVD31lweJRWYJt2pvLx/8ZJxSs3sTY64iu+5teXSYt25BiTNNg+lTuPmBaLWOmMYZ5HF4vyTOA2eg g5tXPg5BPuGbnApd9MSihfW5h/bRX9WsrjE8/i2J1XYa+jbzijaVGLG5XgElyAAhkMg6VfPHCMgaG K2zZIXdtDDtCNrU4T/Of35riqYxygOhq07N5HTYN/0Mnr1cN1Lx7RsDYwiTP2KlJO2dQY2qKsS496 3ozGhe7YH4AdxlowouhteWrZJ42o4+OLSxjmxPUKHKUaEcTv/3gd5TYfCAZbJhUPADI97gK+fg4Im H25yT/Q9ilFZmOIuEdWQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gfAqz-0001Xa-Rr; Thu, 03 Jan 2019 21:48:37 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gfAqW-00014V-GB for linux-arm-kernel@lists.infradead.org; Thu, 03 Jan 2019 21:48:11 +0000 Received: from zyt.lan (unknown [IPv6:2a02:169:3465::564]) by mail.kmu-office.ch (Postfix) with ESMTPSA id B08DB5C0DDD; Thu, 3 Jan 2019 22:48:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1546552084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Nm4UmKZymvFz3g4I1uxh32+ZhB2G26RZTf6BIquMT90=; b=yJXIoeisnxddINmwN39ZHj+JAuzeVDTn1UH/6K4YvXOHmGagmySEJzLiI2ct+79pOmhNQL NkN7J/DQx+puP8yB+g1pCUlAX6PgQ/MdJLWwlim5nkRVIjagqg+u7U6ZOdP2wO4jKhxD1D Gys+/LYDKwV5j0ns1P6pbVvBlQhc9Z0= From: Stefan Agner To: linux@armlinux.org.uk Subject: [PATCH v2 2/3] ARM: uaccess: use unified assembler language syntax Date: Thu, 3 Jan 2019 22:48:14 +0100 Message-Id: <5ef2acc655abfbe8bfa2cd30ecc5c2286b8fdfa3.1546551693.git.stefan@agner.ch> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190103_134808_854905_34B31E7B X-CRM114-Status: GOOD ( 12.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nicolas.pitre@linaro.org, mark.rutland@arm.com, arnd@arndb.de, ard.biesheuvel@linaro.org, peterz@infradead.org, will.deacon@arm.com, julien.thierry@arm.com, ndesaulniers@google.com, linux-kernel@vger.kernel.org, Stefan Agner , mingo@redhat.com, natechancellor@gmail.com, 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 Convert the conditional infix to a postfix to make sure this inline assembly is unified syntax. Since gcc assumes non-unified syntax when emitting ARM instructions, make sure to define the syntax as unified. This allows to use LLVM's integrated assembler. Signed-off-by: Stefan Agner --- Changes since v1: - Explicitly use unified syntax for inline assembly arch/arm/include/asm/uaccess.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index 6390a40f16e7..a50f9b4e2574 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h @@ -86,7 +86,8 @@ static inline void set_fs(mm_segment_t fs) #define __range_ok(addr, size) ({ \ unsigned long flag, roksum; \ __chk_user_ptr(addr); \ - __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \ + __asm__(".syntax unified\n" \ + "adds %1, %2, %3; sbcscc %1, %1, %0; movcc %0, #0" \ : "=&r" (flag), "=&r" (roksum) \ : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ : "cc"); \ From patchwork Thu Jan 3 21:48:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10747817 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E12D06C5 for ; Thu, 3 Jan 2019 21:48:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4D92212E8 for ; Thu, 3 Jan 2019 21:48:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B639022BF1; Thu, 3 Jan 2019 21:48:15 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1AFDA212E8 for ; Thu, 3 Jan 2019 21:48:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wgDt1Ufwvy49IMachKo/5bgD1sOrX+BxPzDumVAgwIU=; b=YhCgiMo5843R/F 9HrgO5ckXeZWEKA4N3dxR5DKasxsXGhU28s/EYrSe2pNejcVLqfAqOyDf9XIHKaW+p3C1I9Ji/EIK NoRq4vKqUmhSPihJwJ0uzJwZleZvAo7UxFDrnsrAjzrkhauxfvpbTpALMRvCU4ZfILglZJelHpxCR BnuUIBphh461ZZbn37fqdACSfN1OiDu/KFp2UGJ7w8uf0ayRx6SgZ2HG+9tympFHkOezHTIGFQr9P fpbbsRQuExyToywpEtYvbFZpRMYuDsr/9HnZqbTVabsF5e+TLpOVs0XiQypYHSkISFYC53zVlncRI JMWA1ysNo+dGoERi5wXA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gfAqZ-000161-Pu; Thu, 03 Jan 2019 21:48:11 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gfAqW-00014Y-Fk for linux-arm-kernel@lists.infradead.org; Thu, 03 Jan 2019 21:48:10 +0000 Received: from zyt.lan (unknown [IPv6:2a02:169:3465::564]) by mail.kmu-office.ch (Postfix) with ESMTPSA id CA7F05C0DDF; Thu, 3 Jan 2019 22:48:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1546552084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=51xr4xYeiDI4RYE/PzJ1r3c7j9DrlQRWm/NtP3kFLMo=; b=TYA9x5Pbx82LwyMAxfQFwLLbyerlqWRVh6xzfBxrmlh0atGvPW3XcVQsq/y2JumNzAfNWt CrI/k3g0KviFz4yPmJ3bpS5PPO4RCqSgg0m7bnXUT6HvQx1fSYo3Ic+rj6rd+oeRLah9yI 75rzeDJ1Tv2q5z8ZZMuV7DxF6z7B57s= From: Stefan Agner To: linux@armlinux.org.uk Subject: [PATCH v2 3/3] ARM: spinlock: use unified assembler language syntax Date: Thu, 3 Jan 2019 22:48:15 +0100 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190103_134808_845127_38C67F06 X-CRM114-Status: GOOD ( 11.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nicolas.pitre@linaro.org, mark.rutland@arm.com, arnd@arndb.de, ard.biesheuvel@linaro.org, peterz@infradead.org, will.deacon@arm.com, julien.thierry@arm.com, ndesaulniers@google.com, linux-kernel@vger.kernel.org, Stefan Agner , mingo@redhat.com, natechancellor@gmail.com, 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 Convert the conditional infix to a postfix to make sure this inline assembly is unified syntax. Since gcc assumes non-unified syntax when emitting ARM instructions, make sure to define the syntax as unified. This allows to use LLVM's integrated assembler. Signed-off-by: Stefan Agner --- Changes since v1: - Explicitly use unified syntax for inline assembly arch/arm/include/asm/spinlock.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/spinlock.h b/arch/arm/include/asm/spinlock.h index 099c78fcf62d..8f009e788ad4 100644 --- a/arch/arm/include/asm/spinlock.h +++ b/arch/arm/include/asm/spinlock.h @@ -210,11 +210,12 @@ static inline void arch_read_lock(arch_rwlock_t *rw) prefetchw(&rw->lock); __asm__ __volatile__( +" .syntax unified\n" "1: ldrex %0, [%2]\n" " adds %0, %0, #1\n" " strexpl %1, %0, [%2]\n" WFE("mi") -" rsbpls %0, %1, #0\n" +" rsbspl %0, %1, #0\n" " bmi 1b" : "=&r" (tmp), "=&r" (tmp2) : "r" (&rw->lock)