From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 74D58F532D4 for ; Tue, 24 Mar 2026 06:24:15 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4fg0PB1Dtyz2yqs; Tue, 24 Mar 2026 17:24:14 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2607:7c80:54:3::133" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1774333454; cv=none; b=mEOucV5xDGYNMo5P0kDhLdBVsARTyku6mzj4yE0/cqeyfuW+t7s6e1B4wq87ad/ydUt+4hDu7bV31EIeg25sj7SGP8vbs4kXN4BjwWWN902KdgnPs02HZqAHEMi6P+fKycPuZxlYsvMt7NjCHNlhEeKMkKS7sAeoDRUE99JrkiVj9L1GDrsyElRiZBs1f4Nk4RXZmfLCI6HD3sRceITqg6oyYfsV9QWxkjcZivzJLCW5RfDQeFQmGrBLKiKKeNIwh81H5QybCauFt0WKI7QSvJryzZEYrgfZhVVQaEMyEy+ILUImUtafocLmrNntC4wAPZA29aU4ppRzTN5GyQKKXA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1774333454; c=relaxed/relaxed; bh=X4zeNPSksMx/cgAVpJRzn4lXyMObGN1ImU5c6xdQw8g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nfBxK+eGCe6j/Mk82BDo1JfSCn9Ooey+GFv4nbw0umbt4C2DCBpKqTSjpsxA0eUDMMUni6XzxR8nynaL/XctdLtTiFkWP5Z9EXEH9UA2BIPxXdf+uvKP4J3tP8EAeNMCrl/yWYiOkL2Lyi/nOwneWh527JeNo/zlvyB5NyWF4aLcB2veoA1nZeoyEa7QC1dMaxa4HkfaYuGrpwxAUuNfnK0WcMtQtCsMjxgp61xUfZMAGxKgoedcCo5EKk+INBKyZ8F2X9OnbpeAu5tWgdYQsCbJRH14lniOmZBD+wheTYceclbZtx6iFj5p+16urzWbcTjMb4tj2bJdGMiORqplbg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=lst.de; dkim=pass (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=udA1LfsS; dkim-atps=neutral; spf=none (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=batv+4a75e1166b7f241dd976+8248+infradead.org+hch@bombadil.srs.infradead.org; receiver=lists.ozlabs.org) smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=lst.de Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=udA1LfsS; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=bombadil.srs.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=batv+4a75e1166b7f241dd976+8248+infradead.org+hch@bombadil.srs.infradead.org; receiver=lists.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4fg0P94VdNz2yqq for ; Tue, 24 Mar 2026 17:24:13 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=X4zeNPSksMx/cgAVpJRzn4lXyMObGN1ImU5c6xdQw8g=; b=udA1LfsS5w4BeOV0sdMAr2BEgI rDOcwBcYiCqXD/PwGbsQgBGrF9meyIfPws7lcKF02qtWZUDtxEPBTPymLbuKqsaUcJJSVDlQkakth 6oyZFga9kQ/uFQbQbVbYsz6sOncrJad/+fxu+u/5jX83C9lKtmPh/vGi6P5UA+1BU9nLPmyoSDils RqPSRTny3TU/e62Z3oDJMyJEvxJLBaXLCIEpmNk62nWd5GpBGgnl5Fcr3e0QURogiy+QOM5p58PaO FViK5856szjDq5oDsIKAghIpUI4jmut1ukEF2mo7p5eotiqBD97KYwaWse7TqUh4rfmxhAKsAGnY+ Sti/YRdA==; Received: from 2a02-8389-2341-5b80-d601-7564-c2e0-491c.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:d601:7564:c2e0:491c] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1w4vBF-00000000hMc-2IsP; Tue, 24 Mar 2026 06:23:57 +0000 From: Christoph Hellwig To: Andrew Morton Cc: Richard Henderson , Matt Turner , Magnus Lindholm , Russell King , Catalin Marinas , Will Deacon , Ard Biesheuvel , Huacai Chen , WANG Xuerui , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , "David S. Miller" , Andreas Larsson , Richard Weinberger , Anton Ivanov , Johannes Berg , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Herbert Xu , Dan Williams , Chris Mason , David Sterba , Arnd Bergmann , Song Liu , Yu Kuai , Li Nan , "Theodore Ts'o" , "Jason A. Donenfeld" , linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, linux-crypto@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-arch@vger.kernel.org, linux-raid@vger.kernel.org Subject: [PATCH 07/26] xor: split xor.h Date: Tue, 24 Mar 2026 07:21:43 +0100 Message-ID: <20260324062211.3216301-8-hch@lst.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260324062211.3216301-1-hch@lst.de> References: <20260324062211.3216301-1-hch@lst.de> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Keep xor.h for the public API, and split the struct xor_block_template definition that is only needed by the xor.ko core and architecture-specific optimizations into a separate xor_impl.h header. Signed-off-by: Christoph Hellwig --- arch/arm/lib/xor-neon.c | 1 + arch/arm64/lib/xor-neon.c | 1 + arch/s390/lib/xor.c | 2 +- include/linux/raid/xor.h | 22 +--------------------- include/linux/raid/xor_impl.h | 25 +++++++++++++++++++++++++ lib/raid/xor/xor-core.c | 1 + 6 files changed, 30 insertions(+), 22 deletions(-) create mode 100644 include/linux/raid/xor_impl.h diff --git a/arch/arm/lib/xor-neon.c b/arch/arm/lib/xor-neon.c index cf57fca97908..282980b9bf2a 100644 --- a/arch/arm/lib/xor-neon.c +++ b/arch/arm/lib/xor-neon.c @@ -6,6 +6,7 @@ */ #include +#include #include MODULE_DESCRIPTION("NEON accelerated XOR implementation"); diff --git a/arch/arm64/lib/xor-neon.c b/arch/arm64/lib/xor-neon.c index 8fffebfa17b2..351aba92d932 100644 --- a/arch/arm64/lib/xor-neon.c +++ b/arch/arm64/lib/xor-neon.c @@ -7,6 +7,7 @@ */ #include +#include #include #include diff --git a/arch/s390/lib/xor.c b/arch/s390/lib/xor.c index 5363e4c2462d..3bbe21b40e66 100644 --- a/arch/s390/lib/xor.c +++ b/arch/s390/lib/xor.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include static void xor_xc_2(unsigned long bytes, unsigned long * __restrict p1, diff --git a/include/linux/raid/xor.h b/include/linux/raid/xor.h index 51b811b62322..02bda8d99534 100644 --- a/include/linux/raid/xor.h +++ b/include/linux/raid/xor.h @@ -7,24 +7,4 @@ extern void xor_blocks(unsigned int count, unsigned int bytes, void *dest, void **srcs); -struct xor_block_template { - struct xor_block_template *next; - const char *name; - int speed; - void (*do_2)(unsigned long, unsigned long * __restrict, - const unsigned long * __restrict); - void (*do_3)(unsigned long, unsigned long * __restrict, - const unsigned long * __restrict, - const unsigned long * __restrict); - void (*do_4)(unsigned long, unsigned long * __restrict, - const unsigned long * __restrict, - const unsigned long * __restrict, - const unsigned long * __restrict); - void (*do_5)(unsigned long, unsigned long * __restrict, - const unsigned long * __restrict, - const unsigned long * __restrict, - const unsigned long * __restrict, - const unsigned long * __restrict); -}; - -#endif +#endif /* _XOR_H */ diff --git a/include/linux/raid/xor_impl.h b/include/linux/raid/xor_impl.h new file mode 100644 index 000000000000..a1890cd66812 --- /dev/null +++ b/include/linux/raid/xor_impl.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _XOR_IMPL_H +#define _XOR_IMPL_H + +struct xor_block_template { + struct xor_block_template *next; + const char *name; + int speed; + void (*do_2)(unsigned long, unsigned long * __restrict, + const unsigned long * __restrict); + void (*do_3)(unsigned long, unsigned long * __restrict, + const unsigned long * __restrict, + const unsigned long * __restrict); + void (*do_4)(unsigned long, unsigned long * __restrict, + const unsigned long * __restrict, + const unsigned long * __restrict, + const unsigned long * __restrict); + void (*do_5)(unsigned long, unsigned long * __restrict, + const unsigned long * __restrict, + const unsigned long * __restrict, + const unsigned long * __restrict, + const unsigned long * __restrict); +}; + +#endif /* _XOR_IMPL_H */ diff --git a/lib/raid/xor/xor-core.c b/lib/raid/xor/xor-core.c index 88667a89b75b..58f2d0c16420 100644 --- a/lib/raid/xor/xor-core.c +++ b/lib/raid/xor/xor-core.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include -- 2.47.3