From 4287f4e6b15d4483366c7a7335eacde89c30d4f4 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 15 Oct 2007 23:28:20 +0200 Subject: [PATCH] --- yaml --- r: 71035 b: refs/heads/master c: 1f7afb08a595292d946a5f1fd4929c81db7042d2 h: refs/heads/master i: 71033: 8dafdd9964133bb0462a5dcf7cb00ca885ad1419 71031: 8c2b5ed9c12e8051a95471a2c73fff0fa8f78dfc v: v3 --- [refs] | 2 +- trunk/include/asm-x86/edac.h | 21 +++++++++++++++++---- trunk/include/asm-x86/edac_32.h | 18 ------------------ trunk/include/asm-x86/edac_64.h | 18 ------------------ 4 files changed, 18 insertions(+), 41 deletions(-) delete mode 100644 trunk/include/asm-x86/edac_32.h delete mode 100644 trunk/include/asm-x86/edac_64.h diff --git a/[refs] b/[refs] index 2ad30b0e540c..45f842a6e431 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 327c21bc3d347d545d227103d7cc58039ab8a0be +refs/heads/master: 1f7afb08a595292d946a5f1fd4929c81db7042d2 diff --git a/trunk/include/asm-x86/edac.h b/trunk/include/asm-x86/edac.h index f8b888e140b0..cf3200a745ad 100644 --- a/trunk/include/asm-x86/edac.h +++ b/trunk/include/asm-x86/edac.h @@ -1,5 +1,18 @@ -#ifdef CONFIG_X86_32 -# include "edac_32.h" -#else -# include "edac_64.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 diff --git a/trunk/include/asm-x86/edac_32.h b/trunk/include/asm-x86/edac_32.h deleted file mode 100644 index 3e7dd0ab68ce..000000000000 --- a/trunk/include/asm-x86/edac_32.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef ASM_EDAC_H -#define ASM_EDAC_H - -/* ECC atomic, DMA, SMP and interrupt safe scrub function */ - -static __inline__ void atomic_scrub(void *va, u32 size) -{ - unsigned long *virt_addr = va; - u32 i; - - for (i = 0; i < size / 4; i++, virt_addr++) - /* Very carefully read and write to memory atomically - * so we are interrupt, DMA and SMP safe. - */ - __asm__ __volatile__("lock; addl $0, %0"::"m"(*virt_addr)); -} - -#endif diff --git a/trunk/include/asm-x86/edac_64.h b/trunk/include/asm-x86/edac_64.h deleted file mode 100644 index cad1cd42b4ee..000000000000 --- a/trunk/include/asm-x86/edac_64.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef ASM_EDAC_H -#define ASM_EDAC_H - -/* ECC atomic, DMA, SMP and interrupt safe scrub function */ - -static __inline__ void atomic_scrub(void *va, u32 size) -{ - unsigned int *virt_addr = va; - u32 i; - - for (i = 0; i < size / 4; i++, virt_addr++) - /* Very carefully read and write to memory atomically - * so we are interrupt, DMA and SMP safe. - */ - __asm__ __volatile__("lock; addl $0, %0"::"m"(*virt_addr)); -} - -#endif