|
@@ -126,8 +126,8 @@ within(unsigned long addr, unsigned long start, unsigned long end)
|
|
* @vaddr: virtual start address
|
|
* @vaddr: virtual start address
|
|
* @size: number of bytes to flush
|
|
* @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)
|
|
void clflush_cache_range(void *vaddr, unsigned int size)
|
|
{
|
|
{
|
|
@@ -136,11 +136,11 @@ void clflush_cache_range(void *vaddr, unsigned int size)
|
|
mb();
|
|
mb();
|
|
|
|
|
|
for (; vaddr < vend; vaddr += boot_cpu_data.x86_clflush_size)
|
|
for (; vaddr < vend; vaddr += boot_cpu_data.x86_clflush_size)
|
|
- clflush(vaddr);
|
|
|
|
|
|
+ clflushopt(vaddr);
|
|
/*
|
|
/*
|
|
* Flush any possible final partial cacheline:
|
|
* Flush any possible final partial cacheline:
|
|
*/
|
|
*/
|
|
- clflush(vend);
|
|
|
|
|
|
+ clflushopt(vend);
|
|
|
|
|
|
mb();
|
|
mb();
|
|
}
|
|
}
|