From patchwork Tue Oct 9 15:22:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12066 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B19C423F6D for ; Tue, 9 Oct 2012 15:23:31 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 44C7FA18CE4 for ; Tue, 9 Oct 2012 15:23:31 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so11480968iej.11 for ; Tue, 09 Oct 2012 08:23:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=QakXpzInh76y/OUrjwttP53tE2jSjlY7sJshrbTd5TE=; b=pIAfmvBj1kaKi1UsGeo5aCieFpBCctfqzactjUoV+aPKSVi6Xa00wBq6Ugu6tKc9Ak 4hdJX1tIXXu/3ZFXQ2o2kvNCTEjsEEiqSMF/6K0yopuDAMzIXYLlkmmmaGScvlgF3yHG idDHVoqBEkadAA8fGKaQv7QsKsea3nTZ17iuH75GfO9VehcMp/nKHtrp3T0aBJ6SpbIF o28ARPTBOMApIQuMUiU/iTBI+8F3el9lvJ6QU3T61TjoUv5E3kFyAm67K+2eToxn7k4x Rt1lPT9L/w5Ift3gpBYFgcLM87zibWOepBT82EjnW3CdDZAtnKm126ZXz9npZm7QNdZU rz9A== Received: by 10.50.91.195 with SMTP id cg3mr2035652igb.57.1349796210682; Tue, 09 Oct 2012 08:23:30 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp73058igt; Tue, 9 Oct 2012 08:23:29 -0700 (PDT) Received: by 10.180.77.38 with SMTP id p6mr5232320wiw.1.1349796208756; Tue, 09 Oct 2012 08:23:28 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.126.171]) by mx.google.com with ESMTPS id s8si22298214wic.25.2012.10.09.08.23.28 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Oct 2012 08:23:28 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.171 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.171; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.126.171 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from klappe2.boeblingen.de.ibm.com (deibp9eh1--blueice3n2.emea.ibm.com [195.212.29.180]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0LzJj7-1TQOt83KVt-014zeQ; Tue, 09 Oct 2012 17:23:24 +0200 From: Arnd Bergmann To: Russell King Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Leif Lindholm Subject: [PATCH 1/9] ARM: kprobes: make more tests conditional Date: Tue, 9 Oct 2012 17:22:55 +0200 Message-Id: <1349796183-30648-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1349796183-30648-1-git-send-email-arnd@arndb.de> References: <1349796183-30648-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:Wa+JW5/d4bRMZNqKbTGOzIojBUFL8WvQbXMPWE+NAM6 2t9NMJQyM1U98g5LyInzsstCF/+Er22q2yJGKS3pO+2Gy17eRj 3JW+CaWSMaOQ+CmqwR00gFcDKz5JyIfPQBbN2dOHwIYqzpKKAk L6N5Tp6+aI9qMPsGcxLASHYVxXy31zSHzaM9LM8kl8YsB17oOX i/rQzdDiGTAtfgQYpOtWaacC44+nSlRT/K/kqEWkiw5HOodSh9 ZNZsU9B2S1qwTq8cFwP5RdoCFsG/6a8ckrE31xb2bPCBs82tsv +pgPcntQnOZHkWDBX+pQYMR7Y9K3yFWUx0Ym2vqBnJF6J4UT1h X5pxU8KulVFpzpQnmTysYUzwoBC9WG0/WbBAa1vpclLp7mbJDg fQToJraZvFh7IWk77hpuMssI2+OU6d6h8w= X-Gm-Message-State: ALoCoQkInYddTcH1/sh3nuU8SJFI4E18WxeBHyYgpA9dpZPLJkqcNU9WTFncEamhbClHdIhGiDZh The mls instruction is not available in ARMv6K or below, so we should make the test conditional on at least ARMv7. ldrexd/strexd are available in ARMv6K or ARMv7, which we can test by checking the CONFIG_CPU_32v6K symbol. /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 Acked-by: Jon Medhurst Acked-by: Nicolas Pitre Cc: Russell King Cc: Leif Lindholm --- arch/arm/kernel/kprobes-test-arm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c index 38c1a3b..8393129 100644 --- a/arch/arm/kernel/kprobes-test-arm.c +++ b/arch/arm/kernel/kprobes-test-arm.c @@ -366,7 +366,9 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED(".word 0xe04f0392 @ umaal r0, pc, r2, r3") TEST_UNSUPPORTED(".word 0xe0500090 @ undef") TEST_UNSUPPORTED(".word 0xe05fff9f @ undef") +#endif +#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") @@ -456,6 +458,8 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED(".word 0xe1700090") /* Unallocated space */ #if __LINUX_ARM_ARCH__ >= 6 TEST_UNSUPPORTED("ldrex r2, [sp]") +#endif +#if (__LINUX_ARM_ARCH__ >= 7) || defined(CONFIG_CPU_32v6K) TEST_UNSUPPORTED("strexd r0, r2, r3, [sp]") TEST_UNSUPPORTED("ldrexd r2, r3, [sp]") TEST_UNSUPPORTED("strexb r0, r2, [sp]")