Skip to contentSkip to conversation

raid6-hide-internals.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message May 29

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: raid6: hide internals
has been removed from the -mm tree. Its filename was
raid6-hide-internals.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Christoph Hellwig <[email protected]>
Subject: raid6: hide internals
Date: Mon, 18 May 2026 07:17:52 +0200

Split out two new headers from the public pq.h:

- lib/raid/raid6/algos.h contains the algorithm lists private to lib/raid/raid6
- include/linux/raid/pq_tables.h contains the tables also used by async_tx providers.

The public include/linux/pq.h is now limited to the public interface for the consumers of the RAID6 PQ API.

[[email protected]: remove duplicate ccflags-y line]
Cc Albert Ou <[email protected]>
Cc Alexander Gordeev <[email protected]>
Cc Alexandre Ghiti <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc "Borislav Petkov (AMD)" <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Chris Mason <[email protected]>
Cc Christian Borntraeger <[email protected]>
Cc Dan Williams <[email protected]>
Cc David Sterba <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Herbert Xu <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Huacai Chen <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Li Nan <[email protected]>
Cc Madhavan Srinivasan <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Palmer Dabbelt <[email protected]>
Cc Song Liu <[email protected]>
Cc Sven Schnelle <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc WANG Xuerui <[email protected]>
Cc Will Deacon <[email protected]>

---

 crypto/async_tx/async_pq.c                      |    1 
 crypto/async_tx/async_raid6_recov.c             |    1 
 drivers/dma/bcm-sba-raid.c                      |    1 
 include/linux/raid/pq.h                         |   96 +-------------
 include/linux/raid/pq_tables.h                  |   19 ++
 lib/raid/raid6/algos.c                          |    3 
 lib/raid/raid6/algos.h                          |   82 +++++++++++
 lib/raid/raid6/arm/neon.c                       |    2 
 lib/raid/raid6/arm/recov_neon.c                 |    2 
 lib/raid/raid6/int.uc                           |    2 
 lib/raid/raid6/loongarch/loongarch_simd.c       |    2 
 lib/raid/raid6/loongarch/recov_loongarch_simd.c |    2 
 lib/raid/raid6/mktables.c                       |    2 
 lib/raid/raid6/powerpc/altivec.uc               |    2 
 lib/raid/raid6/powerpc/vpermxor.uc              |    2 
 lib/raid/raid6/recov.c                          |    2 
 lib/raid/raid6/riscv/recov_rvv.c                |    2 
 lib/raid/raid6/riscv/rvv.h                      |    2 
 lib/raid/raid6/s390/recov_s390xc.c              |    2 
 lib/raid/raid6/s390/s390vx.uc                   |    2 
 lib/raid/raid6/tests/raid6_kunit.c              |    2 
 lib/raid/raid6/x86/avx2.c                       |    3 
 lib/raid/raid6/x86/avx512.c                     |    3 
 lib/raid/raid6/x86/mmx.c                        |    3 
 lib/raid/raid6/x86/recov_avx2.c                 |    2 
 lib/raid/raid6/x86/recov_avx512.c               |    2 
 lib/raid/raid6/x86/recov_ssse3.c                |    2 
 lib/raid/raid6/x86/sse1.c                       |    3 
 lib/raid/raid6/x86/sse2.c                       |    3 
 29 files changed, 149 insertions(+), 103 deletions(-)
crypto/async_tx/async_pq.c renamed from crypto/async_tx/async_pq.c~raid6-hide-internals +1 -0
@@ -8,6 +8,7 @@
 #include <linux/module.h>
 #include <linux/dma-mapping.h>
 #include <linux/raid/pq.h>
+#include <linux/raid/pq_tables.h>
 #include <linux/async_tx.h>
 #include <linux/gfp.h>
 
crypto/async_tx/async_raid6_recov.c renamed from crypto/async_tx/async_raid6_recov.c~raid6-hide-internals +1 -0
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/dma-mapping.h>
 #include <linux/raid/pq.h>
+#include <linux/raid/pq_tables.h>
 #include <linux/async_tx.h>
 #include <linux/dmaengine.h>
 
drivers/dma/bcm-sba-raid.c renamed from drivers/dma/bcm-sba-raid.c~raid6-hide-internals +1 -0
@@ -40,6 +40,7 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/raid/pq.h>
+#include <linux/raid/pq_tables.h>
 
 #include "dmaengine.h"
 
include/linux/raid/pq.h renamed from include/linux/raid/pq.h~raid6-hide-internals +8 -88

105 lines not on this page · raw message

include/linux/raid/pq_tables.h new file +19 -0
new file mode 100644
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright 2003 H. Peter Anvin - All Rights Reserved
+ *
+ * Galois field tables for the Linux RAID6 P/Q parity algorithm.
+ */
+#ifndef _LINUX_RAID_PQ_TABLES_H
+#define _LINUX_RAID_PQ_TABLES_H
+
+#include <linux/types.h>
+
+extern const u8 raid6_gfmul[256][256] __attribute__((aligned(256)));
+extern const u8 raid6_vgfmul[256][32] __attribute__((aligned(256)));
+extern const u8 raid6_gfexp[256]      __attribute__((aligned(256)));
+extern const u8 raid6_gflog[256]      __attribute__((aligned(256)));
+extern const u8 raid6_gfinv[256]      __attribute__((aligned(256)));
+extern const u8 raid6_gfexi[256]      __attribute__((aligned(256)));
+
+#endif /* _LINUX_RAID_PQ_TABLES_H */
lib/raid/raid6/algos.c renamed from lib/raid/raid6/algos.c~raid6-hide-internals +2 -1
@@ -11,10 +11,11 @@
  * Algorithm list and algorithm selection for RAID-6
  */
 
-#include <linux/raid/pq.h>
 #include <linux/module.h>
 #include <linux/gfp.h>
+#include <linux/raid/pq.h>
 #include <kunit/visibility.h>
+#include "algos.h"
 
 static const struct raid6_recov_calls *raid6_recov_algo;
 
lib/raid/raid6/algos.h new file +82 -0

82 lines not on this page · raw message

lib/raid/raid6/arm/neon.c renamed from lib/raid/raid6/arm/neon.c~raid6-hide-internals +1 -1
@@ -5,8 +5,8 @@
  * Copyright (C) 2013 Linaro Ltd <[email protected]>
  */
 
-#include <linux/raid/pq.h>
 #include <asm/simd.h>
+#include "algos.h"
 
 /*
  * There are 2 reasons these wrappers are kept in a separate compilation unit
lib/raid/raid6/arm/recov_neon.c renamed from lib/raid/raid6/arm/recov_neon.c~raid6-hide-internals +2 -0
@@ -4,8 +4,10 @@
  * Copyright (C) 2017 Linaro Ltd. <[email protected]>
  */
 
+#include <linux/mm.h>
 #include <linux/raid/pq.h>
 #include <asm/simd.h>
+#include "algos.h"
 #include "arm/neon.h"
 
 static int raid6_has_neon(void)
lib/raid/raid6/int.uc renamed from lib/raid/raid6/int.uc~raid6-hide-internals +1 -1
@@ -18,7 +18,7 @@
  * This file is postprocessed using unroll.awk
  */
 
-#include <linux/raid/pq.h>
+#include "algos.h"
 
 /*
  * This is the C data type to use
lib/raid/raid6/loongarch/loongarch_simd.c renamed from lib/raid/raid6/loongarch/loongarch_simd.c~raid6-hide-internals +1 -1
@@ -9,9 +9,9 @@
  * Copyright 2002-2004 H. Peter Anvin
  */
 
-#include <linux/raid/pq.h>
 #include <asm/cpu-features.h>
 #include <asm/fpu.h>
+#include "algos.h"
 
 /*
  * The vector algorithms are currently priority 0, which means the generic
lib/raid/raid6/loongarch/recov_loongarch_simd.c renamed from lib/raid/raid6/loongarch/recov_loongarch_simd.c~raid6-hide-internals +2 -0
@@ -10,9 +10,11 @@
  * Author: Jim Kukunas <[email protected]>
  */
 
+#include <linux/mm.h>
 #include <linux/raid/pq.h>
 #include <asm/cpu-features.h>
 #include <asm/fpu.h>
+#include "algos.h"
 
 /*
  * Unlike with the syndrome calculation algorithms, there's no boot-time
lib/raid/raid6/mktables.c renamed from lib/raid/raid6/mktables.c~raid6-hide-internals +1 -1
@@ -57,7 +57,7 @@ int main(int argc, char *argv[])
 	uint8_t exptbl[256], invtbl[256];
 
 	printf("#include <linux/export.h>\n");
-	printf("#include <linux/raid/pq.h>\n");
+	printf("#include \"algos.h\"\n");
 
 	/* Compute multiplication table */
 	printf("\nconst u8  __attribute__((aligned(256)))\n"
lib/raid/raid6/powerpc/altivec.uc renamed from lib/raid/raid6/powerpc/altivec.uc~raid6-hide-internals +1 -1
@@ -22,7 +22,7 @@
  * bracked this with preempt_disable/enable or in a lock)
  */
 
-#include <linux/raid/pq.h>
+#include "algos.h"
 
 #include <altivec.h>
 #include <asm/cputable.h>
lib/raid/raid6/powerpc/vpermxor.uc renamed from lib/raid/raid6/powerpc/vpermxor.uc~raid6-hide-internals +1 -1
@@ -20,11 +20,11 @@
  * This instruction was introduced in POWER8 - ISA v2.07.
  */
 
-#include <linux/raid/pq.h>
 #include <altivec.h>
 #include <asm/ppc-opcode.h>
 #include <asm/cputable.h>
 #include <asm/switch_to.h>
+#include "algos.h"
 
 typedef vector unsigned char unative_t;
 #define NSIZE sizeof(unative_t)
lib/raid/raid6/recov.c renamed from lib/raid/raid6/recov.c~raid6-hide-internals +2 -0
@@ -13,7 +13,9 @@
  * the syndrome.)
  */
 
+#include <linux/mm.h>
 #include <linux/raid/pq.h>
+#include "algos.h"
 
 /* Recover two failed data blocks. */
 static void raid6_2data_recov_intx1(int disks, size_t bytes, int faila,
lib/raid/raid6/riscv/recov_rvv.c renamed from lib/raid/raid6/riscv/recov_rvv.c~raid6-hide-internals +2 -0
@@ -4,7 +4,9 @@
  * Author: Chunyan Zhang <[email protected]>
  */
 
+#include <linux/mm.h>
 #include <linux/raid/pq.h>
+#include "algos.h"
 #include "rvv.h"
 
 static void __raid6_2data_recov_rvv(int bytes, u8 *p, u8 *q, u8 *dp,
lib/raid/raid6/riscv/rvv.h renamed from lib/raid/raid6/riscv/rvv.h~raid6-hide-internals +1 -1
@@ -7,8 +7,8 @@
  * Definitions for RISC-V RAID-6 code
  */
 
-#include <linux/raid/pq.h>
 #include <asm/vector.h>
+#include "algos.h"
 
 static int rvv_has_vector(void)
 {
lib/raid/raid6/s390/recov_s390xc.c renamed from lib/raid/raid6/s390/recov_s390xc.c~raid6-hide-internals +2 -0
@@ -6,7 +6,9 @@
  * Author(s): Martin Schwidefsky <[email protected]>
  */
 
+#include <linux/mm.h>
 #include <linux/raid/pq.h>
+#include "algos.h"
 
 static inline void xor_block(u8 *p1, u8 *p2)
 {
lib/raid/raid6/s390/s390vx.uc renamed from lib/raid/raid6/s390/s390vx.uc~raid6-hide-internals +1 -1
@@ -12,8 +12,8 @@
  */
 
 #include <linux/cpufeature.h>
-#include <linux/raid/pq.h>
 #include <asm/fpu.h>
+#include "algos.h"
 
 #define NSIZE 16
 
lib/raid/raid6/tests/raid6_kunit.c renamed from lib/raid/raid6/tests/raid6_kunit.c~raid6-hide-internals +1 -1
@@ -7,7 +7,7 @@
 
 #include <kunit/test.h>
 #include <linux/prandom.h>
-#include <linux/raid/pq.h>
+#include "../algos.h"
 
 MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING");
 
lib/raid/raid6/x86/avx2.c renamed from lib/raid/raid6/x86/avx2.c~raid6-hide-internals +2 -1
@@ -13,8 +13,9 @@
  *
  */
 
-#include <linux/raid/pq.h>
+#include <asm/cpufeature.h>
 #include <asm/fpu/api.h>
+#include "algos.h"
 
 static const struct raid6_avx2_constants {
 	u64 x1d[4];
lib/raid/raid6/x86/avx512.c renamed from lib/raid/raid6/x86/avx512.c~raid6-hide-internals +2 -1
@@ -17,8 +17,9 @@
  *
  */
 
-#include <linux/raid/pq.h>
+#include <asm/cpufeature.h>
 #include <asm/fpu/api.h>
+#include "algos.h"
 
 static const struct raid6_avx512_constants {
 	u64 x1d[8];
lib/raid/raid6/x86/mmx.c renamed from lib/raid/raid6/x86/mmx.c~raid6-hide-internals +2 -1
@@ -11,8 +11,9 @@
  * MMX implementation of RAID-6 syndrome functions
  */
 
-#include <linux/raid/pq.h>
+#include <asm/cpufeature.h>
 #include <asm/fpu/api.h>
+#include "algos.h"
 
 /* Shared with raid6/sse1.c */
 const struct raid6_mmx_constants {
lib/raid/raid6/x86/recov_avx2.c renamed from lib/raid/raid6/x86/recov_avx2.c~raid6-hide-internals +2 -0
@@ -4,8 +4,10 @@
  * Author: Jim Kukunas <[email protected]>
  */
 
+#include <linux/mm.h>
 #include <linux/raid/pq.h>
 #include <asm/fpu/api.h>
+#include "algos.h"
 
 static int raid6_has_avx2(void)
 {
lib/raid/raid6/x86/recov_avx512.c renamed from lib/raid/raid6/x86/recov_avx512.c~raid6-hide-internals +2 -0
@@ -6,8 +6,10 @@
  * Author: Megha Dey <[email protected]>
  */
 
+#include <linux/mm.h>
 #include <linux/raid/pq.h>
 #include <asm/fpu/api.h>
+#include "algos.h"
 
 static int raid6_has_avx512(void)
 {
lib/raid/raid6/x86/recov_ssse3.c renamed from lib/raid/raid6/x86/recov_ssse3.c~raid6-hide-internals +2 -0
@@ -3,8 +3,10 @@
  * Copyright (C) 2012 Intel Corporation
  */
 
+#include <linux/mm.h>
 #include <linux/raid/pq.h>
 #include <asm/fpu/api.h>
+#include "algos.h"
 
 static int raid6_has_ssse3(void)
 {
lib/raid/raid6/x86/sse1.c renamed from lib/raid/raid6/x86/sse1.c~raid6-hide-internals +2 -1
@@ -16,8 +16,9 @@
  * worthwhile as a separate implementation.
  */
 
-#include <linux/raid/pq.h>
+#include <asm/cpufeature.h>
 #include <asm/fpu/api.h>
+#include "algos.h"
 
 /* Defined in raid6/mmx.c */
 extern const struct raid6_mmx_constants {
lib/raid/raid6/x86/sse2.c renamed from lib/raid/raid6/x86/sse2.c~raid6-hide-internals +2 -1
@@ -12,8 +12,9 @@
  *
  */
 
-#include <linux/raid/pq.h>
+#include <asm/cpufeature.h>
 #include <asm/fpu/api.h>
+#include "algos.h"
 
 static const struct raid6_sse_constants {
 	u64 x1d[2];

_

Patches currently in -mm which might be from [email protected] are