git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bnx2x: Fan failure mechanism on additional design
[safe/jmp/linux-2.6]
/
drivers
/
md
/
raid6mmx.c
diff --git
a/drivers/md/raid6mmx.c
b/drivers/md/raid6mmx.c
index
359157a
..
d4e4a1b
100644
(file)
--- a/
drivers/md/raid6mmx.c
+++ b/
drivers/md/raid6mmx.c
@@
-16,7
+16,7
@@
* MMX implementation of RAID-6 syndrome functions
*/
* MMX implementation of RAID-6 syndrome functions
*/
-#if defined(__i386__)
+#if defined(__i386__)
&& !defined(__arch_um__)
#include "raid6.h"
#include "raid6x86.h"
#include "raid6.h"
#include "raid6x86.h"
@@
-30,14
+30,8
@@
const struct raid6_mmx_constants {
static int raid6_have_mmx(void)
{
static int raid6_have_mmx(void)
{
-#ifdef __KERNEL__
/* Not really "boot_cpu" but "all_cpus" */
return boot_cpu_has(X86_FEATURE_MMX);
/* Not really "boot_cpu" but "all_cpus" */
return boot_cpu_has(X86_FEATURE_MMX);
-#else
- /* User space test code */
- u32 features = cpuid_features();
- return ( (features & (1<<23)) == (1<<23) );
-#endif
}
/*
}
/*
@@
-48,13
+42,12
@@
static void raid6_mmx1_gen_syndrome(int disks, size_t bytes, void **ptrs)
u8 **dptr = (u8 **)ptrs;
u8 *p, *q;
int d, z, z0;
u8 **dptr = (u8 **)ptrs;
u8 *p, *q;
int d, z, z0;
- raid6_mmx_save_t sa;
z0 = disks - 3; /* Highest data disk */
p = dptr[z0+1]; /* XOR parity */
q = dptr[z0+2]; /* RS syndrome */
z0 = disks - 3; /* Highest data disk */
p = dptr[z0+1]; /* XOR parity */
q = dptr[z0+2]; /* RS syndrome */
-
raid6_before_mmx(&sa
);
+
kernel_fpu_begin(
);
asm volatile("movq %0,%%mm0" : : "m" (raid6_mmx_constants.x1d));
asm volatile("pxor %mm5,%mm5"); /* Zero temp */
asm volatile("movq %0,%%mm0" : : "m" (raid6_mmx_constants.x1d));
asm volatile("pxor %mm5,%mm5"); /* Zero temp */
@@
-78,7
+71,7
@@
static void raid6_mmx1_gen_syndrome(int disks, size_t bytes, void **ptrs)
asm volatile("pxor %mm4,%mm4");
}
asm volatile("pxor %mm4,%mm4");
}
-
raid6_after_mmx(&sa
);
+
kernel_fpu_end(
);
}
const struct raid6_calls raid6_mmxx1 = {
}
const struct raid6_calls raid6_mmxx1 = {
@@
-96,13
+89,12
@@
static void raid6_mmx2_gen_syndrome(int disks, size_t bytes, void **ptrs)
u8 **dptr = (u8 **)ptrs;
u8 *p, *q;
int d, z, z0;
u8 **dptr = (u8 **)ptrs;
u8 *p, *q;
int d, z, z0;
- raid6_mmx_save_t sa;
z0 = disks - 3; /* Highest data disk */
p = dptr[z0+1]; /* XOR parity */
q = dptr[z0+2]; /* RS syndrome */
z0 = disks - 3; /* Highest data disk */
p = dptr[z0+1]; /* XOR parity */
q = dptr[z0+2]; /* RS syndrome */
-
raid6_before_mmx(&sa
);
+
kernel_fpu_begin(
);
asm volatile("movq %0,%%mm0" : : "m" (raid6_mmx_constants.x1d));
asm volatile("pxor %mm5,%mm5"); /* Zero temp */
asm volatile("movq %0,%%mm0" : : "m" (raid6_mmx_constants.x1d));
asm volatile("pxor %mm5,%mm5"); /* Zero temp */
@@
-137,7
+129,7
@@
static void raid6_mmx2_gen_syndrome(int disks, size_t bytes, void **ptrs)
asm volatile("movq %%mm6,%0" : "=m" (q[d+8]));
}
asm volatile("movq %%mm6,%0" : "=m" (q[d+8]));
}
-
raid6_after_mmx(&sa
);
+
kernel_fpu_end(
);
}
const struct raid6_calls raid6_mmxx2 = {
}
const struct raid6_calls raid6_mmxx2 = {