get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216713,
    "url": "http://patchwork.ozlabs.org/api/patches/2216713/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-um/patch/20260327061704.3707577-14-hch@lst.de/",
    "project": {
        "id": 60,
        "url": "http://patchwork.ozlabs.org/api/projects/60/?format=api",
        "name": "User-mode Linux Development",
        "link_name": "linux-um",
        "list_id": "linux-um.lists.infradead.org",
        "list_email": "linux-um@lists.infradead.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260327061704.3707577-14-hch@lst.de>",
    "list_archive_url": null,
    "date": "2026-03-27T06:16:45",
    "name": "[13/28] arm64: move the XOR code to lib/raid/",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "44683d3c646c3cf1a4f82c40a7a1a1424d570a52",
    "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/linux-um/patch/20260327061704.3707577-14-hch@lst.de/mbox/",
    "series": [
        {
            "id": 497692,
            "url": "http://patchwork.ozlabs.org/api/series/497692/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-um/list/?series=497692",
            "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/497692/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216713/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216713/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=yGJcPDta;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "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 ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fhr9h6mlqz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 17:20:40 +1100 (AEDT)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w60Yh-00000006mI4-1j23;\n\tFri, 27 Mar 2026 06:20:39 +0000",
            "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 1w60Yd-00000006m6c-3Aho;\n\tFri, 27 Mar 2026 06:20:36 +0000"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help\n\t:List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding:\n\tMIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:\n\tReply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=CrgtsIjCgOYZRjpB0BxXF0Zbp16LigMmBpu6yhVaQNw=; b=yGJcPDtadkillkMPtg6aV9CtlI\n\t60U5IIosyjG55tnK9mS/LJWtTTvyXzgF5BQhrQ5PTNGGuIt+q8ZoFmESg+P1M77FEr250X1FhEMTI\n\twtbMdkUB95rCxYF41Q+5O+8hU0opoZtfXOtff/BVU131k7BrC5gaANT1tb4+L7VdrLfr/EdAQS9AM\n\tp7D9ClnLl3R3f00/syPgPLMSsqVXKEYx45mi5QvCrCAJyLm/1QisxAqEOb4Hu7M2nUYo9jLzWAwH8\n\tBoD7opmqSbtgH6HJUKkwT+EY6F4t09KlT929Fh4/KA9gcn0aL4HLPSrsfuxW1Vj5I9g+ckkVS0zxt\n\tJt9BXmXg==;",
        "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 13/28] arm64: move the XOR code to lib/raid/",
        "Date": "Fri, 27 Mar 2026 07:16:45 +0100",
        "Message-ID": "<20260327061704.3707577-14-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>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "linux-um@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "<linux-um.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-um>,\n <mailto:linux-um-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/linux-um/>",
        "List-Post": "<mailto:linux-um@lists.infradead.org>",
        "List-Help": "<mailto:linux-um-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-um>,\n <mailto:linux-um-request@lists.infradead.org?subject=subscribe>",
        "Sender": "\"linux-um\" <linux-um-bounces@lists.infradead.org>",
        "Errors-To": "linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "Move the optimized XOR into lib/raid and include it it in the main\nxor.ko instead of building a separate module for it.\n\nNote that this drops the CONFIG_KERNEL_MODE_NEON dependency, as that is\nalways set for arm64.\n\nSigned-off-by: Christoph Hellwig <hch@lst.de>\n---\n arch/arm64/include/asm/xor.h                  | 58 +------------------\n arch/arm64/lib/Makefile                       |  6 --\n lib/raid/xor/Makefile                         |  4 ++\n lib/raid/xor/arm64/xor-neon-glue.c            | 57 ++++++++++++++++++\n .../lib => lib/raid/xor/arm64}/xor-neon.c     | 20 +------\n 5 files changed, 67 insertions(+), 78 deletions(-)\n create mode 100644 lib/raid/xor/arm64/xor-neon-glue.c\n rename {arch/arm64/lib => lib/raid/xor/arm64}/xor-neon.c (95%)",
    "diff": "diff --git a/arch/arm64/include/asm/xor.h b/arch/arm64/include/asm/xor.h\nindex 3cee1eb86371..81718f010761 100644\n--- a/arch/arm64/include/asm/xor.h\n+++ b/arch/arm64/include/asm/xor.h\n@@ -1,73 +1,21 @@\n /* SPDX-License-Identifier: GPL-2.0-only */\n /*\n- * arch/arm64/include/asm/xor.h\n- *\n  * Authors: Jackie Liu <liuyun01@kylinos.cn>\n  * Copyright (C) 2018,Tianjin KYLIN Information Technology Co., Ltd.\n  */\n \n-#include <linux/hardirq.h>\n #include <asm-generic/xor.h>\n-#include <asm/hwcap.h>\n #include <asm/simd.h>\n \n-#ifdef CONFIG_KERNEL_MODE_NEON\n-\n-extern struct xor_block_template xor_block_inner_neon __ro_after_init;\n-\n-static void\n-xor_neon_2(unsigned long bytes, unsigned long * __restrict p1,\n-\t   const unsigned long * __restrict p2)\n-{\n-\tscoped_ksimd()\n-\t\txor_block_inner_neon.do_2(bytes, p1, p2);\n-}\n-\n-static void\n-xor_neon_3(unsigned long bytes, unsigned long * __restrict p1,\n-\t   const unsigned long * __restrict p2,\n-\t   const unsigned long * __restrict p3)\n-{\n-\tscoped_ksimd()\n-\t\txor_block_inner_neon.do_3(bytes, p1, p2, p3);\n-}\n-\n-static void\n-xor_neon_4(unsigned long bytes, unsigned long * __restrict p1,\n-\t   const unsigned long * __restrict p2,\n-\t   const unsigned long * __restrict p3,\n-\t   const unsigned long * __restrict p4)\n-{\n-\tscoped_ksimd()\n-\t\txor_block_inner_neon.do_4(bytes, p1, p2, p3, p4);\n-}\n-\n-static void\n-xor_neon_5(unsigned long bytes, unsigned long * __restrict p1,\n-\t   const unsigned long * __restrict p2,\n-\t   const unsigned long * __restrict p3,\n-\t   const unsigned long * __restrict p4,\n-\t   const unsigned long * __restrict p5)\n-{\n-\tscoped_ksimd()\n-\t\txor_block_inner_neon.do_5(bytes, p1, p2, p3, p4, p5);\n-}\n-\n-static struct xor_block_template xor_block_arm64 = {\n-\t.name   = \"arm64_neon\",\n-\t.do_2   = xor_neon_2,\n-\t.do_3   = xor_neon_3,\n-\t.do_4   = xor_neon_4,\n-\t.do_5\t= xor_neon_5\n-};\n+extern struct xor_block_template xor_block_arm64;\n+void __init xor_neon_init(void);\n \n #define arch_xor_init arch_xor_init\n static __always_inline void __init arch_xor_init(void)\n {\n+\txor_neon_init();\n \txor_register(&xor_block_8regs);\n \txor_register(&xor_block_32regs);\n \tif (cpu_has_neon())\n \t\txor_register(&xor_block_arm64);\n }\n-\n-#endif /* ! CONFIG_KERNEL_MODE_NEON */\ndiff --git a/arch/arm64/lib/Makefile b/arch/arm64/lib/Makefile\nindex 633e5223d944..448c917494f3 100644\n--- a/arch/arm64/lib/Makefile\n+++ b/arch/arm64/lib/Makefile\n@@ -5,12 +5,6 @@ lib-y\t\t:= clear_user.o delay.o copy_from_user.o\t\t\\\n \t\t   memset.o memcmp.o strcmp.o strncmp.o strlen.o\t\\\n \t\t   strnlen.o strchr.o strrchr.o tishift.o\n \n-ifeq ($(CONFIG_KERNEL_MODE_NEON), y)\n-obj-$(CONFIG_XOR_BLOCKS)\t+= xor-neon.o\n-CFLAGS_xor-neon.o\t\t+= $(CC_FLAGS_FPU)\n-CFLAGS_REMOVE_xor-neon.o\t+= $(CC_FLAGS_NO_FPU)\n-endif\n-\n lib-$(CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE) += uaccess_flushcache.o\n \n obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o\ndiff --git a/lib/raid/xor/Makefile b/lib/raid/xor/Makefile\nindex fb760edae54b..4ab0e7411ff7 100644\n--- a/lib/raid/xor/Makefile\n+++ b/lib/raid/xor/Makefile\n@@ -13,7 +13,11 @@ xor-$(CONFIG_ARM)\t\t+= arm/xor.o\n 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 \n \n CFLAGS_arm/xor-neon.o\t\t+= $(CC_FLAGS_FPU)\n CFLAGS_REMOVE_arm/xor-neon.o\t+= $(CC_FLAGS_NO_FPU)\n+\n+CFLAGS_arm64/xor-neon.o\t\t+= $(CC_FLAGS_FPU)\n+CFLAGS_REMOVE_arm64/xor-neon.o\t+= $(CC_FLAGS_NO_FPU)\ndiff --git a/lib/raid/xor/arm64/xor-neon-glue.c b/lib/raid/xor/arm64/xor-neon-glue.c\nnew file mode 100644\nindex 000000000000..067a2095659a\n--- /dev/null\n+++ b/lib/raid/xor/arm64/xor-neon-glue.c\n@@ -0,0 +1,57 @@\n+// SPDX-License-Identifier: GPL-2.0-only\n+/*\n+ * Authors: Jackie Liu <liuyun01@kylinos.cn>\n+ * Copyright (C) 2018,Tianjin KYLIN Information Technology Co., Ltd.\n+ */\n+\n+#include <linux/raid/xor_impl.h>\n+#include <asm/simd.h>\n+#include <asm/xor.h>\n+\n+extern struct xor_block_template const xor_block_inner_neon;\n+\n+static void\n+xor_neon_2(unsigned long bytes, unsigned long * __restrict p1,\n+\t   const unsigned long * __restrict p2)\n+{\n+\tscoped_ksimd()\n+\t\txor_block_inner_neon.do_2(bytes, p1, p2);\n+}\n+\n+static void\n+xor_neon_3(unsigned long bytes, unsigned long * __restrict p1,\n+\t   const unsigned long * __restrict p2,\n+\t   const unsigned long * __restrict p3)\n+{\n+\tscoped_ksimd()\n+\t\txor_block_inner_neon.do_3(bytes, p1, p2, p3);\n+}\n+\n+static void\n+xor_neon_4(unsigned long bytes, unsigned long * __restrict p1,\n+\t   const unsigned long * __restrict p2,\n+\t   const unsigned long * __restrict p3,\n+\t   const unsigned long * __restrict p4)\n+{\n+\tscoped_ksimd()\n+\t\txor_block_inner_neon.do_4(bytes, p1, p2, p3, p4);\n+}\n+\n+static void\n+xor_neon_5(unsigned long bytes, unsigned long * __restrict p1,\n+\t   const unsigned long * __restrict p2,\n+\t   const unsigned long * __restrict p3,\n+\t   const unsigned long * __restrict p4,\n+\t   const unsigned long * __restrict p5)\n+{\n+\tscoped_ksimd()\n+\t\txor_block_inner_neon.do_5(bytes, p1, p2, p3, p4, p5);\n+}\n+\n+struct xor_block_template xor_block_arm64 = {\n+\t.name   = \"arm64_neon\",\n+\t.do_2   = xor_neon_2,\n+\t.do_3   = xor_neon_3,\n+\t.do_4   = xor_neon_4,\n+\t.do_5\t= xor_neon_5\n+};\ndiff --git a/arch/arm64/lib/xor-neon.c b/lib/raid/xor/arm64/xor-neon.c\nsimilarity index 95%\nrename from arch/arm64/lib/xor-neon.c\nrename to lib/raid/xor/arm64/xor-neon.c\nindex 351aba92d932..8d2d185090db 100644\n--- a/arch/arm64/lib/xor-neon.c\n+++ b/lib/raid/xor/arm64/xor-neon.c\n@@ -1,15 +1,13 @@\n // SPDX-License-Identifier: GPL-2.0-only\n /*\n- * arch/arm64/lib/xor-neon.c\n- *\n  * Authors: Jackie Liu <liuyun01@kylinos.cn>\n  * Copyright (C) 2018,Tianjin KYLIN Information Technology Co., Ltd.\n  */\n \n-#include <linux/raid/xor.h>\n #include <linux/raid/xor_impl.h>\n-#include <linux/module.h>\n+#include <linux/cache.h>\n #include <asm/neon-intrinsics.h>\n+#include <asm/xor.h>\n \n static void xor_arm64_neon_2(unsigned long bytes, unsigned long * __restrict p1,\n \tconst unsigned long * __restrict p2)\n@@ -180,7 +178,6 @@ struct xor_block_template xor_block_inner_neon __ro_after_init = {\n \t.do_4\t= xor_arm64_neon_4,\n \t.do_5\t= xor_arm64_neon_5,\n };\n-EXPORT_SYMBOL(xor_block_inner_neon);\n \n static inline uint64x2_t eor3(uint64x2_t p, uint64x2_t q, uint64x2_t r)\n {\n@@ -318,22 +315,11 @@ static void xor_arm64_eor3_5(unsigned long bytes,\n \t} while (--lines > 0);\n }\n \n-static int __init xor_neon_init(void)\n+void __init xor_neon_init(void)\n {\n \tif (cpu_have_named_feature(SHA3)) {\n \t\txor_block_inner_neon.do_3 = xor_arm64_eor3_3;\n \t\txor_block_inner_neon.do_4 = xor_arm64_eor3_4;\n \t\txor_block_inner_neon.do_5 = xor_arm64_eor3_5;\n \t}\n-\treturn 0;\n }\n-module_init(xor_neon_init);\n-\n-static void __exit xor_neon_exit(void)\n-{\n-}\n-module_exit(xor_neon_exit);\n-\n-MODULE_AUTHOR(\"Jackie Liu <liuyun01@kylinos.cn>\");\n-MODULE_DESCRIPTION(\"ARMv8 XOR Extensions\");\n-MODULE_LICENSE(\"GPL\");\n",
    "prefixes": [
        "13/28"
    ]
}