Further tidyup of raid6 naming in lib/raid6
authorNeilBrown <neilb@suse.de>
Wed, 11 Aug 2010 20:44:54 +0000 (06:44 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 11 Aug 2010 20:44:54 +0000 (06:44 +1000)
Rename raid6/raid6x86.h to raid6/x86.h
and modify some comments.

Signed-off-by: NeilBrown <neilb@suse.de>
lib/raid6/algos.c
lib/raid6/mmx.c
lib/raid6/raid6x86.h [deleted file]
lib/raid6/recov.c
lib/raid6/sse1.c
lib/raid6/sse2.c
lib/raid6/x86.h [new file with mode: 0644]

index df7ff72..b595f56 100644 (file)
@@ -11,7 +11,7 @@
  * ----------------------------------------------------------------------- */
 
 /*
- * raid6algos.c
+ * raid6/algos.c
  *
  * Algorithm list and algorithm selection for RAID-6
  */
index e7f6c13..279347f 100644 (file)
@@ -11,7 +11,7 @@
  * ----------------------------------------------------------------------- */
 
 /*
- * raid6mmx.c
+ * raid6/mmx.c
  *
  * MMX implementation of RAID-6 syndrome functions
  */
@@ -19,9 +19,9 @@
 #if defined(__i386__) && !defined(__arch_um__)
 
 #include <linux/raid/pq.h>
-#include "raid6x86.h"
+#include "x86.h"
 
-/* Shared with raid6sse1.c */
+/* Shared with raid6/sse1.c */
 const struct raid6_mmx_constants {
        u64 x1d;
 } raid6_mmx_constants = {
diff --git a/lib/raid6/raid6x86.h b/lib/raid6/raid6x86.h
deleted file mode 100644 (file)
index 4c22c15..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/* ----------------------------------------------------------------------- *
- *
- *   Copyright 2002-2004 H. Peter Anvin - All Rights Reserved
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
- *   Boston MA 02111-1307, USA; either version 2 of the License, or
- *   (at your option) any later version; incorporated herein by reference.
- *
- * ----------------------------------------------------------------------- */
-
-/*
- * raid6x86.h
- *
- * Definitions common to x86 and x86-64 RAID-6 code only
- */
-
-#ifndef LINUX_RAID_RAID6X86_H
-#define LINUX_RAID_RAID6X86_H
-
-#if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__)
-
-#ifdef __KERNEL__ /* Real code */
-
-#include <asm/i387.h>
-
-#else /* Dummy code for user space testing */
-
-static inline void kernel_fpu_begin(void)
-{
-}
-
-static inline void kernel_fpu_end(void)
-{
-}
-
-#define X86_FEATURE_MMX                (0*32+23) /* Multimedia Extensions */
-#define X86_FEATURE_FXSR       (0*32+24) /* FXSAVE and FXRSTOR instructions
-                                          * (fast save and restore) */
-#define X86_FEATURE_XMM                (0*32+25) /* Streaming SIMD Extensions */
-#define X86_FEATURE_XMM2       (0*32+26) /* Streaming SIMD Extensions-2 */
-#define X86_FEATURE_MMXEXT     (1*32+22) /* AMD MMX extensions */
-
-/* Should work well enough on modern CPUs for testing */
-static inline int boot_cpu_has(int flag)
-{
-       u32 eax = (flag >> 5) ? 0x80000001 : 1;
-       u32 edx;
-
-       asm volatile("cpuid"
-                    : "+a" (eax), "=d" (edx)
-                    : : "ecx", "ebx");
-
-       return (edx >> (flag & 31)) & 1;
-}
-
-#endif /* ndef __KERNEL__ */
-
-#endif
-#endif
index 2609f00..8590d19 100644 (file)
@@ -11,7 +11,7 @@
  * ----------------------------------------------------------------------- */
 
 /*
- * raid6recov.c
+ * raid6/recov.c
  *
  * RAID-6 data recovery in dual failure mode.  In single failure mode,
  * use the RAID-5 algorithm (or, in the case of Q failure, just reconstruct
index b274dd5..10dd919 100644 (file)
@@ -11,7 +11,7 @@
  * ----------------------------------------------------------------------- */
 
 /*
- * raid6sse1.c
+ * raid6/sse1.c
  *
  * SSE-1/MMXEXT implementation of RAID-6 syndrome functions
  *
@@ -24,9 +24,9 @@
 #if defined(__i386__) && !defined(__arch_um__)
 
 #include <linux/raid/pq.h>
-#include "raid6x86.h"
+#include "x86.h"
 
-/* Defined in raid6mmx.c */
+/* Defined in raid6/mmx.c */
 extern const struct raid6_mmx_constants {
        u64 x1d;
 } raid6_mmx_constants;
index 6ed6c6c..bc2d57d 100644 (file)
@@ -11,7 +11,7 @@
  * ----------------------------------------------------------------------- */
 
 /*
- * raid6sse2.c
+ * raid6/sse2.c
  *
  * SSE-2 implementation of RAID-6 syndrome functions
  *
@@ -20,7 +20,7 @@
 #if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__)
 
 #include <linux/raid/pq.h>
-#include "raid6x86.h"
+#include "x86.h"
 
 static const struct raid6_sse_constants {
        u64 x1d[2];
diff --git a/lib/raid6/x86.h b/lib/raid6/x86.h
new file mode 100644 (file)
index 0000000..cb2a8c9
--- /dev/null
@@ -0,0 +1,61 @@
+/* ----------------------------------------------------------------------- *
+ *
+ *   Copyright 2002-2004 H. Peter Anvin - All Rights Reserved
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+ *   Boston MA 02111-1307, USA; either version 2 of the License, or
+ *   (at your option) any later version; incorporated herein by reference.
+ *
+ * ----------------------------------------------------------------------- */
+
+/*
+ * raid6/x86.h
+ *
+ * Definitions common to x86 and x86-64 RAID-6 code only
+ */
+
+#ifndef LINUX_RAID_RAID6X86_H
+#define LINUX_RAID_RAID6X86_H
+
+#if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__)
+
+#ifdef __KERNEL__ /* Real code */
+
+#include <asm/i387.h>
+
+#else /* Dummy code for user space testing */
+
+static inline void kernel_fpu_begin(void)
+{
+}
+
+static inline void kernel_fpu_end(void)
+{
+}
+
+#define X86_FEATURE_MMX                (0*32+23) /* Multimedia Extensions */
+#define X86_FEATURE_FXSR       (0*32+24) /* FXSAVE and FXRSTOR instructions
+                                          * (fast save and restore) */
+#define X86_FEATURE_XMM                (0*32+25) /* Streaming SIMD Extensions */
+#define X86_FEATURE_XMM2       (0*32+26) /* Streaming SIMD Extensions-2 */
+#define X86_FEATURE_MMXEXT     (1*32+22) /* AMD MMX extensions */
+
+/* Should work well enough on modern CPUs for testing */
+static inline int boot_cpu_has(int flag)
+{
+       u32 eax = (flag >> 5) ? 0x80000001 : 1;
+       u32 edx;
+
+       asm volatile("cpuid"
+                    : "+a" (eax), "=d" (edx)
+                    : : "ecx", "ebx");
+
+       return (edx >> (flag & 31)) & 1;
+}
+
+#endif /* ndef __KERNEL__ */
+
+#endif
+#endif