diff options
author | Jan Beulich <JBeulich@suse.com> | 2015-01-23 03:29:50 -0500 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2015-02-03 16:35:51 -0500 |
commit | 75aaf4c3e6a4ed48207230cf133a02258ca5abd5 (patch) | |
tree | 4d4eba8a7ead427b30f41b0566838e8ff5b91688 /lib | |
parent | d95901433436aeb921eac58bfd8a2aa77f110384 (diff) |
x86/raid6: correctly check for assembler capabilities
Just like for AVX2 (which simply needs an #if -> #ifdef conversion),
SSSE3 assembler support should be checked for before using it.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Jim Kukunas <james.t.kukunas@linux.intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/raid6/algos.c | 2 | ||||
-rw-r--r-- | lib/raid6/recov_avx2.c | 2 | ||||
-rw-r--r-- | lib/raid6/recov_ssse3.c | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/lib/raid6/algos.c b/lib/raid6/algos.c index 7d0e5cd7b570..dbef2314901e 100644 --- a/lib/raid6/algos.c +++ b/lib/raid6/algos.c | |||
@@ -89,10 +89,10 @@ void (*raid6_datap_recov)(int, size_t, int, void **); | |||
89 | EXPORT_SYMBOL_GPL(raid6_datap_recov); | 89 | EXPORT_SYMBOL_GPL(raid6_datap_recov); |
90 | 90 | ||
91 | const struct raid6_recov_calls *const raid6_recov_algos[] = { | 91 | const struct raid6_recov_calls *const raid6_recov_algos[] = { |
92 | #if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__) | ||
93 | #ifdef CONFIG_AS_AVX2 | 92 | #ifdef CONFIG_AS_AVX2 |
94 | &raid6_recov_avx2, | 93 | &raid6_recov_avx2, |
95 | #endif | 94 | #endif |
95 | #ifdef CONFIG_AS_SSSE3 | ||
96 | &raid6_recov_ssse3, | 96 | &raid6_recov_ssse3, |
97 | #endif | 97 | #endif |
98 | &raid6_recov_intx1, | 98 | &raid6_recov_intx1, |
diff --git a/lib/raid6/recov_avx2.c b/lib/raid6/recov_avx2.c index e1eea433a493..53fe3d7bdfb3 100644 --- a/lib/raid6/recov_avx2.c +++ b/lib/raid6/recov_avx2.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * of the License. | 8 | * of the License. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #if CONFIG_AS_AVX2 | 11 | #ifdef CONFIG_AS_AVX2 |
12 | 12 | ||
13 | #include <linux/raid/pq.h> | 13 | #include <linux/raid/pq.h> |
14 | #include "x86.h" | 14 | #include "x86.h" |
diff --git a/lib/raid6/recov_ssse3.c b/lib/raid6/recov_ssse3.c index a9168328f03b..cda33e56a5e3 100644 --- a/lib/raid6/recov_ssse3.c +++ b/lib/raid6/recov_ssse3.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * of the License. | 7 | * of the License. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifdef CONFIG_AS_SSSE3 | ||
11 | |||
10 | #include <linux/raid/pq.h> | 12 | #include <linux/raid/pq.h> |
11 | #include "x86.h" | 13 | #include "x86.h" |
12 | 14 | ||
@@ -330,3 +332,7 @@ const struct raid6_recov_calls raid6_recov_ssse3 = { | |||
330 | #endif | 332 | #endif |
331 | .priority = 1, | 333 | .priority = 1, |
332 | }; | 334 | }; |
335 | |||
336 | #else | ||
337 | #warning "your version of binutils lacks SSSE3 support" | ||
338 | #endif | ||