From patchwork Mon Feb 8 14:25:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102833 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1469631lbl; Mon, 8 Feb 2016 06:27:29 -0800 (PST) X-Received: by 10.66.252.198 with SMTP id zu6mr42657153pac.107.1454941649512; Mon, 08 Feb 2016 06:27:29 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fa6si20023235pad.154.2016.02.08.06.27.29; Mon, 08 Feb 2016 06:27:29 -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 S1753011AbcBHO11 (ORCPT + 30 others); Mon, 8 Feb 2016 09:27:27 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:53942 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbcBHO10 (ORCPT ); Mon, 8 Feb 2016 09:27:26 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0LhRPo-1ZgEXC20FU-00meqg; Mon, 08 Feb 2016 15:26:58 +0100 From: Arnd Bergmann To: Russell King Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Mark Charlebois , Behan Webster , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] ARM: pass -march=armv7-a when building NEON files with clang Date: Mon, 8 Feb 2016 15:25:56 +0100 Message-Id: <1454941613-2775081-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:spLc8DEONABNrqOAVpAKMsL8rmNSuupv/KL2R3ad2UQdm2FW3yW W6XC8zlMeqGOuCGW8ENUBZj5hhsZ+Btvzwnld2X38mucUttzIXbFnyaHv2Yu93kovsvKUhP 7pRLF6NLpHXahO5Puxdwn/VmIdZIZCIvyTUU/vhch7jMklBavihbmvDk9KjorFQD6H3K4B1 9sdo7Oko8wPguPSV9PaRA== X-UI-Out-Filterresults: notjunk:1; V01:K0:RpUPc/uNmO4=:REBm7LvAnX0rJsTDI+ivts 0gRZiHdHl0WaWsDVzMzuoTjot3MwmYHLFYCfYLQ+7+gYL6tOZHTSYZRIwaboguBJC8pD+HleV 5u4tgvrQTD5XmJIxLsLbAyNL6Zu7eNkPRUkpcdrFjIQKfbLC3bambSlTXQCFJaBLNKZKMEVuv LBkcNJLGlXVXL0sUmFfEjN7DE6FCbXobEaeIIGECIA2k/eqJrw2n5NsvaFPu8gCQlUAeXNfA0 ROz3QQQQ8x2UACN3xIIBJOWjZfsyscbb0fNwAiGxpPzLFw1AwOYRrieD6eVxLjmKIYayeW+df GyPV8z0u44ur0Tjct/cCJzatK0hZrRZuclSkwenIhWTy/ZAmvnEwHkfM1SAD6c4jQ7jEVrBfu Mln/pS1KPtUxXYDgxv+x2nfIrP5g3llT/PvufLYzGCfu4V9AD/r0v9FWmv5r/VEGVOQqWU4Qi D4Ewq5jN3dLdRYzibxVrjLWGb1mSTaKdn3lUds03hkYjwlxp8t7mvo/01/TDmJ5T2yyMl8sIC 2+4VlWGc/Btj/NrcbUMck0tVuprtf7M8nu/OKVcRGfdvE/0jP5k8876NHF2lhq5OhlujpcPJU kDjsUCXVPV1p2XSklYBD7qAMY6zbtvL39+5XIHaYovYmmTIPeUY5s1vot4YeeEceg6VSFVMka qnRdDrFMvew/Fs0iHBeqpEusDwcXTb06n3FFkWXDOCeX7+y3hCS27Phf79y5A2/n/q4s= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang ignores the -mfpu=neon flag when building with -march=armv6: In file included from lib/raid6/neon1.c:27: clang/3.8.0/include/arm_neon.h:28:2: error: "NEON support not enabled" There is no real need to build the file with -march=armv6 in a multi-CPU enabled kernel, as nothing in here will ever get called on an ARMv6 CPU. Adding -march=armv7 doesn't hurt and can only improve the code quality. Signed-off-by: Arnd Bergmann --- arch/arm/lib/Makefile | 2 +- lib/raid6/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.7.0 diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 6c7a5b715584..5f6c7eb62cc3 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -39,7 +39,7 @@ $(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S ifeq ($(CONFIG_KERNEL_MODE_NEON),y) - NEON_FLAGS := -mfloat-abi=softfp -mfpu=neon + NEON_FLAGS := -mfloat-abi=softfp -mfpu=neon -march=armv7-a CFLAGS_xor-neon.o += $(NEON_FLAGS) obj-$(CONFIG_XOR_BLOCKS) += xor-neon.o endif diff --git a/lib/raid6/Makefile b/lib/raid6/Makefile index 3b10a48fa040..4ef3e800fb39 100644 --- a/lib/raid6/Makefile +++ b/lib/raid6/Makefile @@ -23,7 +23,7 @@ endif ifeq ($(CONFIG_KERNEL_MODE_NEON),y) NEON_FLAGS := -ffreestanding ifeq ($(ARCH),arm) -NEON_FLAGS += -mfloat-abi=softfp -mfpu=neon +NEON_FLAGS += -mfloat-abi=softfp -mfpu=neon -march=armv7-a endif ifeq ($(ARCH),arm64) CFLAGS_REMOVE_neon1.o += -mgeneral-regs-only 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, From patchwork Mon Feb 8 14:25:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102831 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1469892lbl; Mon, 8 Feb 2016 06:28:04 -0800 (PST) X-Received: by 10.98.42.10 with SMTP id q10mr42653276pfq.73.1454941684810; Mon, 08 Feb 2016 06:28:04 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id eg4si46934894pac.40.2016.02.08.06.28.04; Mon, 08 Feb 2016 06:28:04 -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 S1753375AbcBHO15 (ORCPT + 30 others); Mon, 8 Feb 2016 09:27:57 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:54809 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653AbcBHO1x (ORCPT ); Mon, 8 Feb 2016 09:27:53 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0M4VfU-1a5dhE0ec8-00yfNu; Mon, 08 Feb 2016 15:27:28 +0100 From: Arnd Bergmann To: Russell King Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 3/3] ARM: kprobes: use "I" constraint for inline assembly offsets Date: Mon, 8 Feb 2016 15:25:58 +0100 Message-Id: <1454941613-2775081-3-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:7HY6f6aOuoh/Q55AQUHikvL6Z/MPLNLFogtydXNmpdb24bXj3x9 kcwpi3UcLXqzIG4/yTXXaDrHmcVDFDSmL2zzC4iDYG8yYCecRO4Yq1AtDFXhbKIaibiZvi/ pjp8/S13zcSI7z4ZQ0BkGKzs05b1IYH6W/p9QGn7/QBV8kHOw5bsZRzRyzrwJlSrbyaZXvx npoUd7WhPHut6UXflkF/w== X-UI-Out-Filterresults: notjunk:1; V01:K0:W6Dv3+ejjgM=:7ryqDpSpSbxltznPdQTcsF q5o580gKxpMRq5tatu8088ppDsoERiB7S/hEJezEkl/H2RUChBmsK84S4RQU0jpLM1WTyz27v UdtYLtUhswUHq/blNXGkVMHz8gCGLbOPwRSRtIx03l6JDLwICJSPni74icFrqzP6mlquWWvun vWxX3ai2q1dlxWAtmVGe8z7I12e1uKE3hiM61TK5pv3LyR880opC4IdNabc7CyBxgLo0KYTDD pLiwuM8GncL1/C9QQdtmZsRnxvdavKA7/BFcQ7A8rOaGa8R2aqf0PearOWtbwoj2TCiVqYXgB CHvNvpzM0OSzho+ekTVI99aSsFqDaM8hMCAcKrjot+DDX6a7iuGTEgte014Yol7h94N1MsR1K dz86KrTZrDRphuXc2WyjSODRUTeWX0/EATQ1ulP6h6zrD0phEqEwpWzDlYr2F9Shiy+j397C4 +RU+Zsz5AjXH8NSJXolXv1M+yqGVv3duzGsU0Kw6FkoASrulvEfpyPHRC3Q/OS/EF5kzVFCVJ cF2O/NxA3YyN2bBNrYeE6az24hs86TzcexhvMrIkr9j6D9WzmQ55qEkvFwM/Xy/NbeNG45KAd HE/aOqXD2o0QKL3t6f2ZbFBOmVrQB5CtvrVKx45fa32NRyCQHHhb1C+93kmursYjdxWdbKOkt xLc2p7ClQmxMrgLGZXmV6LY1nWyLg0Ph6HdAa1RxSGKU2HzKi2GvTvY9RmKIV7O7odFA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org build-testing with clang showed that the "J" constraint does not take positive arguments on clang when building in for Thumb-2: core.c:540:3: error: invalid operand for inline asm constraint 'J' This has been reported as llvm bug https://llvm.org/bugs/show_bug.cgi?id=26061 However, looking at the source code in depth, I found that the kernel is also wrong, and it should not use "J" at all, but should use "I" to pass an immediate argument to the inline assembly when that is used as an offset to an 'ldr' instruction rather than the 'sub' argument. Signed-off-by: Arnd Bergmann --- arch/arm/probes/kprobes/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.7.0 diff --git a/arch/arm/probes/kprobes/core.c b/arch/arm/probes/kprobes/core.c index a4ec240ee7ba..4b34b40ca917 100644 --- a/arch/arm/probes/kprobes/core.c +++ b/arch/arm/probes/kprobes/core.c @@ -570,10 +570,10 @@ void __kprobes jprobe_return(void) : : "r" (kcb->jprobe_saved_regs.ARM_sp), "I" (sizeof(struct pt_regs) * 2), - "J" (offsetof(struct pt_regs, ARM_sp)), - "J" (offsetof(struct pt_regs, ARM_pc)), - "J" (offsetof(struct pt_regs, ARM_cpsr)), - "J" (offsetof(struct pt_regs, ARM_lr)) + "I" (offsetof(struct pt_regs, ARM_sp)), + "I" (offsetof(struct pt_regs, ARM_pc)), + "I" (offsetof(struct pt_regs, ARM_cpsr)), + "I" (offsetof(struct pt_regs, ARM_lr)) : "memory", "cc"); }