diff options
author | Jim Kukunas <james.t.kukunas@linux.intel.com> | 2012-05-21 23:54:18 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-05-21 23:54:18 -0400 |
commit | 048a8b8c89dc427dd7a58527c8923224b1e66d83 (patch) | |
tree | c8e09964537839f3848d0ad0e25ee40e873c3d09 /lib/raid6/recov.c | |
parent | f674ef7b43881b2ac11f98d6ba2dc5d9dd0dd118 (diff) |
lib/raid6: Add SSSE3 optimized recovery functions
Add SSSE3 optimized recovery functions, as well as a system
for selecting the most appropriate recovery functions to use.
Originally-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Jim Kukunas <james.t.kukunas@linux.intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'lib/raid6/recov.c')
-rw-r--r-- | lib/raid6/recov.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/raid6/recov.c b/lib/raid6/recov.c index fe275d7b6b36..1805a5cc5daa 100644 --- a/lib/raid6/recov.c +++ b/lib/raid6/recov.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/raid/pq.h> | 22 | #include <linux/raid/pq.h> |
23 | 23 | ||
24 | /* Recover two failed data blocks. */ | 24 | /* Recover two failed data blocks. */ |
25 | void raid6_2data_recov(int disks, size_t bytes, int faila, int failb, | 25 | void raid6_2data_recov_intx1(int disks, size_t bytes, int faila, int failb, |
26 | void **ptrs) | 26 | void **ptrs) |
27 | { | 27 | { |
28 | u8 *p, *q, *dp, *dq; | 28 | u8 *p, *q, *dp, *dq; |
@@ -64,10 +64,9 @@ void raid6_2data_recov(int disks, size_t bytes, int faila, int failb, | |||
64 | p++; q++; | 64 | p++; q++; |
65 | } | 65 | } |
66 | } | 66 | } |
67 | EXPORT_SYMBOL_GPL(raid6_2data_recov); | ||
68 | 67 | ||
69 | /* Recover failure of one data block plus the P block */ | 68 | /* Recover failure of one data block plus the P block */ |
70 | void raid6_datap_recov(int disks, size_t bytes, int faila, void **ptrs) | 69 | void raid6_datap_recov_intx1(int disks, size_t bytes, int faila, void **ptrs) |
71 | { | 70 | { |
72 | u8 *p, *q, *dq; | 71 | u8 *p, *q, *dq; |
73 | const u8 *qmul; /* Q multiplier table */ | 72 | const u8 *qmul; /* Q multiplier table */ |
@@ -96,7 +95,15 @@ void raid6_datap_recov(int disks, size_t bytes, int faila, void **ptrs) | |||
96 | q++; dq++; | 95 | q++; dq++; |
97 | } | 96 | } |
98 | } | 97 | } |
99 | EXPORT_SYMBOL_GPL(raid6_datap_recov); | 98 | |
99 | |||
100 | const struct raid6_recov_calls raid6_recov_intx1 = { | ||
101 | .data2 = raid6_2data_recov_intx1, | ||
102 | .datap = raid6_datap_recov_intx1, | ||
103 | .valid = NULL, | ||
104 | .name = "intx1", | ||
105 | .priority = 0, | ||
106 | }; | ||
100 | 107 | ||
101 | #ifndef __KERNEL__ | 108 | #ifndef __KERNEL__ |
102 | /* Testing only */ | 109 | /* Testing only */ |