mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Ross Zwisler <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	ross.zwisler@linux.intel.com, tglx@linutronix.de,
	hpa@linux.intel.com
Subject: [tip:x86/cpu] x86: Use clflushopt in clflush_cache_range
Date: Thu, 27 Feb 2014 08:30:26 -0800	[thread overview]
Message-ID: <tip-8b80fd8b45458a7d0b726d454c51c5219e0fb2ee@git.kernel.org> (raw)
In-Reply-To: <1393441612-19729-3-git-send-email-ross.zwisler@linux.intel.com>

Commit-ID:  8b80fd8b45458a7d0b726d454c51c5219e0fb2ee
Gitweb:     http://git.kernel.org/tip/8b80fd8b45458a7d0b726d454c51c5219e0fb2ee
Author:     Ross Zwisler <ross.zwisler@linux.intel.com>
AuthorDate: Wed, 26 Feb 2014 12:06:50 -0700
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 27 Feb 2014 08:26:10 -0800

x86: Use clflushopt in clflush_cache_range

If clflushopt is available on the system, use it instead of clflush in
clflush_cache_range.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Link: http://lkml.kernel.org/r/1393441612-19729-3-git-send-email-ross.zwisler@linux.intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/mm/pageattr.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index b3b19f4..b1c4672 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -126,8 +126,8 @@ within(unsigned long addr, unsigned long start, unsigned long end)
  * @vaddr:	virtual start address
  * @size:	number of bytes to flush
  *
- * clflush is an unordered instruction which needs fencing with mfence
- * to avoid ordering issues.
+ * clflushopt is an unordered instruction which needs fencing with mfence or
+ * sfence to avoid ordering issues.
  */
 void clflush_cache_range(void *vaddr, unsigned int size)
 {
@@ -136,11 +136,11 @@ void clflush_cache_range(void *vaddr, unsigned int size)
 	mb();
 
 	for (; vaddr < vend; vaddr += boot_cpu_data.x86_clflush_size)
-		clflush(vaddr);
+		clflushopt(vaddr);
 	/*
 	 * Flush any possible final partial cacheline:
 	 */
-	clflush(vend);
+	clflushopt(vend);
 
 	mb();
 }

  reply	other threads:[~2014-02-27 16:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26 19:06 [PATCH 0/4] x86: Add and use support for clflushopt Ross Zwisler
2014-02-26 19:06 ` [PATCH 1/4] x86: Add " Ross Zwisler
2014-02-27 16:27   ` [tip:x86/cpufeature] x86: Add support for the clflushopt instruction tip-bot for Ross Zwisler
2014-02-26 19:06 ` [PATCH 2/4] x86: Use clflushopt in clflush_cache_range Ross Zwisler
2014-02-27 16:30   ` tip-bot for Ross Zwisler [this message]
2014-02-26 19:06 ` [PATCH 3/4] x86: Use clflushopt in drm_clflush_page Ross Zwisler
2014-02-27 16:30   ` [tip:x86/cpu] " tip-bot for Ross Zwisler
2014-02-26 19:06 ` [PATCH 4/4] x86: Use clflushopt in drm_clflush_virt_range Ross Zwisler
2014-02-27 16:30   ` [tip:x86/cpu] " tip-bot for Ross Zwisler

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-8b80fd8b45458a7d0b726d454c51c5219e0fb2ee@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=ross.zwisler@linux.intel.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

Powered by JetHome