From patchwork Fri Feb 4 14:20:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot for Dave Martin X-Patchwork-Id: 531921 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p14EKsYc002826 for ; Fri, 4 Feb 2011 14:20:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752451Ab1BDOUx (ORCPT ); Fri, 4 Feb 2011 09:20:53 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:65517 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752266Ab1BDOUw (ORCPT ); Fri, 4 Feb 2011 09:20:52 -0500 Received: by wyb28 with SMTP id 28so2294467wyb.19 for ; Fri, 04 Feb 2011 06:20:51 -0800 (PST) Received: by 10.227.128.72 with SMTP id j8mr771005wbs.68.1296829251335; Fri, 04 Feb 2011 06:20:51 -0800 (PST) Received: from e200948.cambridge.arm.com (host86-160-160-30.range86-160.btcentralplus.com [86.160.160.30]) by mx.google.com with ESMTPS id u9sm553955wbg.6.2011.02.04.06.20.49 (version=SSLv3 cipher=RC4-MD5); Fri, 04 Feb 2011 06:20:51 -0800 (PST) From: Dave Martin To: linux-arm-kernel@lists.infradead.org Cc: Dave Martin , Tony Lindgren , Santosh Shilimkar , Jean Pihet , linux-omap@vger.kernel.org, Nicolas Pitre , Russell King Subject: [PATCH] ARM: Define wfi(), wfe(), sev() macros for pre-v7 processors Date: Fri, 4 Feb 2011 14:20:43 +0000 Message-Id: <1296829243-21313-1-git-send-email-dave.martin@linaro.org> X-Mailer: git-send-email 1.7.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 04 Feb 2011 14:20:55 +0000 (UTC) diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 97f6d60..0e1cae3 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -129,7 +129,14 @@ extern unsigned int user_debug; #define sev() __asm__ __volatile__ ("sev" : : : "memory") #define wfe() __asm__ __volatile__ ("wfe" : : : "memory") #define wfi() __asm__ __volatile__ ("wfi" : : : "memory") +#else /* __LINUX_ARM_ARCH__ < 7 */ +#define sev() __asm__ __volatile__ ("" : : : "memory") +#define wfe() __asm__ __volatile__ ("" : : : "memory") +#if __LINUX_ARM_ARCH__ == 6 +#define wfi() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ + : : "r" (0) : "memory") #endif +#endif /* __LINUX_ARM_ARCH__ < 7 */ #if __LINUX_ARM_ARCH__ >= 7 #define isb() __asm__ __volatile__ ("isb" : : : "memory")