Browse Source

x86: re-add clflush_cache_range()

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Ingo Molnar 17 years ago
parent
commit
4554ab95c2
1 changed files with 8 additions and 0 deletions
  1. 8 0
      arch/x86/mm/pageattr.c

+ 8 - 0
arch/x86/mm/pageattr.c

@@ -9,6 +9,14 @@
 #include <linux/slab.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
 #include <linux/mm.h>
 
 
+void clflush_cache_range(void *addr, int size)
+{
+	int i;
+
+	for (i = 0; i < size; i += boot_cpu_data.x86_clflush_size)
+		clflush(addr+i);
+}
+
 #include <asm/processor.h>
 #include <asm/processor.h>
 #include <asm/tlbflush.h>
 #include <asm/tlbflush.h>
 #include <asm/sections.h>
 #include <asm/sections.h>