From patchwork Thu Feb 18 14:02:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102741 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp605736lbl; Thu, 18 Feb 2016 06:05:25 -0800 (PST) X-Received: by 10.98.79.28 with SMTP id d28mr10252214pfb.77.1455804325671; Thu, 18 Feb 2016 06:05:25 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u11si9647199pas.102.2016.02.18.06.05.25; Thu, 18 Feb 2016 06:05:25 -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 S1946410AbcBROFU (ORCPT + 30 others); Thu, 18 Feb 2016 09:05:20 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:55390 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425501AbcBROFP (ORCPT ); Thu, 18 Feb 2016 09:05:15 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0Lp7C8-1a0Nlt0bCO-00eq6N; Thu, 18 Feb 2016 15:04:49 +0100 From: Arnd Bergmann To: Russell King Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Ard Biesheuvel , Nicolas Pitre , Jon Medhurst , Marc Zyngier , linux-kernel@vger.kernel.org Subject: [PATCH 9/9] ARM: fix kprobe test with CONFIG_CPU_32v3 Date: Thu, 18 Feb 2016 15:02:01 +0100 Message-Id: <1455804123-2526139-10-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455804123-2526139-1-git-send-email-arnd@arndb.de> References: <1455804123-2526139-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:7spuFblZJSXC87OgicHMBL+t3fX7E1Ctl04u9ojiYM9kUS+dNoW JR0njk4I2tqbEr9LB0qPY/Z6+UFfjQAVmRY8BaYJNM///XjI0ifIWWZ07fs7VCXDq2j4R3R 4cAEy5XQJmBKGy8w6mZynX0NDtlR+1yg2fpErOCQFEwLvdGU45c5A7O8t5n94+VzC0NaSMh 69lRiY9Nu3mGWu/ORUuWg== X-UI-Out-Filterresults: notjunk:1; V01:K0:tYGU7+3xiVY=:YNUekPsUQhJGONMotfSQBE C79o2z8mMSnfYwNIVLXI0pER1ucB9W4GFI1/4j9umND5fvB6CbJsa6kq0XUSjS3WHE4sRt6uR MebRa1ioMP7GkbRfjWf/qaAXXzNv60JpYaTVLfTySQVX0Y3Bg4B0tUDEueeM10bQddcZt9zpL CQY+65sXGXKYwkiRGUTWIfBL/0aZBlhMOGQ7Qo7gfMDcj415r4GF+uEdMqPtpqVFfUwe8W04d liRiYbsGZmpOPZ705gFTZdwOYr9F2vlHY+Vz4cGGSicv1JZzEcE62FTKf9iFrWO3MU++34Wt7 bwCflrz0LZKvQ+vZCWs6HzrweDAfnR6FRYJ+0YtVbUMEjb77nPXLth779bgSPKom2hJDbY5OS v1AB3o2Gvrz1wox5+ezzvp4ksG6F3kL+Lc9XcJCdCMSQlCq1hotiTsy5NjIJ11fGto4is1b/l dD/xHBuaUjvgmGNyjHh+6HDb99zuUkzcxhHE9ZHHZNNT8jOTH2PDCIpdpdylBTYica71IXr88 gle8/SOwJy2iVq6zSRgO/qNEyce5Qn0+7zBfKiqR5RmyYzEzYG6c0+XjrbPXrjRu3dD/+zbXi 3I13b/pEgyRLEJ/xo4MhHCwrYRiSFX2edvyaVFk45q9l5Cd8yGurbbRMZXh9BFACdW7TITqSO jZErkT3KBDtFJlvil8XBD34gNnFw6hp056540Ye4dJfK7ugNvxltXcKx5pGHB6Rh20xY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ARMv3 did not have 16-bit load/store or 32-bit multiply instructions, so building the kprobe test code fails with lots of warnings about these: /tmp/ccI4SKHx.s:19585: Error: selected processor does not support ARM mode `umull r0,r1,r2,r3' /tmp/ccI4SKHx.s:19617: Error: selected processor does not support ARM mode `umullls r7,r8,r9,r10' /tmp/ccI4SKHx.s:19645: Error: selected processor does not support ARM mode `umull lr,r12,r11,r13' /tmp/ccI4SKHx.s:19727: Error: selected processor does not support ARM mode `umulls r0,r1,r2,r3' ... /tmp/ccI4SKHx.s:21273: Error: selected processor does not support ARM mode `strh r0,[r1,-r2]' /tmp/ccI4SKHx.s:21309: Error: selected processor does not support ARM mode `streqh r14,[r11,r12]' /tmp/ccI4SKHx.s:21333: Error: selected processor does not support ARM mode `streqh r14,[r13,r12]' This puts all the affected instructions inside an #ifdef section, like we do for the other architecture levels. Signed-off-by: Arnd Bergmann --- arch/arm/probes/kprobes/test-arm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.7.0 diff --git a/arch/arm/probes/kprobes/test-arm.c b/arch/arm/probes/kprobes/test-arm.c index 8866aedfdea2..4e8511f0582d 100644 --- a/arch/arm/probes/kprobes/test-arm.c +++ b/arch/arm/probes/kprobes/test-arm.c @@ -391,6 +391,7 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED(__inst_arm(0xe0700090) " @ undef") TEST_UNSUPPORTED(__inst_arm(0xe07fff9f) " @ undef") +#if __LINUX_ARM_ARCH__ >= 4 TEST_RR( "umull r0, r1, r",2, VAL1,", r",3, VAL2,"") TEST_RR( "umullls r7, r8, r",9, VAL2,", r",10, VAL1,"") TEST_R( "umull lr, r12, r",11,VAL3,", r13") @@ -436,6 +437,7 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED(__inst_arm(0xe0f0f392) " @ smlals r0, pc, r2, r3") TEST_UNSUPPORTED(__inst_arm(0xe0f0139f) " @ smlals r0, r1, pc, r3") TEST_UNSUPPORTED(__inst_arm(0xe0f01f92) " @ smlals r0, r1, r2, pc") +#endif TEST_GROUP("Synchronization primitives") @@ -478,7 +480,7 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED("ldrexh r2, [sp]") #endif TEST_GROUP("Extra load/store instructions") - +#if __LINUX_ARM_ARCH__ >= 4 TEST_RPR( "strh r",0, VAL1,", [r",1, 48,", -r",2, 24,"]") TEST_RPR( "streqh r",14,VAL2,", [r",11,0, ", r",12, 48,"]") TEST_UNSUPPORTED( "streqh r14, [r13, r12]") @@ -560,6 +562,7 @@ void kprobe_arm_test_cases(void) TEST( "ldrsh r0, [pc, #0]") TEST_UNSUPPORTED(__inst_arm(0xe1ffc3f0) " @ ldrsh r12, [pc, #48]!") TEST_UNSUPPORTED(__inst_arm(0xe0d9f3f0) " @ ldrsh pc, [r9], #48") +#endif #if __LINUX_ARM_ARCH__ >= 7 TEST_UNSUPPORTED("strht r1, [r2], r3")