From patchwork Wed Sep 7 15:59:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 3963 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 109FC23EFC for ; Wed, 7 Sep 2011 15:59:37 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 04988A18360 for ; Wed, 7 Sep 2011 15:59:37 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id 18so958886fxd.11 for ; Wed, 07 Sep 2011 08:59:36 -0700 (PDT) Received: by 10.223.4.133 with SMTP id 5mr486985far.81.1315411176895; Wed, 07 Sep 2011 08:59:36 -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.152.11.8 with SMTP id m8cs144815lab; Wed, 7 Sep 2011 08:59:36 -0700 (PDT) Received: by 10.14.22.210 with SMTP id t58mr2581460eet.87.1315411176144; Wed, 07 Sep 2011 08:59:36 -0700 (PDT) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id y7si806133weq.38.2011.09.07.08.59.36 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 07 Sep 2011 08:59:36 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) smtp.mail=dave.martin@linaro.org Received: by wyg19 with SMTP id 19so6494493wyg.37 for ; Wed, 07 Sep 2011 08:59:35 -0700 (PDT) Received: by 10.216.22.202 with SMTP id t52mr4137639wet.100.1315411175727; Wed, 07 Sep 2011 08:59:35 -0700 (PDT) Received: from e103592.peterhouse.linaro.org (fw-lnat.cambridge.arm.com [217.140.96.63]) by mx.google.com with ESMTPS id fo14sm903031wbb.19.2011.09.07.08.59.34 (version=SSLv3 cipher=OTHER); Wed, 07 Sep 2011 08:59:34 -0700 (PDT) From: Dave Martin To: linux-arm-kernel@lists.infradead.org Cc: patches@linaro.org, Haojian Zhuang , Eric Miao Subject: [RFC PATCH 2/3] ARM: iwmmxt: Port problematic iwmmxt support code to v7/Thumb-2 Date: Wed, 7 Sep 2011 16:59:17 +0100 Message-Id: <1315411158-17479-3-git-send-email-dave.martin@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1315411158-17479-1-git-send-email-dave.martin@linaro.org> References: <1315411158-17479-1-git-send-email-dave.martin@linaro.org> The iwmmxt code contains some code to implement a pseudo-ISB, but this is not buildable for Thumb-2. This patch replaces the pseudo-ISB with a real one for Thumb-2 kernels. Signed-off-by: Dave Martin --- arch/arm/kernel/iwmmxt.S | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/kernel/iwmmxt.S b/arch/arm/kernel/iwmmxt.S index a087838..bee8a74 100644 --- a/arch/arm/kernel/iwmmxt.S +++ b/arch/arm/kernel/iwmmxt.S @@ -319,8 +319,17 @@ ENTRY(iwmmxt_task_switch) PJ4(eor r1, r1, #0xf) PJ4(mcr p15, 0, r1, c1, c0, 2) +/* + * When enough people have binutils which support -march=...+iwmmxt, this + * should change to #if __LINUX_ARM_ARCH__ < 7. + */ +#ifndef CONFIG_THUMB2_KERNEL mrc p15, 0, r1, c2, c0, 0 sub pc, lr, r1, lsr #32 @ cpwait and return +#else + isb @ ISB needed instead on ARMv7 + mov pc, lr +#endif /* * Remove Concan ownership of given task