From patchwork Tue Jul 15 17:00:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sam-the-6 X-Patchwork-Id: 33687 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 33D24201F1 for ; Tue, 15 Jul 2014 17:25:28 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id m1sf17675805oag.7 for ; Tue, 15 Jul 2014 10:25:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=ZujOMZS+um3pjstmtUHybOIbpEnL3uLvoObQ7PAtTHc=; b=M3w51Y02YtUuFmUPAda67gGmSokzz9vs0hxgezTd5B57HtsqJtfKGi90L8qaSVnxkE MdSGCEdhwaRuA39o/gUfnLnkSNmNaZKNI4Kd4MN+0Vj071cC2egOP3r9b8PD8vfALSPD PUcszo3AZT+CKLia7XnuuLhfJRwzq3l/DIdqZGLF1LIy0sGrO6s3J41LDCsJL87n1HBz kN4u6c5hvEXOeRi6QeZvj83JaStQowVuxGIMD/S8tKv4oWKUeEnsa9G0k300Rfz8jz4v 5wEkyhBenGFBpIMbMnzEAmeoK03aWKX7a+xGqSTqxsfO/Q1l38Po3kjVVb5LYI61Hvlk +5ig== X-Gm-Message-State: ALoCoQkw1Pb6ifmd+g9NPZLRvRugRGz+8zP7EGTwMQXaDy3YVsZWffzULMrPfZTy4JHNfOOaTsq8 X-Received: by 10.42.47.10 with SMTP id m10mr2743657icf.34.1405445127757; Tue, 15 Jul 2014 10:25:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.33.202 with SMTP id j68ls162589qgj.28.gmail; Tue, 15 Jul 2014 10:25:27 -0700 (PDT) X-Received: by 10.52.28.231 with SMTP id e7mr1938311vdh.55.1405445127641; Tue, 15 Jul 2014 10:25:27 -0700 (PDT) Received: from mail-vc0-x229.google.com (mail-vc0-x229.google.com [2607:f8b0:400c:c03::229]) by mx.google.com with ESMTPS id u4si7091663vcs.52.2014.07.15.10.25.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Jul 2014 10:25:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::229 as permitted sender) client-ip=2607:f8b0:400c:c03::229; Received: by mail-vc0-f169.google.com with SMTP id hu12so6003339vcb.28 for ; Tue, 15 Jul 2014 10:25:27 -0700 (PDT) X-Received: by 10.52.244.81 with SMTP id xe17mr19802432vdc.24.1405445127565; Tue, 15 Jul 2014 10:25:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp232161vcb; Tue, 15 Jul 2014 10:25:27 -0700 (PDT) X-Received: by 10.68.137.193 with SMTP id qk1mr2776611pbb.155.1405445126689; Tue, 15 Jul 2014 10:25:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mu3si6125699pdb.335.2014.07.15.10.25.25; Tue, 15 Jul 2014 10:25:25 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758397AbaGORZH (ORCPT + 28 others); Tue, 15 Jul 2014 13:25:07 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:46518 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755263AbaGORCJ (ORCPT ); Tue, 15 Jul 2014 13:02:09 -0400 Received: by mail-wi0-f181.google.com with SMTP id bs8so4690132wib.2 for ; Tue, 15 Jul 2014 10:02:07 -0700 (PDT) X-Received: by 10.180.212.113 with SMTP id nj17mr6776464wic.46.1405443727752; Tue, 15 Jul 2014 10:02:07 -0700 (PDT) Received: from Debian ([94.54.73.8]) by mx.google.com with ESMTPSA id cd1sm33806187wjc.19.2014.07.15.10.02.05 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 15 Jul 2014 10:02:06 -0700 (PDT) Received: from sam by Debian with local (Exim 4.80) (envelope-from ) id 1X7678-00040U-TD; Tue, 15 Jul 2014 20:02:02 +0300 From: Sam Asadi To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Jon Medhurst , sam-the-6 Subject: [PATCH 18/94] ARM: kprobes: Fix test code compilation errors for ARMv4 targets Date: Tue, 15 Jul 2014 20:00:33 +0300 Message-Id: <1405443709-15288-18-git-send-email-asadi.samuel@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1405443709-15288-1-git-send-email-asadi.samuel@gmail.com> References: <1405443709-15288-1-git-send-email-asadi.samuel@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Original-Sender: asadi.samuel@gmail.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::229 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Jon Medhurst Conditionally compile kprobes test cases for ARMv5 instructions to avoid compilation errors with ARMv4 targets like: /tmp/cc7Tx8ST.s:16740: Error: selected processor does not support ARM mode `clz r0,r0' Signed-off-by: Jon Medhurst Signed-off-by: sam-the-6 --- arch/arm/kernel/kprobes-test-arm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c index e73f9cf..cb14242 100644 --- a/arch/arm/kernel/kprobes-test-arm.c +++ b/arch/arm/kernel/kprobes-test-arm.c @@ -218,6 +218,7 @@ void kprobe_arm_test_cases(void) TEST_BB_R("bx r",7,2f,"") TEST_BF_R("bxeq r",14,2f,"") +#if __LINUX_ARM_ARCH__ >= 5 TEST_R("clz r0, r",0, 0x0,"") TEST_R("clzeq r7, r",14,0x1,"") TEST_R("clz lr, r",7, 0xffffffff,"") @@ -339,6 +340,7 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED(__inst_arm(0xe16f02e1) " @ smultt pc, r1, r2") TEST_UNSUPPORTED(__inst_arm(0xe16002ef) " @ smultt r0, pc, r2") TEST_UNSUPPORTED(__inst_arm(0xe1600fe1) " @ smultt r0, r1, pc") +#endif TEST_GROUP("Multiply and multiply-accumulate") @@ -561,6 +563,7 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED("ldrsht r1, [r2], #48") #endif +#if __LINUX_ARM_ARCH__ >= 5 TEST_RPR( "strd r",0, VAL1,", [r",1, 48,", -r",2,24,"]") TEST_RPR( "strccd r",8, VAL2,", [r",13,0, ", r",12,48,"]") TEST_RPR( "strd r",4, VAL1,", [r",2, 24,", r",3, 48,"]!") @@ -597,6 +600,7 @@ void kprobe_arm_test_cases(void) TEST_UNSUPPORTED(__inst_arm(0xe1efc3d0) " @ ldrd r12, [pc, #48]!") TEST_UNSUPPORTED(__inst_arm(0xe0c9f3d0) " @ ldrd pc, [r9], #48") TEST_UNSUPPORTED(__inst_arm(0xe0c9e3d0) " @ ldrd lr, [r9], #48") +#endif TEST_GROUP("Miscellaneous") @@ -1229,7 +1233,9 @@ void kprobe_arm_test_cases(void) TEST_COPROCESSOR( "mrc"two" 0, 0, r0, cr0, cr0, 0") COPROCESSOR_INSTRUCTIONS_ST_LD("",e) +#if __LINUX_ARM_ARCH__ >= 5 COPROCESSOR_INSTRUCTIONS_MC_MR("",e) +#endif TEST_UNSUPPORTED("svc 0") TEST_UNSUPPORTED("svc 0xffffff") @@ -1289,7 +1295,9 @@ void kprobe_arm_test_cases(void) TEST( "blx __dummy_thumb_subroutine_odd") #endif /* __LINUX_ARM_ARCH__ >= 6 */ +#if __LINUX_ARM_ARCH__ >= 5 COPROCESSOR_INSTRUCTIONS_ST_LD("2",f) +#endif #if __LINUX_ARM_ARCH__ >= 6 COPROCESSOR_INSTRUCTIONS_MC_MR("2",f) #endif