Revision 5dae785a82c1a8c05b5b4f9709bd9ce658dcf1b6 authored by Rusty Russell on 29 July 2008, 14:58:35 UTC, committed by Rusty Russell on 28 July 2008, 23:58:35 UTC
Number of exits transmitting 10GB Guest->Host before:
	network xmit 7858610 recv 118136

After:
	network xmit 7750233 recv 1

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent b511179
Raw File
edac.h
#ifndef _ASM_X86_EDAC_H
#define _ASM_X86_EDAC_H

/* ECC atomic, DMA, SMP and interrupt safe scrub function */

static inline void atomic_scrub(void *va, u32 size)
{
	u32 i, *virt_addr = va;

	/*
	 * Very carefully read and write to memory atomically so we
	 * are interrupt, DMA and SMP safe.
	 */
	for (i = 0; i < size / 4; i++, virt_addr++)
		asm volatile("lock; addl $0, %0"::"m" (*virt_addr));
}

#endif
back to top