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>
}
}
+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)
{
/* 4M threshold */
if (numpages >= 1024) {
if (boot_cpu_data.x86 >= 4)
- wbinvd();
+ on_each_cpu(wbinvd_local, NULL, 1);
+
return;
}
/*