From patchwork Tue Apr 15 18:15:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 3994771 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7E1DD9F2BA for ; Tue, 15 Apr 2014 18:19:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9803F2017B for ; Tue, 15 Apr 2014 18:19:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7ECB20160 for ; Tue, 15 Apr 2014 18:19:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wa7uQ-0008Rj-4n; Tue, 15 Apr 2014 18:16:38 +0000 Received: from mail-ee0-x22c.google.com ([2a00:1450:4013:c00::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wa7uM-0008Oq-RA for linux-arm-kernel@lists.infradead.org; Tue, 15 Apr 2014 18:16:35 +0000 Received: by mail-ee0-f44.google.com with SMTP id e49so8034296eek.31 for ; Tue, 15 Apr 2014 11:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4ak+rl3aKUDAMvuCPdL8L7D9HC3XOfRCO9ygjdbkF5E=; b=fVk5u3c+SxNmBAnLw3RJzVxcjYjclc+nuSDFmvPxVMDbk2Aq8FW8bGO1Sv50QtBVDG S5qfj6hmIQsHtOkz/x31s1qTO+faS10JGV0cA/5yTXQFOftKA2iT/5b6zmO3sZPq3chI NtBctR+6QTs2fLi7WGFaS5yISZocG+T7EA6APs6nyc5BzY1rTNl7bs1ALKhzJUEZieVV Nv9LsT/VgJ1zBfQbmNvJdJqps1Vy4CsZk9NAaqfHD9eNt+cU6r1oBTljoCzBSSY+vgW2 pB7Tq8bEcEFUtel8ScOdd19z7EDmCT7ChvGr2jozWUL4JMxp8F+ES+c27SjtNjcTSKin HExw== X-Received: by 10.15.48.129 with SMTP id h1mr4393341eew.57.1397585772209; Tue, 15 Apr 2014 11:16:12 -0700 (PDT) Received: from topkick.lan (dslc-082-083-251-183.pools.arcor-ip.net. [82.83.251.183]) by mx.google.com with ESMTPSA id 48sm50954476eei.24.2014.04.15.11.16.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Apr 2014 11:16:11 -0700 (PDT) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH 1/5] ARM: iwmmxt: explicitly check for supported architectures Date: Tue, 15 Apr 2014 20:15:59 +0200 Message-Id: <1397585763-23482-2-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1397585763-23482-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <20140414151236.75f8816d@skate> <1397585763-23482-1-git-send-email-sebastian.hesselbarth@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140415_111635_104789_58EFC6EC X-CRM114-Status: GOOD ( 12.03 ) X-Spam-Score: -0.1 (/) Cc: Thomas Petazzoni , Andrew Lunn , Kevin Hilman , Russell King , Jason Cooper , Arnd Bergmann , Chao Xie , linux-kernel@vger.kernel.org, Haojian Zhuang , Gregory Clement , Olof Johansson , Eric Miao , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP iwmmxt.S requires special treatment of coprocessor access registers for PJ4 and XScale-based CPUs. It only checks for CPU_PJ4 and drops down to XScale-based treatment on all other architectures. As some PJ4B also come with iWMMXt and also need PJ4 treatment, rework the corresponding preprocessor directives to explicitly check for supported architectures and fail on unsupported ones. Signed-off-by: Sebastian Hesselbarth --- Cc: Russell King Cc: Arnd Bergmann Cc: Olof Johansson Cc: Kevin Hilman Cc: Andrew Lunn Cc: Jason Cooper Cc: Gregory Clement Cc: Thomas Petazzoni Cc: Eric Miao Cc: Haojian Zhuang Cc: Chao Xie Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/arm/kernel/iwmmxt.S | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/iwmmxt.S b/arch/arm/kernel/iwmmxt.S index a08783823b32..2452dd1bef53 100644 --- a/arch/arm/kernel/iwmmxt.S +++ b/arch/arm/kernel/iwmmxt.S @@ -19,12 +19,16 @@ #include #include -#if defined(CONFIG_CPU_PJ4) +#if defined(CONFIG_CPU_PJ4) || defined(CONFIG_CPU_PJ4B) #define PJ4(code...) code #define XSC(code...) -#else +#elif defined(CONFIG_CPU_MOHAWK) || \ + defined(CONFIG_CPU_XSC3) || \ + defined(CONFIG_CPU_XSCALE) #define PJ4(code...) #define XSC(code...) code +#else +#error "Unsupported iWMMXt architecture" #endif #define MMX_WR0 (0x00)