|
| 1 | +From 6bec568bda887482bfc807d90031a67a83e031ea Mon Sep 17 00:00:00 2001 |
| 2 | +From: Tomas Glozar <tglozar@gmail.com> |
| 3 | +Date: Fri, 27 Oct 2023 13:11:38 +0200 |
| 4 | +Subject: [PATCH 002/126] Revert "lib/raid6: Drop IA64 support" |
| 5 | + |
| 6 | +This reverts commit b089ea3cc30de85ea7e20aa66500feb4082dfbf7. |
| 7 | +--- |
| 8 | + include/linux/raid/pq.h | 2 ++ |
| 9 | + lib/raid6/Makefile | 4 ++-- |
| 10 | + lib/raid6/algos.c | 4 ++++ |
| 11 | + lib/raid6/int.uc | 9 +++++++++ |
| 12 | + 4 files changed, 17 insertions(+), 2 deletions(-) |
| 13 | + |
| 14 | +diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h |
| 15 | +index 2467b3be15c9..1cd4345fd3cd 100644 |
| 16 | +--- a/include/linux/raid/pq.h |
| 17 | ++++ b/include/linux/raid/pq.h |
| 18 | +@@ -89,6 +89,8 @@ extern const struct raid6_calls raid6_intx1; |
| 19 | + extern const struct raid6_calls raid6_intx2; |
| 20 | + extern const struct raid6_calls raid6_intx4; |
| 21 | + extern const struct raid6_calls raid6_intx8; |
| 22 | ++extern const struct raid6_calls raid6_intx16; |
| 23 | ++extern const struct raid6_calls raid6_intx32; |
| 24 | + extern const struct raid6_calls raid6_mmxx1; |
| 25 | + extern const struct raid6_calls raid6_mmxx2; |
| 26 | + extern const struct raid6_calls raid6_sse1x1; |
| 27 | +diff --git a/lib/raid6/Makefile b/lib/raid6/Makefile |
| 28 | +index 5be0a4e60ab1..8c35ce37f7f2 100644 |
| 29 | +--- a/lib/raid6/Makefile |
| 30 | ++++ b/lib/raid6/Makefile |
| 31 | +@@ -2,7 +2,7 @@ |
| 32 | + obj-$(CONFIG_RAID6_PQ) += raid6_pq.o |
| 33 | + |
| 34 | + raid6_pq-y += algos.o recov.o tables.o int1.o int2.o int4.o \ |
| 35 | +- int8.o |
| 36 | ++ int8.o int16.o int32.o |
| 37 | + |
| 38 | + raid6_pq-$(CONFIG_X86) += recov_ssse3.o recov_avx2.o mmx.o sse1.o sse2.o avx2.o avx512.o recov_avx512.o |
| 39 | + raid6_pq-$(CONFIG_ALTIVEC) += altivec1.o altivec2.o altivec4.o altivec8.o \ |
| 40 | +@@ -37,7 +37,7 @@ endif |
| 41 | + quiet_cmd_unroll = UNROLL $@ |
| 42 | + cmd_unroll = $(AWK) -v N=$* -f $(src)/unroll.awk < $< > $@ |
| 43 | + |
| 44 | +-targets += int1.c int2.c int4.c int8.c |
| 45 | ++targets += int1.c int2.c int4.c int8.c int16.c int32.c |
| 46 | + $(obj)/int%.c: $(src)/int.uc $(src)/unroll.awk FORCE |
| 47 | + $(call if_changed,unroll) |
| 48 | + |
| 49 | +diff --git a/lib/raid6/algos.c b/lib/raid6/algos.c |
| 50 | +index 799e0e5eac26..8ed43b76f41b 100644 |
| 51 | +--- a/lib/raid6/algos.c |
| 52 | ++++ b/lib/raid6/algos.c |
| 53 | +@@ -79,6 +79,10 @@ const struct raid6_calls * const raid6_algos[] = { |
| 54 | + &raid6_rvvx2, |
| 55 | + &raid6_rvvx4, |
| 56 | + &raid6_rvvx8, |
| 57 | ++#endif |
| 58 | ++#if defined(__ia64__) |
| 59 | ++ &raid6_intx32, |
| 60 | ++ &raid6_intx16, |
| 61 | + #endif |
| 62 | + &raid6_intx8, |
| 63 | + &raid6_intx4, |
| 64 | +diff --git a/lib/raid6/int.uc b/lib/raid6/int.uc |
| 65 | +index 1ba56c3fa482..558aeac9342a 100644 |
| 66 | +--- a/lib/raid6/int.uc |
| 67 | ++++ b/lib/raid6/int.uc |
| 68 | +@@ -41,6 +41,13 @@ typedef u32 unative_t; |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | ++/* |
| 73 | ++ * IA-64 wants insane amounts of unrolling. On other architectures that |
| 74 | ++ * is just a waste of space. |
| 75 | ++ */ |
| 76 | ++#if ($# <= 8) || defined(__ia64__) |
| 77 | ++ |
| 78 | ++ |
| 79 | + /* |
| 80 | + * These sub-operations are separate inlines since they can sometimes be |
| 81 | + * specially optimized using architecture-specific hacks. |
| 82 | +@@ -145,3 +152,5 @@ const struct raid6_calls raid6_intx$# = { |
| 83 | + "int" NSTRING "x$#", |
| 84 | + 0 |
| 85 | + }; |
| 86 | ++ |
| 87 | ++#endif |
| 88 | +-- |
| 89 | +2.25.1 |
| 90 | + |
0 commit comments