Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5652513img; Wed, 27 Mar 2019 12:29:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqymFPJeXicGsZ9tXVYBMnd4dFhWXz5ogBjyq8jvam7lmOdW20H3K+xdBkcEY8EpJg308vc7 X-Received: by 2002:a65:6241:: with SMTP id q1mr8480345pgv.244.1553714987519; Wed, 27 Mar 2019 12:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553714987; cv=none; d=google.com; s=arc-20160816; b=DnBL5Bp69gbhyReeF6iKXT7Rg/YA9zgq09aGD1qRu0m+NPFAlU8gGHMeLwzHPxRdfD DDsciL5ZPloyYm1+0PqVwNHICQcwcGM26B6HO0GxPeNbn5qYqn9TsdUgjCm/JYWS4ZkW 4j10Q6D9HMou4ItvX+GfRT0tyiRqtkE1LzTrzRYFkxNIQsr6pHSaFUjmFMQZYbocx5cn 0mTKaJdr1DubdRSU4JR0y2XsWNuanVWMMLw3idJXoMawC1r2Vb7h5m6R+MbfGx1Yookp 3ntFJ5yr3tvkLJbaZHVxAFo6uRa1u9BouMbZlYRfQLu6iKSu+dN/aFPzD7t8gvotrYdn a4ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ppkbjm46MewcUKYHne8syd9dz/63JhjyXeyiUcM1U+c=; b=zmo/+Zs29axtvem1YW0T+wd98lD8kqCqP/98p9loPiW8xEoRPRNKeYKMxOErL+b0wB J+Ejg3dnhJDlhZ+QYnnP9SWQ1XJCNfLS0bQvdhuLoIK7gqR1IgOyD4lF/1PMCN4+SoqQ wiHH0aWZzqBh01mf+AakNbORt38z9zh0nrLseXCpp37EFJ2BQJPdtgHqGnPmWu6liwI3 xsHH7yTMRAAI6Ht2fxl3WGaMOD0VPCZSWc4/Jh0EBrY98aylbhIuz1McDUnaVAMhO76U SyUSKus8EvgtHNwnu4wY/lECnbNcNH2+bPybjaG8TN5emsPoXDPA8hguVMJEB6wol1Et ETCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UCnjMhOR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70si20882199ple.294.2019.03.27.12.29.32; Wed, 27 Mar 2019 12:29:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UCnjMhOR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387548AbfC0T1q (ORCPT + 99 others); Wed, 27 Mar 2019 15:27:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:45378 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733312AbfC0SEj (ORCPT ); Wed, 27 Mar 2019 14:04:39 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C91192075C; Wed, 27 Mar 2019 18:04:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553709878; bh=7Hc6eC1JfvLyibrm9PSNkKrIva2ev4UJQuojWJQPLLk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UCnjMhORuWtWPs+Fke9EnsUvZ9x45pbT6NNrqF0YWs82FRZg0QuXna5sjJTtQGc7K QECKLqZ9D7tiTCXz3/CBzRHStu/z50Zx6/SvPX5W8e7DDrjoIZC3CUzPDBOVFI25JN HoyC1PVRxeNoec+pFwdBe2kNDRA7LvHAK6PVG2dw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Stefan Agner , Russell King , Sasha Levin Subject: [PATCH AUTOSEL 5.0 084/262] ARM: 8845/1: use unified assembler in c files Date: Wed, 27 Mar 2019 13:58:59 -0400 Message-Id: <20190327180158.10245-84-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Agner [ Upstream commit b7e8c9397cd4efe6567d2728f091f1b728025533 ] Use unified assembler syntax (UAL) in inline assembler. Divided syntax is considered deprecated. This will also allow to build the kernel using LLVM's integrated assembler. When compiling non-Thumb2 GCC always emits a ".syntax divided" at the beginning of the inline assembly which makes the assembler fail. Since GCC 5 there is the -masm-syntax-unified GCC option which make GCC assume unified syntax asm and hence emits ".syntax unified" even in ARM mode. However, the option is broken since GCC version 6 (see GCC PR88648 [1]). Work around by adding ".syntax unified" as part of the inline assembly. [0] https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html#index-masm-syntax-unified [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88648 Signed-off-by: Stefan Agner Acked-by: Nicolas Pitre Signed-off-by: Russell King Signed-off-by: Sasha Levin --- arch/arm/mm/copypage-v4mc.c | 3 ++- arch/arm/mm/copypage-v4wb.c | 3 ++- arch/arm/mm/copypage-v4wt.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c index b03202cddddb..f74cdce6d4da 100644 --- a/arch/arm/mm/copypage-v4mc.c +++ b/arch/arm/mm/copypage-v4mc.c @@ -45,6 +45,7 @@ static void mc_copy_user_page(void *from, void *to) int tmp; asm volatile ("\ + .syntax unified\n\ ldmia %0!, {r2, r3, ip, lr} @ 4\n\ 1: mcr p15, 0, %1, c7, c6, 1 @ 1 invalidate D line\n\ stmia %1!, {r2, r3, ip, lr} @ 4\n\ @@ -56,7 +57,7 @@ static void mc_copy_user_page(void *from, void *to) ldmia %0!, {r2, r3, ip, lr} @ 4\n\ subs %2, %2, #1 @ 1\n\ stmia %1!, {r2, r3, ip, lr} @ 4\n\ - ldmneia %0!, {r2, r3, ip, lr} @ 4\n\ + ldmiane %0!, {r2, r3, ip, lr} @ 4\n\ bne 1b @ " : "+&r" (from), "+&r" (to), "=&r" (tmp) : "2" (PAGE_SIZE / 64) diff --git a/arch/arm/mm/copypage-v4wb.c b/arch/arm/mm/copypage-v4wb.c index cd3e165afeed..6d336740aae4 100644 --- a/arch/arm/mm/copypage-v4wb.c +++ b/arch/arm/mm/copypage-v4wb.c @@ -27,6 +27,7 @@ static void v4wb_copy_user_page(void *kto, const void *kfrom) int tmp; asm volatile ("\ + .syntax unified\n\ ldmia %1!, {r3, r4, ip, lr} @ 4\n\ 1: mcr p15, 0, %0, c7, c6, 1 @ 1 invalidate D line\n\ stmia %0!, {r3, r4, ip, lr} @ 4\n\ @@ -38,7 +39,7 @@ static void v4wb_copy_user_page(void *kto, const void *kfrom) ldmia %1!, {r3, r4, ip, lr} @ 4\n\ subs %2, %2, #1 @ 1\n\ stmia %0!, {r3, r4, ip, lr} @ 4\n\ - ldmneia %1!, {r3, r4, ip, lr} @ 4\n\ + ldmiane %1!, {r3, r4, ip, lr} @ 4\n\ bne 1b @ 1\n\ mcr p15, 0, %1, c7, c10, 4 @ 1 drain WB" : "+&r" (kto), "+&r" (kfrom), "=&r" (tmp) diff --git a/arch/arm/mm/copypage-v4wt.c b/arch/arm/mm/copypage-v4wt.c index 8614572e1296..3851bb396442 100644 --- a/arch/arm/mm/copypage-v4wt.c +++ b/arch/arm/mm/copypage-v4wt.c @@ -25,6 +25,7 @@ static void v4wt_copy_user_page(void *kto, const void *kfrom) int tmp; asm volatile ("\ + .syntax unified\n\ ldmia %1!, {r3, r4, ip, lr} @ 4\n\ 1: stmia %0!, {r3, r4, ip, lr} @ 4\n\ ldmia %1!, {r3, r4, ip, lr} @ 4+1\n\ @@ -34,7 +35,7 @@ static void v4wt_copy_user_page(void *kto, const void *kfrom) ldmia %1!, {r3, r4, ip, lr} @ 4\n\ subs %2, %2, #1 @ 1\n\ stmia %0!, {r3, r4, ip, lr} @ 4\n\ - ldmneia %1!, {r3, r4, ip, lr} @ 4\n\ + ldmiane %1!, {r3, r4, ip, lr} @ 4\n\ bne 1b @ 1\n\ mcr p15, 0, %2, c7, c7, 0 @ flush ID cache" : "+&r" (kto), "+&r" (kfrom), "=&r" (tmp) -- 2.19.1