From patchwork Thu Oct 4 00:39:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 188971 X-Patchwork-Delegate: graeme.russ@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id C469F2C007F for ; Thu, 4 Oct 2012 10:40:15 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8A3572820A; Thu, 4 Oct 2012 02:40:14 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8HFuWtnJGKpn; Thu, 4 Oct 2012 02:40:14 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B417A2820C; Thu, 4 Oct 2012 02:40:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 34697281F5 for ; Thu, 4 Oct 2012 02:40:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qTzZ-t9phhiH for ; Thu, 4 Oct 2012 02:39:59 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-vb0-f74.google.com (mail-vb0-f74.google.com [209.85.212.74]) by theia.denx.de (Postfix) with ESMTPS id 8C272281EC for ; Thu, 4 Oct 2012 02:39:58 +0200 (CEST) Received: by mail-vb0-f74.google.com with SMTP id s24so959799vbi.3 for ; Wed, 03 Oct 2012 17:39:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=mX1kPmx0j5RlFgj7fEczl8J4I9P8LmdYMJD5cd5l7KM=; b=Ix0oFoaCU0mJV+sX5z1Qp0z9ogjUD78tx3/Jco0ZHnK8ew6BTvzLRI4P6o4HBWNJ7p Xzjr4JfrftV4eyhApkct1LgdrYMYip4UZlvdB+pjUId0PiMWsa0yCK06z2G1kYHnkUqD BfLfC4BCgTZEXfRv8S73zbh6O2Ajz7hqeQPiWVhOs4+yiM6iojINfJTavyhaF0/x1nGD ZMw8uLYWWVYGWwVkr2U2Da7BrZMnzCtu97KBDCISS126f4hRkoSOzTvzay7VkdQjveyl zk4Tsw8Tns16N904l1dSTnqtstp5GzBgRNuP4TehEogKPy3FiYnWur5NGHb7Xd2WWNzD Z/lA== Received: by 10.236.182.201 with SMTP id o49mr2463193yhm.35.1349311197885; Wed, 03 Oct 2012 17:39:57 -0700 (PDT) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id b7si771074yhj.1.2012.10.03.17.39.57 (version=TLSv1/SSLv3 cipher=AES128-SHA); Wed, 03 Oct 2012 17:39:57 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id 624BF100047; Wed, 3 Oct 2012 17:39:57 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 1759D160496; Wed, 3 Oct 2012 17:39:57 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Wed, 3 Oct 2012 17:39:21 -0700 Message-Id: <1349311168-3524-3-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1349311168-3524-1-git-send-email-sjg@chromium.org> References: <1349311168-3524-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQmE1Hjygk9QnLBKzRcoIl54/K0jaZmzNUu1P+sFPwDT7CJlnGWNjIXnOypfUuT1bVb+c6d3h51NMWa0Mqx0Khs5rcNQfZ+bnLg8EKIp3XpUDPL18gAAG/i8z12N+BS6/kMz0AEvNkpXcNKRr8m6ZLgOHrOcVkJv1PolnGBOMgxXLFGl4hg+wwQO4Fj9sBPhRH+QYuj5 Subject: [U-Boot] [PATCH 2/9] x86: Add initial memory barrier macros X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de These are available on other architectures, so add them on x86. Signed-off-by: Simon Glass Acked-by: Gabe Black --- arch/x86/include/asm/io.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 9b757d4..b12bdd8 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -234,4 +234,12 @@ static inline phys_addr_t virt_to_phys(void * vaddr) return (phys_addr_t)(vaddr); } +/* + * TODO: The kernel offers some more advanced versions of barriers, it might + * have some advantages to use them instead of the simple one here. + */ +#define dmb() __asm__ __volatile__ ("" : : : "memory") +#define __iormb() dmb() +#define __iowmb() dmb() + #endif