From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Thu, 16 Feb 2012 06:48:53 -0800 Subject: [U-Boot] [PATCH v3 06/28] x86: Add initial memory barrier macros In-Reply-To: <1329403755-6396-1-git-send-email-sjg@chromium.org> References: <1329403755-6396-1-git-send-email-sjg@chromium.org> Message-ID: <1329403755-6396-7-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de These are available on other architectures, so add them on x86. Signed-off-by: Simon Glass --- 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 -- 1.7.7.3