public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Brian Gerst <brgerst@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	brgerst@gmail.com, tglx@linutronix.de
Subject: [tip:x86/io] x86: Simplify flush_write_buffers()
Date: Fri, 5 Feb 2010 22:50:04 GMT	[thread overview]
Message-ID: <tip-910bf6ad0be3e1efbda0e9d358794937b52c9860@git.kernel.org> (raw)
In-Reply-To: <1265380629-3212-7-git-send-email-brgerst@gmail.com>

Commit-ID:  910bf6ad0be3e1efbda0e9d358794937b52c9860
Gitweb:     http://git.kernel.org/tip/910bf6ad0be3e1efbda0e9d358794937b52c9860
Author:     Brian Gerst <brgerst@gmail.com>
AuthorDate: Fri, 5 Feb 2010 09:37:08 -0500
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Fri, 5 Feb 2010 13:57:38 -0800

x86: Simplify flush_write_buffers()

Always make it an inline instead of using a macro for the no-op case.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
LKML-Reference: <1265380629-3212-7-git-send-email-brgerst@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/include/asm/io_32.h |   10 ++--------
 arch/x86/include/asm/io_64.h |    8 +++++++-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/x86/include/asm/io_32.h b/arch/x86/include/asm/io_32.h
index 685e332..e8177f3 100644
--- a/arch/x86/include/asm/io_32.h
+++ b/arch/x86/include/asm/io_32.h
@@ -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)
  */
 
-#if defined(CONFIG_X86_OOSTORE) || defined(CONFIG_X86_PPRO_FENCE)
-
 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");
-}
-
-#else
-
-#define flush_write_buffers() do { } while (0)
-
 #endif
+}
 
 #endif /* __KERNEL__ */
 
diff --git a/arch/x86/include/asm/io_64.h b/arch/x86/include/asm/io_64.h
index 1305525..6964a1c 100644
--- a/arch/x86/include/asm/io_64.h
+++ b/arch/x86/include/asm/io_64.h
@@ -83,7 +83,13 @@ memcpy_toio(volatile void __iomem *dst, const void *src, size_t count)
  *	1. Out of order aware processors
  *	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__ */
 

  reply	other threads:[~2010-02-05 22:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05 14:37 [PATCH 0/7] x86: Merge 32-bit and 64-bit io.h Brian Gerst
2010-02-05 14:37 ` [PATCH 1/7] x86-32: Move XQUAD definitions to numaq.h Brian Gerst
2010-02-05 22:48   ` [tip:x86/io] " tip-bot for Brian Gerst
2010-02-05 14:37 ` [PATCH 2/7] x86-32: Remove _local variants of in/out from io_32.h Brian Gerst
2010-02-05 22:49   ` [tip:x86/io] " tip-bot for Brian Gerst
2010-02-05 14:37 ` [PATCH 3/7] x86-64: Reorganize io_64.h Brian Gerst
2010-02-05 22:49   ` [tip:x86/io] " tip-bot for Brian Gerst
2010-02-05 14:37 ` [PATCH 4/7] x86-64: Use BUILDIO in io_64.h Brian Gerst
2010-02-05 22:49   ` [tip:x86/io] " tip-bot for Brian Gerst
2010-02-05 14:37 ` [PATCH 5/7] x86: Clean up mem*io functions Brian Gerst
2010-02-05 22:49   ` [tip:x86/io] " tip-bot for Brian Gerst
2010-02-05 14:37 ` [PATCH 6/7] x86: Simplify flush_write_buffers() Brian Gerst
2010-02-05 22:50   ` tip-bot for Brian Gerst [this message]
2010-02-05 14:37 ` [PATCH 7/7] x86: Merge io.h Brian Gerst
2010-02-05 22:50   ` [tip:x86/io] " tip-bot for Brian Gerst

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-910bf6ad0be3e1efbda0e9d358794937b52c9860@git.kernel.org \
    --to=brgerst@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox