From patchwork Wed Sep 23 11:33:23 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Mahajan X-Patchwork-Id: 34150 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 02C27B855B for ; Wed, 23 Sep 2009 21:33:56 +1000 (EST) Received: from az33egw02.freescale.net (az33egw02.freescale.net [192.88.158.103]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "az33egw02.freescale.net", Issuer "Thawte Premium Server CA" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id DB35AB7B88 for ; Wed, 23 Sep 2009 21:33:35 +1000 (EST) Received: from az33smr01.freescale.net (az33smr01.freescale.net [10.64.34.199]) by az33egw02.freescale.net (8.14.3/az33egw02) with ESMTP id n8NBXWBY001559 for ; Wed, 23 Sep 2009 04:33:33 -0700 (MST) Received: from localhost.localdomain (lc0191.zin33.ap.freescale.net [10.232.1.191]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id n8NBZIpV029638; Wed, 23 Sep 2009 06:35:23 -0500 (CDT) From: Vivek Mahajan To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 3/4] powerpc/fsl: 85xx: add mbar() Date: Wed, 23 Sep 2009 17:03:23 +0530 Message-Id: <1253705604-1986-3-git-send-email-vivek.mahajan@freescale.com> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1253705604-1986-2-git-send-email-vivek.mahajan@freescale.com> References: <1253705604-1986-1-git-send-email-vivek.mahajan@freescale.com> <1253705604-1986-2-git-send-email-vivek.mahajan@freescale.com> X-Brightmail-Tracker: AAAAAQAAAWE= Cc: kumar.gala@freescale.com, Vivek Mahajan X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Adds e500/85xx based memory barrier Signed-off-by: Vivek Mahajan --- arch/powerpc/include/asm/synch.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/synch.h b/arch/powerpc/include/asm/synch.h index 28f6ddb..8298089 100644 --- a/arch/powerpc/include/asm/synch.h +++ b/arch/powerpc/include/asm/synch.h @@ -23,6 +23,11 @@ static inline void isync(void) { __asm__ __volatile__ ("isync" : : : "memory"); } + +static inline void mbar(int mo) +{ + __asm__ __volatile__ ("mbar %0" : : "i" (mo) : "memory"); +} #endif /* __ASSEMBLY__ */ #if defined(__powerpc64__)