linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com,
	vikas.shivappa@linux.intel.com
Cc: gavin.hindman@intel.com, jithu.joseph@intel.com,
	dave.hansen@intel.com, mingo@redhat.com, hpa@zytor.com,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	Reinette Chatre <reinette.chatre@intel.com>
Subject: [RFC PATCH 6/7] mtd: replace direct wbinvd invoke with kernel api
Date: Tue, 24 Jul 2018 13:40:17 -0700	[thread overview]
Message-ID: <c455c2a5c172b7e1f72fcb8741d213d6a71e56d0.1532463771.git.reinette.chatre@intel.com> (raw)
In-Reply-To: <cover.1532463771.git.reinette.chatre@intel.com>
In-Reply-To: <cover.1532463771.git.reinette.chatre@intel.com>

The nettel driver contains a few direct wbinvd invocations in the form:
__asm__ ("wbinvd")

Replace all of these calls with the kernel API "native_wbinvd()" that
translates to same as "asm volatile("wbinvd" : : : "memory")" and
provides a central location where calls to this destructive instruction
can be tracked and potentially acted on.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/mtd/maps/nettel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/maps/nettel.c b/drivers/mtd/maps/nettel.c
index 729579fb654f..325357cda202 100644
--- a/drivers/mtd/maps/nettel.c
+++ b/drivers/mtd/maps/nettel.c
@@ -213,7 +213,7 @@ static int __init nettel_init(void)
 	maxsize = AMD_WINDOW_MAXSIZE;
 
 	*amdpar = SC520_PAR(SC520_PAR_BOOTCS, amdaddr, maxsize);
-	__asm__ ("wbinvd");
+	native_wbinvd();
 
 	nettel_amd_map.phys = amdaddr;
 	nettel_amd_map.virt = ioremap_nocache(amdaddr, maxsize);
@@ -326,7 +326,7 @@ static int __init nettel_init(void)
 	 */
 	intel1addr = intel0addr + intel0size;
 	*intel1par = SC520_PAR(intel1cs, intel1addr, maxsize);
-	__asm__ ("wbinvd");
+	native_wbinvd();
 
 	maxsize += intel0size;
 
@@ -352,7 +352,7 @@ static int __init nettel_init(void)
 	intel1size = intel_mtd->size - intel0size;
 	if (intel1size > 0) {
 		*intel1par = SC520_PAR(intel1cs, intel1addr, intel1size);
-		__asm__ ("wbinvd");
+		native_wbinvd();
 	} else {
 		*intel1par = 0;
 	}
-- 
2.17.0


  parent reply	other threads:[~2018-07-24 20:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 20:40 [RFC PATCH 0/7] x86/intel_rdt: Restoration of Cache Pseudo-Locked regions Reinette Chatre
2018-07-24 20:40 ` [RFC PATCH 1/7] x86/intel_rdt: Expose useful functions to all RDT code Reinette Chatre
2018-07-24 20:40 ` [RFC PATCH 2/7] x86/intel_rdt: Enable a pseudo-locked region to be restored Reinette Chatre
2018-07-24 20:40 ` [RFC PATCH 3/7] x86/intel_rdt: Enable user to trigger pseudo-locked region restore Reinette Chatre
2018-07-24 20:40 ` [RFC PATCH 4/7] x86/intel_rdt: Support restore of all pseudo-locked regions Reinette Chatre
2018-07-24 20:40 ` [RFC PATCH 5/7] x86/intel_rdt: Trigger pseudo-lock restore after wbinvd call Reinette Chatre
2018-07-24 20:40 ` Reinette Chatre [this message]
2018-07-24 20:40 ` [RFC PATCH 7/7] video: fbdev: i810: replace direct wbinvd invoke with kernel api Reinette Chatre
2018-08-03 11:45 ` [RFC PATCH 0/7] x86/intel_rdt: Restoration of Cache Pseudo-Locked regions Thomas Gleixner
2018-08-03 14:23   ` Dave Hansen
2018-08-03 14:48     ` Peter Zijlstra
2018-08-03 15:40   ` Reinette Chatre
2018-08-03 15:51     ` Peter Zijlstra

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=c455c2a5c172b7e1f72fcb8741d213d6a71e56d0.1532463771.git.reinette.chatre@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=gavin.hindman@intel.com \
    --cc=hpa@zytor.com \
    --cc=jithu.joseph@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=vikas.shivappa@linux.intel.com \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).