summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorvenkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com>2009-05-22 13:23:38 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-22 13:33:59 -0700
commit0af48f42df15b97080b450d24219dd95db7b929a (patch)
treef1746198024b2e93250c1b14855026ba0d769117 /arch
parent0b827537e339c084ac9384df588969d400be9e0d (diff)
x86: cpa_flush_array wbinvd should be done on all CPUs
cpa_flush_array seems to prefer wbinvd() over clflush at 4M threshold. clflush needs to be done on only one CPU as per instruction definition. wbinvd() however, should be done on all CPUs. [ Impact: fix missing flush which could cause data corruption ] Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/mm/pageattr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 2cc019a3f71..0f9052bcec4 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -204,6 +204,11 @@ static void cpa_flush_range(unsigned long start, int numpages, int cache)
}
}
+static void wbinvd_local(void *unused)
+{
+ wbinvd();
+}
+
static void cpa_flush_array(unsigned long *start, int numpages, int cache,
int in_flags, struct page **pages)
{
@@ -219,7 +224,8 @@ static void cpa_flush_array(unsigned long *start, int numpages, int cache,
/* 4M threshold */
if (numpages >= 1024) {
if (boot_cpu_data.x86 >= 4)
- wbinvd();
+ on_each_cpu(wbinvd_local, NULL, 1);
+
return;
}
/*