From patchwork Wed Aug 22 14:29:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 1361501 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 003B23FD40 for ; Wed, 22 Aug 2012 14:34:26 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T4Bwv-0003RD-6f; Wed, 22 Aug 2012 14:30:25 +0000 Received: from moutng.kundenserver.de ([212.227.126.171]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T4Bwc-0003Pm-NR for linux-arm-kernel@lists.infradead.org; Wed, 22 Aug 2012 14:30:12 +0000 Received: from localhost.localdomain (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0M9AGP-1Swikg3f2b-00CQjm; Wed, 22 Aug 2012 16:29:56 +0200 From: Arnd Bergmann To: Russell King Subject: [PATCH 4/4] ARM: kprobes: make more tests conditional Date: Wed, 22 Aug 2012 16:29:40 +0200 Message-Id: <1345645780-2749-5-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1345645780-2749-1-git-send-email-arnd@arndb.de> References: <1345645780-2749-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:fbNlxuXaJqi5u/VWf5ElycFhIdCCYJ9gHg9CMRg1nEy yOAtW2wAj+CGkQE8FHHLTZ9m4UtFMPENrFwb2Kt4CXkvr+/NLX mAywY7Jyc2EI7+mY19qRR4fHYR44qixg+ow5V7V3ljU0UTwhOI Ypfgpotp3Er6LbRqA+ms5MY9B9h+1xwMbukh7i/FHPwzTtQeEq GSr+9mnZzLz9xwNXG05aQdr/HE4jtuQMYR4jLNubVT4gpBsgif 5MpltKrvTMYuEbHl0Icaz5SIg3apZ/54fw+oEXogDrzJzshMmJ MOPjrhqfFCZNJjX6c/QXKm861aikImwKxv7TuMDNDg5NEeaSHV 66LFKXbPhCVyMD3BdFhDxqoPhXAkFWWCZnp6M/taWdER3qvowL 9AdlpZc56rz7w== X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.171 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Nicolas Pitre , Arnd Bergmann , linux-kernel@vger.kernel.org, Jon Medhurst , Leif Lindholm , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The mls instruction is not available in ARMv6K or below, so we should make the test conditional on at least ARMv7. ldrex/strex are available in ARMv6K or ARMv7, which we can test by checking the CONFIG_CPU_32v6K symbol. Just testing for ARMv6 is not enough. /tmp/ccuMTZ8D.s: Assembler messages: /tmp/ccuMTZ8D.s:22188: Error: selected processor does not support ARM mode `mls r0,r1,r2,r3' /tmp/ccuMTZ8D.s:22222: Error: selected processor does not support ARM mode `mlshi r7,r8,r9,r10' /tmp/ccuMTZ8D.s:22252: Error: selected processor does not support ARM mode `mls lr,r1,r2,r13' Signed-off-by: Arnd Bergmann Cc: Jon Medhurst Cc: Russell King Cc: Nicolas Pitre Cc: Leif Lindholm --- arch/arm/kernel/kprobes-test-arm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c index 38c1a3b..3e87ff7 100644 --- a/arch/arm/kernel/kprobes-test-arm.c +++ b/arch/arm/kernel/kprobes-test-arm.c @@ -367,9 +367,11 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED(".word 0xe0500090 @ undef") TEST_UNSUPPORTED(".word 0xe05fff9f @ undef") +#if __LINUX_ARM_ARCH__ >= 7 TEST_RRR( "mls r0, r",1, VAL1,", r",2, VAL2,", r",3, VAL3,"") TEST_RRR( "mlshi r7, r",8, VAL3,", r",9, VAL1,", r",10, VAL2,"") TEST_RR( "mls lr, r",1, VAL2,", r",2, VAL3,", r13") +#endif TEST_UNSUPPORTED(".word 0xe06f3291 @ mls pc, r1, r2, r3") TEST_UNSUPPORTED(".word 0xe060329f @ mls r0, pc, r2, r3") TEST_UNSUPPORTED(".word 0xe0603f91 @ mls r0, r1, pc, r3") @@ -454,7 +456,7 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED(".word 0xe1500090") /* Unallocated space */ TEST_UNSUPPORTED(".word 0xe1600090") /* Unallocated space */ TEST_UNSUPPORTED(".word 0xe1700090") /* Unallocated space */ -#if __LINUX_ARM_ARCH__ >= 6 +#ifdef CONFIG_CPU_32v6K TEST_UNSUPPORTED("ldrex r2, [sp]") TEST_UNSUPPORTED("strexd r0, r2, r3, [sp]") TEST_UNSUPPORTED("ldrexd r2, r3, [sp]")