Skip to contentSkip to conversation

incremental fixes for "cleanup the RAID6 P/Q library v3"

PATCH New Christoph Hellwig 1 participant 3 messages May 27 MD RAID

lore
Share & tools
lore
#0 lore raw

Hi Andrew,

here are two incremental fixes for above series. They could be folded into "raid6: hide internals" and "raid6: rework registration of optimized algorithms" respectively if desired.

Diffstat:

 Makefile      |    2 --
 x86/pq_arch.h |    8 ++++----
 2 files changed, 4 insertions(+), 6 deletions(-)
#1 lore raw

PATCH 1/2 raid6: remove duplicate ccflags-y line

This was added by a mismerge when rebasing, remove it.

---
 lib/raid/raid6/Makefile | 2 --
 1 file changed, 2 deletions(-)
lib/raid/raid6/Makefile +0 -2
index 1d79b76b320e..038d6c74d1ba 100644
@@ -2,8 +2,6 @@
 
 ccflags-y			+= -I $(src)
 
-ccflags-y			+= -I $(src)
-
 ifeq ($(CONFIG_RAID6_PQ_ARCH),y)
 CFLAGS_algos.o			+= -I$(src)/$(SRCARCH)
 endif
Signature · 1 line
2.53.0
#2 lore raw

PATCH 2/2 raid6/x86: register avx512 after avx2

In reply to Christoph Hellwig

This way non-benchmarks configs still get avx512 if supported.

---
 lib/raid/raid6/x86/pq_arch.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
lib/raid/raid6/x86/pq_arch.h +4 -4
index 28e395eb04d1..02f8843b0537 100644
@@ -60,16 +60,16 @@ static inline bool raid6_has_sse1_or_mmxext(void)
 static __always_inline void __init arch_raid6_init(void)
 {
 	if (raid6_has_avx2()) {
+		raid6_algo_add(&raid6_avx2x1);
+		raid6_algo_add(&raid6_avx2x2);
+		if (IS_ENABLED(CONFIG_X86_64))
+			raid6_algo_add(&raid6_avx2x4);
 		if (raid6_has_avx512()) {
 			raid6_algo_add(&raid6_avx512x1);
 			raid6_algo_add(&raid6_avx512x2);
 			if (IS_ENABLED(CONFIG_X86_64))
 				raid6_algo_add(&raid6_avx512x4);
 		}
-		raid6_algo_add(&raid6_avx2x1);
-		raid6_algo_add(&raid6_avx2x2);
-		if (IS_ENABLED(CONFIG_X86_64))
-			raid6_algo_add(&raid6_avx2x4);
 	} else if (IS_ENABLED(CONFIG_X86_64) || raid6_has_sse2()) {
 		/* x86_64 can assume SSE2 as baseline */
 		raid6_algo_add(&raid6_sse2x1);
Signature · 1 line
2.53.0