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 /include/linux/raid | |
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 'include/linux/raid')
-rw-r--r-- | include/linux/raid/pq.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h index 53272e9860a7..640c69ceec96 100644 --- a/include/linux/raid/pq.h +++ b/include/linux/raid/pq.h | |||
@@ -99,8 +99,20 @@ extern const struct raid6_calls raid6_altivec2; | |||
99 | extern const struct raid6_calls raid6_altivec4; | 99 | extern const struct raid6_calls raid6_altivec4; |
100 | extern const struct raid6_calls raid6_altivec8; | 100 | extern const struct raid6_calls raid6_altivec8; |
101 | 101 | ||
102 | struct raid6_recov_calls { | ||
103 | void (*data2)(int, size_t, int, int, void **); | ||
104 | void (*datap)(int, size_t, int, void **); | ||
105 | int (*valid)(void); | ||
106 | const char *name; | ||
107 | int priority; | ||
108 | }; | ||
109 | |||
110 | extern const struct raid6_recov_calls raid6_recov_intx1; | ||
111 | extern const struct raid6_recov_calls raid6_recov_ssse3; | ||
112 | |||
102 | /* Algorithm list */ | 113 | /* Algorithm list */ |
103 | extern const struct raid6_calls * const raid6_algos[]; | 114 | extern const struct raid6_calls * const raid6_algos[]; |
115 | extern const struct raid6_recov_calls *const raid6_recov_algos[]; | ||
104 | int raid6_select_algo(void); | 116 | int raid6_select_algo(void); |
105 | 117 | ||
106 | /* Return values from chk_syndrome */ | 118 | /* Return values from chk_syndrome */ |
@@ -111,14 +123,16 @@ int raid6_select_algo(void); | |||
111 | 123 | ||
112 | /* Galois field tables */ | 124 | /* Galois field tables */ |
113 | extern const u8 raid6_gfmul[256][256] __attribute__((aligned(256))); | 125 | extern const u8 raid6_gfmul[256][256] __attribute__((aligned(256))); |
126 | extern const u8 raid6_vgfmul[256][32] __attribute__((aligned(256))); | ||
114 | extern const u8 raid6_gfexp[256] __attribute__((aligned(256))); | 127 | extern const u8 raid6_gfexp[256] __attribute__((aligned(256))); |
115 | extern const u8 raid6_gfinv[256] __attribute__((aligned(256))); | 128 | extern const u8 raid6_gfinv[256] __attribute__((aligned(256))); |
116 | extern const u8 raid6_gfexi[256] __attribute__((aligned(256))); | 129 | extern const u8 raid6_gfexi[256] __attribute__((aligned(256))); |
117 | 130 | ||
118 | /* Recovery routines */ | 131 | /* Recovery routines */ |
119 | void raid6_2data_recov(int disks, size_t bytes, int faila, int failb, | 132 | extern void (*raid6_2data_recov)(int disks, size_t bytes, int faila, int failb, |
120 | void **ptrs); | 133 | void **ptrs); |
121 | void raid6_datap_recov(int disks, size_t bytes, int faila, void **ptrs); | 134 | extern void (*raid6_datap_recov)(int disks, size_t bytes, int faila, |
135 | void **ptrs); | ||
122 | void raid6_dual_recov(int disks, size_t bytes, int faila, int failb, | 136 | void raid6_dual_recov(int disks, size_t bytes, int faila, int failb, |
123 | void **ptrs); | 137 | void **ptrs); |
124 | 138 | ||