ia64/linux-2.6.18-xen.hg

view arch/i386/lib/scrub.c @ 647:a5bb490065f6

Fix the build after public header sync.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Aug 13 14:01:49 2008 +0100 (2008-08-13)
parents 9dcb40286ad4
children
line source
1 #include <asm/cpufeature.h>
2 #include <asm/page.h>
3 #include <asm/processor.h>
5 void scrub_pages(void *v, unsigned int count)
6 {
7 if (likely(cpu_has_xmm2)) {
8 unsigned long n = count * (PAGE_SIZE / sizeof(long) / 4);
10 for (; n--; v += sizeof(long) * 4)
11 asm("movnti %1,(%0)\n\t"
12 "movnti %1,%c2(%0)\n\t"
13 "movnti %1,2*%c2(%0)\n\t"
14 "movnti %1,3*%c2(%0)\n\t"
15 : : "r" (v), "r" (0L), "i" (sizeof(long))
16 : "memory");
17 asm volatile("sfence" : : : "memory");
18 } else
19 for (; count--; v += PAGE_SIZE)
20 clear_page(v);
21 }