From patchwork Mon Feb 8 14:25:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102832 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1469814lbl; Mon, 8 Feb 2016 06:27:54 -0800 (PST) X-Received: by 10.98.87.142 with SMTP id i14mr6767745pfj.63.1454941674714; Mon, 08 Feb 2016 06:27:54 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dn3si46865725pac.189.2016.02.08.06.27.54; Mon, 08 Feb 2016 06:27:54 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753294AbcBHO1w (ORCPT + 30 others); Mon, 8 Feb 2016 09:27:52 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:51993 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653AbcBHO1v (ORCPT ); Mon, 8 Feb 2016 09:27:51 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0MT3vW-1adGdK27ks-00S5Su; Mon, 08 Feb 2016 15:27:20 +0100 From: Arnd Bergmann To: Russell King Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 2/3] ARM: fix copypage-*.c building with clang Date: Mon, 8 Feb 2016 15:25:57 +0100 Message-Id: <1454941613-2775081-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1454941613-2775081-1-git-send-email-arnd@arndb.de> References: <1454941613-2775081-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:rkv0zjk7Djs0VqJIxhgx6nDqELi4OgqU13MB9F1QaDzH9HbllHk VtolVZlxFXVtYipfDoLu1yMNsihn0czKpWCo7omDlz/3tk/Z82iBX3WYQgm3l9Ffdmuzfcx 2RZkVzR9bDlqtANAUfkSf5h2Jz3dOurUgPieq0reAZDMIkLlsWrEyY5IAQlMe+WMo0GnUqw sV2TvQl8rDm5o7aJD5kmw== X-UI-Out-Filterresults: notjunk:1; V01:K0:ERM9kz/QITw=:dmYR7C9UJCXalwf8o3Hc5c HHFFV8tjXximY5rZ95JLlVuk5ix7lFH8iQthUJ+5VAc8LZcyb+4FhNb97Dsf4vhBTl6f5wwZT ek+RsL+y4gBk7I1ubM2ZFkixc8+WKmJAlf0XwxDVdWWfFfRAQwdegg9MWZ5zVKGgJVUW3UAQl cd2EbDCimzRueb+q8Hk+OHqjc5IljYF8xGI49ui/7hqLnSMQd4Sj8U+3SNqH+HxENfMNG5a6q IviVg9hc0dTdjgzr+PaKsIdhC3nVeLtTI4tHnK3OMXvAoDc4e+D8i8oJL9Tz6CJeKgZ2S1Ai6 P2EVxroBh42oPXYSu/MaHNRt1JglU7YBGOtiTTofixX0MsAutcwc97ciou+GObEBWIejM+ZC9 AlI+xpu05V+pGE+0SjHsN5u01B4hBMOgb6Lz9amCNf8fkMS4fOdGOfVT7UHijX0DI4n2QaosL i+1slHVMmjThfyWE7SIYLrWPZQripq3aDvIj5TLytciNI1RYPwzNKoUHsj+x7HXKMZqfdxIgs 2r7ZC2zBsjy4ffWD/URYIsM3dh97SJSwa36D4BMsG9ay0vbdqMBkQlb81fep7HHwDytFL1Hun SEmuglyeDRVv3VHebmSTxjVSrm1DQZO9l8wGtkVQeRQpTA6IhHAAZylRjmzEzjnmbvtcY1ONk cEaXTmSJwMPpkSr9RQVN703Be77kvkr+KAw+lO6x1FQcOuf44eSPvTkoF9gMfVDmQJJk= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang does not allow inline assembly in __naked functions to have any register parameters and throws an error: arch/arm/mm/copypage-v4wb.c:47:9: error: parameter references not allowed in naked functions : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64)); Fortunately, all of these functions are trivial to convert to using the registers directly. Signed-off-by: Arnd Bergmann --- arch/arm/mm/copypage-feroceon.c | 4 ++-- arch/arm/mm/copypage-v4mc.c | 26 +++++++++++++------------- arch/arm/mm/copypage-v4wb.c | 4 ++-- arch/arm/mm/copypage-v4wt.c | 4 ++-- arch/arm/mm/copypage-xsc3.c | 4 ++-- arch/arm/mm/copypage-xscale.c | 4 ++-- 6 files changed, 23 insertions(+), 23 deletions(-) -- 2.7.0 diff --git a/arch/arm/mm/copypage-feroceon.c b/arch/arm/mm/copypage-feroceon.c index 49ee0c1a7209..e69bf2f15f32 100644 --- a/arch/arm/mm/copypage-feroceon.c +++ b/arch/arm/mm/copypage-feroceon.c @@ -18,7 +18,7 @@ feroceon_copy_user_page(void *kto, const void *kfrom) { asm("\ stmfd sp!, {r4-r9, lr} \n\ - mov ip, %2 \n\ + mov ip, %0 \n\ 1: mov lr, r1 \n\ ldmia r1!, {r2 - r9} \n\ pld [lr, #32] \n\ @@ -64,7 +64,7 @@ feroceon_copy_user_page(void *kto, const void *kfrom) mcr p15, 0, ip, c7, c10, 4 @ drain WB\n\ ldmfd sp!, {r4-r9, pc}" : - : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE)); + : "I" (PAGE_SIZE)); } void feroceon_copy_user_highpage(struct page *to, struct page *from, diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c index 1267e64133b9..ea89722c00db 100644 --- a/arch/arm/mm/copypage-v4mc.c +++ b/arch/arm/mm/copypage-v4mc.c @@ -45,23 +45,23 @@ mc_copy_user_page(void *from, void *to) { asm volatile( "stmfd sp!, {r4, lr} @ 2\n\ - mov r4, %2 @ 1\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\ - ldmia %0!, {r2, r3, ip, lr} @ 4+1\n\ - stmia %1!, {r2, r3, ip, lr} @ 4\n\ - ldmia %0!, {r2, r3, ip, lr} @ 4\n\ - mcr p15, 0, %1, c7, c6, 1 @ 1 invalidate D line\n\ - stmia %1!, {r2, r3, ip, lr} @ 4\n\ - ldmia %0!, {r2, r3, ip, lr} @ 4\n\ + mov r4, %0 @ 1\n\ + ldmia r0!, {r2, r3, ip, lr} @ 4\n\ +1: mcr p15, 0, r1, c7, c6, 1 @ 1 invalidate D line\n\ + stmia r1!, {r2, r3, ip, lr} @ 4\n\ + ldmia r0!, {r2, r3, ip, lr} @ 4+1\n\ + stmia r1!, {r2, r3, ip, lr} @ 4\n\ + ldmia r0!, {r2, r3, ip, lr} @ 4\n\ + mcr p15, 0, r1, c7, c6, 1 @ 1 invalidate D line\n\ + stmia r1!, {r2, r3, ip, lr} @ 4\n\ + ldmia r0!, {r2, r3, ip, lr} @ 4\n\ subs r4, r4, #1 @ 1\n\ - stmia %1!, {r2, r3, ip, lr} @ 4\n\ - ldmneia %0!, {r2, r3, ip, lr} @ 4\n\ + stmia r1!, {r2, r3, ip, lr} @ 4\n\ + ldmneia r0!, {r2, r3, ip, lr} @ 4\n\ bne 1b @ 1\n\ ldmfd sp!, {r4, pc} @ 3" : - : "r" (from), "r" (to), "I" (PAGE_SIZE / 64)); + : "I" (PAGE_SIZE / 64)); } void v4_mc_copy_user_highpage(struct page *to, struct page *from, diff --git a/arch/arm/mm/copypage-v4wb.c b/arch/arm/mm/copypage-v4wb.c index 067d0fdd630c..7ea9cf07bd5c 100644 --- a/arch/arm/mm/copypage-v4wb.c +++ b/arch/arm/mm/copypage-v4wb.c @@ -27,7 +27,7 @@ v4wb_copy_user_page(void *kto, const void *kfrom) { asm("\ stmfd sp!, {r4, lr} @ 2\n\ - mov r2, %2 @ 1\n\ + mov r2, %0 @ 1\n\ ldmia r1!, {r3, r4, ip, lr} @ 4\n\ 1: mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line\n\ stmia r0!, {r3, r4, ip, lr} @ 4\n\ @@ -44,7 +44,7 @@ v4wb_copy_user_page(void *kto, const void *kfrom) mcr p15, 0, r1, c7, c10, 4 @ 1 drain WB\n\ ldmfd sp!, {r4, pc} @ 3" : - : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64)); + : "I" (PAGE_SIZE / 64)); } void v4wb_copy_user_highpage(struct page *to, struct page *from, diff --git a/arch/arm/mm/copypage-v4wt.c b/arch/arm/mm/copypage-v4wt.c index b85c5da2e510..c742ab24efd6 100644 --- a/arch/arm/mm/copypage-v4wt.c +++ b/arch/arm/mm/copypage-v4wt.c @@ -25,7 +25,7 @@ v4wt_copy_user_page(void *kto, const void *kfrom) { asm("\ stmfd sp!, {r4, lr} @ 2\n\ - mov r2, %2 @ 1\n\ + mov r2, %0 @ 1\n\ ldmia r1!, {r3, r4, ip, lr} @ 4\n\ 1: stmia r0!, {r3, r4, ip, lr} @ 4\n\ ldmia r1!, {r3, r4, ip, lr} @ 4+1\n\ @@ -40,7 +40,7 @@ v4wt_copy_user_page(void *kto, const void *kfrom) mcr p15, 0, r2, c7, c7, 0 @ flush ID cache\n\ ldmfd sp!, {r4, pc} @ 3" : - : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64)); + : "I" (PAGE_SIZE / 64)); } void v4wt_copy_user_highpage(struct page *to, struct page *from, diff --git a/arch/arm/mm/copypage-xsc3.c b/arch/arm/mm/copypage-xsc3.c index 03a2042aced5..17e4e11c4612 100644 --- a/arch/arm/mm/copypage-xsc3.c +++ b/arch/arm/mm/copypage-xsc3.c @@ -34,7 +34,7 @@ xsc3_mc_copy_user_page(void *kto, const void *kfrom) { asm("\ stmfd sp!, {r4, r5, lr} \n\ - mov lr, %2 \n\ + mov lr, %0 \n\ \n\ pld [r1, #0] \n\ pld [r1, #32] \n\ @@ -67,7 +67,7 @@ xsc3_mc_copy_user_page(void *kto, const void *kfrom) \n\ ldmfd sp!, {r4, r5, pc}" : - : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64 - 1)); + : "I" (PAGE_SIZE / 64 - 1)); } void xsc3_mc_copy_user_highpage(struct page *to, struct page *from, diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c index 0fb85025344d..1034b4ce80cc 100644 --- a/arch/arm/mm/copypage-xscale.c +++ b/arch/arm/mm/copypage-xscale.c @@ -45,7 +45,7 @@ mc_copy_user_page(void *from, void *to) */ asm volatile( "stmfd sp!, {r4, r5, lr} \n\ - mov lr, %2 \n\ + mov lr, %0 \n\ pld [r0, #0] \n\ pld [r0, #32] \n\ pld [r1, #0] \n\ @@ -81,7 +81,7 @@ mc_copy_user_page(void *from, void *to) beq 2b \n\ ldmfd sp!, {r4, r5, pc} " : - : "r" (from), "r" (to), "I" (PAGE_SIZE / 64 - 1)); + : "I" (PAGE_SIZE / 64 - 1)); } void xscale_mc_copy_user_highpage(struct page *to, struct page *from,