x86: unify include/asm/cache_32/64.h
authorThomas Gleixner <tglx@linutronix.de>
Mon, 15 Oct 2007 21:28:20 +0000 (23:28 +0200)
committerThomas Gleixner <tglx@inhelltoy.tec.linutronix.de>
Wed, 17 Oct 2007 18:17:19 +0000 (20:17 +0200)
Same file, except for whitespace, comment formatting and:

32-bit: unsigned long *virt_addr = va;
64-bit: unsigned int *virt_addr = va;

Both can be safely replaced by:
u32 i, *virt_addr = va;

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/asm-x86/edac.h
include/asm-x86/edac_32.h [deleted file]
include/asm-x86/edac_64.h [deleted file]

index f8b888e140b0cb7540e020ddb3a8b7a8669a75a7..cf3200a745ad7b41e6925fb8ab5c7704cfb71fb3 100644 (file)
@@ -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/include/asm-x86/edac_32.h b/include/asm-x86/edac_32.h
deleted file mode 100644 (file)
index 3e7dd0a..0000000
+++ /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/include/asm-x86/edac_64.h b/include/asm-x86/edac_64.h
deleted file mode 100644 (file)
index cad1cd4..0000000
+++ /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