get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2216718/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2216718,
    "url": "http://patchwork.ozlabs.org/api/patches/2216718/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260327061704.3707577-15-hch@lst.de/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20260327061704.3707577-15-hch@lst.de>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260327061704.3707577-15-hch@lst.de/",
    "date": "2026-03-27T06:16:46",
    "name": "[14/28] loongarch: move the XOR code to lib/raid/",
    "commit_ref": null,
    "pull_url": null,
    "state": "handled-elsewhere",
    "archived": false,
    "hash": "58d4b2f05a8623a2627cd58293ff5d387154acc0",
    "submitter": {
        "id": 82,
        "url": "http://patchwork.ozlabs.org/api/people/82/?format=api",
        "name": "Christoph Hellwig",
        "email": "hch@lst.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260327061704.3707577-15-hch@lst.de/mbox/",
    "series": [
        {
            "id": 497693,
            "url": "http://patchwork.ozlabs.org/api/series/497693/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=497693",
            "date": "2026-03-27T06:16:33",
            "name": "[01/28] xor: assert that xor_blocks is not call from interrupt context",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497693/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216718/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216718/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-18884-incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256\n header.s=bombadil.20210309 header.b=ZryakHte;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-18884-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "lists.ozlabs.org;\n arc=none smtp.remote-ip=\"2607:7c80:54:3::133\"",
            "lists.ozlabs.org;\n dmarc=fail (p=none dis=none) header.from=lst.de",
            "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256\n header.s=bombadil.20210309 header.b=ZryakHte;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=bombadil.srs.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=batv+7b1de7ca9b09bfe890a7+8251+infradead.org+hch@bombadil.srs.infradead.org;\n receiver=lists.ozlabs.org)"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org\n [IPv6:2404:9400:21b9:f100::1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fhrBB6fZTz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 17:21:06 +1100 (AEDT)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fhrBB5g88z3bZf;\n\tFri, 27 Mar 2026 17:21:06 +1100 (AEDT)",
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4fhrBB19QZz3bYx\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 27 Mar 2026 17:21:06 +1100 (AEDT)",
            "from\n 2a02-8389-2341-5b80-d601-7564-c2e0-491c.cable.dynamic.v6.surfer.at\n ([2a02:8389:2341:5b80:d601:7564:c2e0:491c] helo=localhost)\n\tby bombadil.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w60Yq-00000006mFy-0sTM;\n\tFri, 27 Mar 2026 06:20:48 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1774592466;\n\tcv=none;\n b=dT/CJTkjWhT16+UlCVGWj+qKpgyY+WCdQrmZsIaFjXH5dAuW20m/7g0B/SYZa1DmU8LGxL4ox/dseoN5ApofOilcxCJsNoGnd1qHIU6Wb5lwB16HKPTmMwTY7Mvo24V4MK1aPSGW1LYkSDTx0rY3aFvvOzmVdPwlbYoSLtY30+NMUOZnFAY/fz1Cr+B7pcfOu0tFUitf8ZU5Cn72XusH4DD/1crnYkuvhf0YP/uVtuBOTfmEKooAQMSTKxkhZ8tcJittQa0wTGxI3UMjCAKBQkjZ2jpqEE2biQb195gDbCOJjgmclnP2tx4+PZ1SSuyCDD8yeUbbOJQ2XByJdHzSxA==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1774592466; c=relaxed/relaxed;\n\tbh=gjX5FBygeWMjPukwqXaKShwz3C1U1AWYRymWZAxycrE=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=Vjdp+B+ib0TI1ehfGegyoS4vRhf0gM5FTGEKlMeoc2dKPmiLHtvGh2U6hA4AaGSLscH72i7dMUksatvWRlEnbD+uoecArsEB9q9Qlh9h/iMPXI4gz7DpyFyuOCc6LzHRH3VKQYodRAnH1cS5PuqIfHc3NQF9BNy/WRwasL/6kxagNu1oKO90x9LBygGiNcELh8SaTTeqMtSg8IC0T8xJ4tr4fKeWmhm03iPyTQJXnLYdRR5ayUSHEb1ic2zsx82P7ihaAC4xIbTL2JahwbiOJUQ8KQgp0lDekhL0oU4pFiNlq+3r/CeGubQse9/wfPA3nVD9f6gAvqzbc9hooru9rA==",
        "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=fail (p=none dis=none) header.from=lst.de; dkim=pass (2048-bit key;\n secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256\n header.s=bombadil.20210309 header.b=ZryakHte; dkim-atps=neutral;\n spf=none (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=batv+7b1de7ca9b09bfe890a7+8251+infradead.org+hch@bombadil.srs.infradead.org;\n receiver=lists.ozlabs.org) smtp.mailfrom=bombadil.srs.infradead.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding:\n\tMIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender\n\t:Reply-To:Content-Type:Content-ID:Content-Description;\n\tbh=gjX5FBygeWMjPukwqXaKShwz3C1U1AWYRymWZAxycrE=; b=ZryakHteolVYHIbgqFKuoZSnKN\n\tdqY8YDznoUWIGkdFeT8+TMxH/icimjtzA07ojd6hjl7Tq/w26pAr/yAKa7Asb3xYGmawl2/bPJh4Y\n\tpQZz1fu0WVQzqy6ZzAu02iqjhwJv0640X8ut7859jZEmFj2CXvetPNaylBAes6RFgIGDzNcoajz6Z\n\tgan9WMjg1w/tCBLpBWtUL5+JH49ykL+e4mayqFw+R/faeU1eDnnUiRl0f8c0GkCdGq/gokVtFqnqQ\n\t6l+c3ncMgd+Qkq1vO1a3GSSM4FfyAaOnnTJY6xvE8GVImGmjlTTpIBBeM3kl997VwyzpZHXlI11mk\n\t7NkvbZRA==;",
        "From": "Christoph Hellwig <hch@lst.de>",
        "To": "Andrew Morton <akpm@linux-foundation.org>",
        "Cc": "Richard Henderson <richard.henderson@linaro.org>,\n\tMatt Turner <mattst88@gmail.com>,\n\tMagnus Lindholm <linmag7@gmail.com>,\n\tRussell King <linux@armlinux.org.uk>,\n\tCatalin Marinas <catalin.marinas@arm.com>,\n\tWill Deacon <will@kernel.org>,\n\tArd Biesheuvel <ardb@kernel.org>,\n\tHuacai Chen <chenhuacai@kernel.org>,\n\tWANG Xuerui <kernel@xen0n.name>,\n\tMadhavan Srinivasan <maddy@linux.ibm.com>,\n\tMichael Ellerman <mpe@ellerman.id.au>,\n\tNicholas Piggin <npiggin@gmail.com>,\n\t\"Christophe Leroy (CS GROUP)\" <chleroy@kernel.org>,\n\tPaul Walmsley <pjw@kernel.org>,\n\tPalmer Dabbelt <palmer@dabbelt.com>,\n\tAlbert Ou <aou@eecs.berkeley.edu>,\n\tAlexandre Ghiti <alex@ghiti.fr>,\n\tHeiko Carstens <hca@linux.ibm.com>,\n\tVasily Gorbik <gor@linux.ibm.com>,\n\tAlexander Gordeev <agordeev@linux.ibm.com>,\n\tChristian Borntraeger <borntraeger@linux.ibm.com>,\n\tSven Schnelle <svens@linux.ibm.com>,\n\t\"David S. Miller\" <davem@davemloft.net>,\n\tAndreas Larsson <andreas@gaisler.com>,\n\tRichard Weinberger <richard@nod.at>,\n\tAnton Ivanov <anton.ivanov@cambridgegreys.com>,\n\tJohannes Berg <johannes@sipsolutions.net>,\n\tThomas Gleixner <tglx@kernel.org>,\n\tIngo Molnar <mingo@redhat.com>,\n\tBorislav Petkov <bp@alien8.de>,\n\tDave Hansen <dave.hansen@linux.intel.com>,\n\tx86@kernel.org,\n\t\"H. Peter Anvin\" <hpa@zytor.com>,\n\tHerbert Xu <herbert@gondor.apana.org.au>,\n\tDan Williams <dan.j.williams@intel.com>,\n\tChris Mason <clm@fb.com>,\n\tDavid Sterba <dsterba@suse.com>,\n\tArnd Bergmann <arnd@arndb.de>,\n\tSong Liu <song@kernel.org>,\n\tYu Kuai <yukuai@fnnas.com>,\n\tLi Nan <linan122@huawei.com>,\n\t\"Theodore Ts'o\" <tytso@mit.edu>,\n\t\"Jason A. Donenfeld\" <Jason@zx2c4.com>,\n\tlinux-alpha@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org,\n\tloongarch@lists.linux.dev,\n\tlinuxppc-dev@lists.ozlabs.org,\n\tlinux-riscv@lists.infradead.org,\n\tlinux-s390@vger.kernel.org,\n\tsparclinux@vger.kernel.org,\n\tlinux-um@lists.infradead.org,\n\tlinux-crypto@vger.kernel.org,\n\tlinux-btrfs@vger.kernel.org,\n\tlinux-arch@vger.kernel.org,\n\tlinux-raid@vger.kernel.org",
        "Subject": "[PATCH 14/28] loongarch: move the XOR code to lib/raid/",
        "Date": "Fri, 27 Mar 2026 07:16:46 +0100",
        "Message-ID": "<20260327061704.3707577-15-hch@lst.de>",
        "X-Mailer": "git-send-email 2.47.3",
        "In-Reply-To": "<20260327061704.3707577-1-hch@lst.de>",
        "References": "<20260327061704.3707577-1-hch@lst.de>",
        "X-Mailing-List": "linuxppc-dev@lists.ozlabs.org",
        "List-Id": "<linuxppc-dev.lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev+help@lists.ozlabs.org>",
        "List-Owner": "<mailto:linuxppc-dev+owner@lists.ozlabs.org>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Archive": "<https://lore.kernel.org/linuxppc-dev/>,\n  <https://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Subscribe": "<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>",
        "List-Unsubscribe": "<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>",
        "Precedence": "list",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-SRS-Rewrite": "SMTP reverse-path rewritten from <hch@infradead.org> by\n bombadil.infradead.org. See http://www.infradead.org/rpr.html",
        "X-Spam-Status": "No, score=0.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tHEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE\n\tautolearn=disabled version=4.0.1 OzLabs 8",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"
    },
    "content": "Move the optimized XOR into lib/raid and include it it in xor.ko\ninstead of always building it into the main kernel image.\n\nSigned-off-by: Christoph Hellwig <hch@lst.de>\n---\n arch/loongarch/include/asm/xor.h              | 24 ++----------\n arch/loongarch/include/asm/xor_simd.h         | 34 ----------------\n arch/loongarch/lib/Makefile                   |  2 -\n lib/raid/xor/Makefile                         |  2 +\n .../lib => lib/raid/xor/loongarch}/xor_simd.c |  0\n .../lib => lib/raid/xor/loongarch}/xor_simd.h |  0\n .../raid/xor/loongarch}/xor_simd_glue.c       | 39 +++++++++++--------\n .../raid/xor/loongarch}/xor_template.c        |  0\n 8 files changed, 27 insertions(+), 74 deletions(-)\n delete mode 100644 arch/loongarch/include/asm/xor_simd.h\n rename {arch/loongarch/lib => lib/raid/xor/loongarch}/xor_simd.c (100%)\n rename {arch/loongarch/lib => lib/raid/xor/loongarch}/xor_simd.h (100%)\n rename {arch/loongarch/lib => lib/raid/xor/loongarch}/xor_simd_glue.c (64%)\n rename {arch/loongarch/lib => lib/raid/xor/loongarch}/xor_template.c (100%)",
    "diff": "diff --git a/arch/loongarch/include/asm/xor.h b/arch/loongarch/include/asm/xor.h\nindex d17c0e3b047f..7e32f72f8b03 100644\n--- a/arch/loongarch/include/asm/xor.h\n+++ b/arch/loongarch/include/asm/xor.h\n@@ -6,27 +6,6 @@\n #define _ASM_LOONGARCH_XOR_H\n \n #include <asm/cpu-features.h>\n-#include <asm/xor_simd.h>\n-\n-#ifdef CONFIG_CPU_HAS_LSX\n-static struct xor_block_template xor_block_lsx = {\n-\t.name = \"lsx\",\n-\t.do_2 = xor_lsx_2,\n-\t.do_3 = xor_lsx_3,\n-\t.do_4 = xor_lsx_4,\n-\t.do_5 = xor_lsx_5,\n-};\n-#endif /* CONFIG_CPU_HAS_LSX */\n-\n-#ifdef CONFIG_CPU_HAS_LASX\n-static struct xor_block_template xor_block_lasx = {\n-\t.name = \"lasx\",\n-\t.do_2 = xor_lasx_2,\n-\t.do_3 = xor_lasx_3,\n-\t.do_4 = xor_lasx_4,\n-\t.do_5 = xor_lasx_5,\n-};\n-#endif /* CONFIG_CPU_HAS_LASX */\n \n /*\n  * For grins, also test the generic routines.\n@@ -38,6 +17,9 @@ static struct xor_block_template xor_block_lasx = {\n  */\n #include <asm-generic/xor.h>\n \n+extern struct xor_block_template xor_block_lsx;\n+extern struct xor_block_template xor_block_lasx;\n+\n #define arch_xor_init arch_xor_init\n static __always_inline void __init arch_xor_init(void)\n {\ndiff --git a/arch/loongarch/include/asm/xor_simd.h b/arch/loongarch/include/asm/xor_simd.h\ndeleted file mode 100644\nindex 471b96332f38..000000000000\n--- a/arch/loongarch/include/asm/xor_simd.h\n+++ /dev/null\n@@ -1,34 +0,0 @@\n-/* SPDX-License-Identifier: GPL-2.0-or-later */\n-/*\n- * Copyright (C) 2023 WANG Xuerui <git@xen0n.name>\n- */\n-#ifndef _ASM_LOONGARCH_XOR_SIMD_H\n-#define _ASM_LOONGARCH_XOR_SIMD_H\n-\n-#ifdef CONFIG_CPU_HAS_LSX\n-void xor_lsx_2(unsigned long bytes, unsigned long * __restrict p1,\n-\t       const unsigned long * __restrict p2);\n-void xor_lsx_3(unsigned long bytes, unsigned long * __restrict p1,\n-\t       const unsigned long * __restrict p2, const unsigned long * __restrict p3);\n-void xor_lsx_4(unsigned long bytes, unsigned long * __restrict p1,\n-\t       const unsigned long * __restrict p2, const unsigned long * __restrict p3,\n-\t       const unsigned long * __restrict p4);\n-void xor_lsx_5(unsigned long bytes, unsigned long * __restrict p1,\n-\t       const unsigned long * __restrict p2, const unsigned long * __restrict p3,\n-\t       const unsigned long * __restrict p4, const unsigned long * __restrict p5);\n-#endif /* CONFIG_CPU_HAS_LSX */\n-\n-#ifdef CONFIG_CPU_HAS_LASX\n-void xor_lasx_2(unsigned long bytes, unsigned long * __restrict p1,\n-\t        const unsigned long * __restrict p2);\n-void xor_lasx_3(unsigned long bytes, unsigned long * __restrict p1,\n-\t        const unsigned long * __restrict p2, const unsigned long * __restrict p3);\n-void xor_lasx_4(unsigned long bytes, unsigned long * __restrict p1,\n-\t        const unsigned long * __restrict p2, const unsigned long * __restrict p3,\n-\t        const unsigned long * __restrict p4);\n-void xor_lasx_5(unsigned long bytes, unsigned long * __restrict p1,\n-\t        const unsigned long * __restrict p2, const unsigned long * __restrict p3,\n-\t        const unsigned long * __restrict p4, const unsigned long * __restrict p5);\n-#endif /* CONFIG_CPU_HAS_LASX */\n-\n-#endif /* _ASM_LOONGARCH_XOR_SIMD_H */\ndiff --git a/arch/loongarch/lib/Makefile b/arch/loongarch/lib/Makefile\nindex ccea3bbd4353..827a88529a42 100644\n--- a/arch/loongarch/lib/Makefile\n+++ b/arch/loongarch/lib/Makefile\n@@ -8,6 +8,4 @@ lib-y\t+= delay.o memset.o memcpy.o memmove.o \\\n \n obj-$(CONFIG_ARCH_SUPPORTS_INT128) += tishift.o\n \n-obj-$(CONFIG_CPU_HAS_LSX) += xor_simd.o xor_simd_glue.o\n-\n obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o\ndiff --git a/lib/raid/xor/Makefile b/lib/raid/xor/Makefile\nindex 4ab0e7411ff7..e8868f5fc396 100644\n--- a/lib/raid/xor/Makefile\n+++ b/lib/raid/xor/Makefile\n@@ -14,6 +14,8 @@ ifeq ($(CONFIG_ARM),y)\n xor-$(CONFIG_KERNEL_MODE_NEON)\t+= arm/xor-neon.o arm/xor-neon-glue.o\n endif\n xor-$(CONFIG_ARM64)\t\t+= arm64/xor-neon.o arm64/xor-neon-glue.o\n+xor-$(CONFIG_CPU_HAS_LSX)\t+= loongarch/xor_simd.o\n+xor-$(CONFIG_CPU_HAS_LSX)\t+= loongarch/xor_simd_glue.o\n \n \n CFLAGS_arm/xor-neon.o\t\t+= $(CC_FLAGS_FPU)\ndiff --git a/arch/loongarch/lib/xor_simd.c b/lib/raid/xor/loongarch/xor_simd.c\nsimilarity index 100%\nrename from arch/loongarch/lib/xor_simd.c\nrename to lib/raid/xor/loongarch/xor_simd.c\ndiff --git a/arch/loongarch/lib/xor_simd.h b/lib/raid/xor/loongarch/xor_simd.h\nsimilarity index 100%\nrename from arch/loongarch/lib/xor_simd.h\nrename to lib/raid/xor/loongarch/xor_simd.h\ndiff --git a/arch/loongarch/lib/xor_simd_glue.c b/lib/raid/xor/loongarch/xor_simd_glue.c\nsimilarity index 64%\nrename from arch/loongarch/lib/xor_simd_glue.c\nrename to lib/raid/xor/loongarch/xor_simd_glue.c\nindex 393f689dbcf6..11fa3b47ba83 100644\n--- a/arch/loongarch/lib/xor_simd_glue.c\n+++ b/lib/raid/xor/loongarch/xor_simd_glue.c\n@@ -5,24 +5,23 @@\n  * Copyright (C) 2023 WANG Xuerui <git@xen0n.name>\n  */\n \n-#include <linux/export.h>\n #include <linux/sched.h>\n+#include <linux/raid/xor_impl.h>\n #include <asm/fpu.h>\n-#include <asm/xor_simd.h>\n+#include <asm/xor.h>\n #include \"xor_simd.h\"\n \n #define MAKE_XOR_GLUE_2(flavor)\t\t\t\t\t\t\t\\\n-void xor_##flavor##_2(unsigned long bytes, unsigned long * __restrict p1,\t\\\n+static void xor_##flavor##_2(unsigned long bytes, unsigned long * __restrict p1,\\\n \t\t      const unsigned long * __restrict p2)\t\t\t\\\n {\t\t\t\t\t\t\t\t\t\t\\\n \tkernel_fpu_begin();\t\t\t\t\t\t\t\\\n \t__xor_##flavor##_2(bytes, p1, p2);\t\t\t\t\t\\\n \tkernel_fpu_end();\t\t\t\t\t\t\t\\\n }\t\t\t\t\t\t\t\t\t\t\\\n-EXPORT_SYMBOL_GPL(xor_##flavor##_2)\n \n #define MAKE_XOR_GLUE_3(flavor)\t\t\t\t\t\t\t\\\n-void xor_##flavor##_3(unsigned long bytes, unsigned long * __restrict p1,\t\\\n+static void xor_##flavor##_3(unsigned long bytes, unsigned long * __restrict p1,\\\n \t\t      const unsigned long * __restrict p2,\t\t\t\\\n \t\t      const unsigned long * __restrict p3)\t\t\t\\\n {\t\t\t\t\t\t\t\t\t\t\\\n@@ -30,10 +29,9 @@ void xor_##flavor##_3(unsigned long bytes, unsigned long * __restrict p1,\t\\\n \t__xor_##flavor##_3(bytes, p1, p2, p3);\t\t\t\t\t\\\n \tkernel_fpu_end();\t\t\t\t\t\t\t\\\n }\t\t\t\t\t\t\t\t\t\t\\\n-EXPORT_SYMBOL_GPL(xor_##flavor##_3)\n \n #define MAKE_XOR_GLUE_4(flavor)\t\t\t\t\t\t\t\\\n-void xor_##flavor##_4(unsigned long bytes, unsigned long * __restrict p1,\t\\\n+static void xor_##flavor##_4(unsigned long bytes, unsigned long * __restrict p1,\\\n \t\t      const unsigned long * __restrict p2,\t\t\t\\\n \t\t      const unsigned long * __restrict p3,\t\t\t\\\n \t\t      const unsigned long * __restrict p4)\t\t\t\\\n@@ -42,10 +40,9 @@ void xor_##flavor##_4(unsigned long bytes, unsigned long * __restrict p1,\t\\\n \t__xor_##flavor##_4(bytes, p1, p2, p3, p4);\t\t\t\t\\\n \tkernel_fpu_end();\t\t\t\t\t\t\t\\\n }\t\t\t\t\t\t\t\t\t\t\\\n-EXPORT_SYMBOL_GPL(xor_##flavor##_4)\n \n #define MAKE_XOR_GLUE_5(flavor)\t\t\t\t\t\t\t\\\n-void xor_##flavor##_5(unsigned long bytes, unsigned long * __restrict p1,\t\\\n+static void xor_##flavor##_5(unsigned long bytes, unsigned long * __restrict p1,\\\n \t\t      const unsigned long * __restrict p2,\t\t\t\\\n \t\t      const unsigned long * __restrict p3,\t\t\t\\\n \t\t      const unsigned long * __restrict p4,\t\t\t\\\n@@ -55,18 +52,26 @@ void xor_##flavor##_5(unsigned long bytes, unsigned long * __restrict p1,\t\\\n \t__xor_##flavor##_5(bytes, p1, p2, p3, p4, p5);\t\t\t\t\\\n \tkernel_fpu_end();\t\t\t\t\t\t\t\\\n }\t\t\t\t\t\t\t\t\t\t\\\n-EXPORT_SYMBOL_GPL(xor_##flavor##_5)\n \n-#define MAKE_XOR_GLUES(flavor)\t\t\\\n-\tMAKE_XOR_GLUE_2(flavor);\t\\\n-\tMAKE_XOR_GLUE_3(flavor);\t\\\n-\tMAKE_XOR_GLUE_4(flavor);\t\\\n-\tMAKE_XOR_GLUE_5(flavor)\n+#define MAKE_XOR_GLUES(flavor)\t\t\t\t\\\n+\tMAKE_XOR_GLUE_2(flavor);\t\t\t\\\n+\tMAKE_XOR_GLUE_3(flavor);\t\t\t\\\n+\tMAKE_XOR_GLUE_4(flavor);\t\t\t\\\n+\tMAKE_XOR_GLUE_5(flavor);\t\t\t\\\n+\t\t\t\t\t\t\t\\\n+struct xor_block_template xor_block_##flavor = {\t\\\n+\t.name = __stringify(flavor),\t\t\t\\\n+\t.do_2 = xor_##flavor##_2,\t\t\t\\\n+\t.do_3 = xor_##flavor##_3,\t\t\t\\\n+\t.do_4 = xor_##flavor##_4,\t\t\t\\\n+\t.do_5 = xor_##flavor##_5,\t\t\t\\\n+}\n+\n \n #ifdef CONFIG_CPU_HAS_LSX\n MAKE_XOR_GLUES(lsx);\n-#endif\n+#endif /* CONFIG_CPU_HAS_LSX */\n \n #ifdef CONFIG_CPU_HAS_LASX\n MAKE_XOR_GLUES(lasx);\n-#endif\n+#endif /* CONFIG_CPU_HAS_LASX */\ndiff --git a/arch/loongarch/lib/xor_template.c b/lib/raid/xor/loongarch/xor_template.c\nsimilarity index 100%\nrename from arch/loongarch/lib/xor_template.c\nrename to lib/raid/xor/loongarch/xor_template.c\n",
    "prefixes": [
        "14/28"
    ]
}