Commit 910bf6ad authored by Brian Gerst's avatar Brian Gerst Committed by H. Peter Anvin

x86: Simplify flush_write_buffers()

Always make it an inline instead of using a macro for the no-op case.
Signed-off-by: default avatarBrian Gerst <brgerst@gmail.com>
LKML-Reference: <1265380629-3212-7-git-send-email-brgerst@gmail.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 6175ddf0
...@@ -84,18 +84,12 @@ memcpy_toio(volatile void __iomem *dst, const void *src, size_t count) ...@@ -84,18 +84,12 @@ memcpy_toio(volatile void __iomem *dst, const void *src, size_t count)
* 2. Accidentally out of order processors (PPro errata #51) * 2. Accidentally out of order processors (PPro errata #51)
*/ */
#if defined(CONFIG_X86_OOSTORE) || defined(CONFIG_X86_PPRO_FENCE)
static inline void flush_write_buffers(void) static inline void flush_write_buffers(void)
{ {
#if defined(CONFIG_X86_OOSTORE) || defined(CONFIG_X86_PPRO_FENCE)
asm volatile("lock; addl $0,0(%%esp)": : :"memory"); asm volatile("lock; addl $0,0(%%esp)": : :"memory");
}
#else
#define flush_write_buffers() do { } while (0)
#endif #endif
}
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -83,7 +83,13 @@ memcpy_toio(volatile void __iomem *dst, const void *src, size_t count) ...@@ -83,7 +83,13 @@ memcpy_toio(volatile void __iomem *dst, const void *src, size_t count)
* 1. Out of order aware processors * 1. Out of order aware processors
* 2. Accidentally out of order processors (PPro errata #51) * 2. Accidentally out of order processors (PPro errata #51)
*/ */
#define flush_write_buffers() do { } while (0)
static inline void flush_write_buffers(void)
{
#if defined(CONFIG_X86_OOSTORE) || defined(CONFIG_X86_PPRO_FENCE)
asm volatile("lock; addl $0,0(%%esp)": : :"memory");
#endif
}
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment