get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216757,
    "url": "http://patchwork.ozlabs.org/api/patches/2216757/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/sparclinux/patch/20260327061704.3707577-28-hch@lst.de/",
    "project": {
        "id": 10,
        "url": "http://patchwork.ozlabs.org/api/projects/10/?format=api",
        "name": "Linux SPARC Development ",
        "link_name": "sparclinux",
        "list_id": "sparclinux.vger.kernel.org",
        "list_email": "sparclinux@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260327061704.3707577-28-hch@lst.de>",
    "list_archive_url": null,
    "date": "2026-03-27T06:16:59",
    "name": "[27/28] xor: use static_call for xor_gen",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "3f098b9d4365b82313d7403fe74aee451381d537",
    "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/sparclinux/patch/20260327061704.3707577-28-hch@lst.de/mbox/",
    "series": [
        {
            "id": 497694,
            "url": "http://patchwork.ozlabs.org/api/series/497694/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/sparclinux/list/?series=497694",
            "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/497694/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216757/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216757/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <SRS0=3R11=B3=vger.kernel.org=sparclinux+bounces-6602-patchwork-incoming=ozlabs.org@ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "sparclinux@vger.kernel.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "patchwork-incoming@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=B79nu8vZ;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org;\n envelope-from=srs0=3r11=b3=vger.kernel.org=sparclinux+bounces-6602-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=\"2600:3c15:e001:75::12fc:5321\"\n arc.chain=subspace.kernel.org",
            "gandalf.ozlabs.org;\n dmarc=fail (p=none dis=none) header.from=lst.de",
            "gandalf.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=B79nu8vZ;\n\tdkim-atps=neutral",
            "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=sparclinux+bounces-6602-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org\n header.b=\"B79nu8vZ\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=198.137.202.133",
            "smtp.subspace.kernel.org;\n dmarc=fail (p=none dis=none) header.from=lst.de",
            "smtp.subspace.kernel.org;\n spf=none smtp.mailfrom=bombadil.srs.infradead.org"
        ],
        "Received": [
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\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 4fhrQ35ssrz1y1j\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 17:31:23 +1100 (AEDT)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fhrQ35LFCz4wSW\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 17:31:23 +1100 (AEDT)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4fhrQ35Bhcz4wSb; Fri, 27 Mar 2026 17:31:23 +1100 (AEDT)",
            "from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\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 gandalf.ozlabs.org (Postfix) with ESMTPS id 4fhrQ02ZLZz4wSW\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 27 Mar 2026 17:31:20 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 716433004D3B\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 27 Mar 2026 06:29:37 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id BFC0E3A874F;\n\tFri, 27 Mar 2026 06:23:51 +0000 (UTC)",
            "from bombadil.infradead.org (bombadil.infradead.org\n [198.137.202.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id BB1153A7F6C;\n\tFri, 27 Mar 2026 06:23:44 +0000 (UTC)",
            "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 1w60bS-00000006oEd-09fn;\n\tFri, 27 Mar 2026 06:23:30 +0000"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1774593083; cv=pass;\n\tb=tgEq5oFOYXos2KU/+iyKm3aLfj/fGD/FDDM47QaKs4wwNVm+HPjJ30hmy8SxT/N4zWCAE0sNE556ueq+ke04KI/V7rdA9XPIuMHMRDl8//oq6sQtNu8iER13ofa8LCsnZJwVxFXs0bTJOaxURWREZ2P1XN4MX3MFKj6mQ5wgGo0U0gmP6/A/29NrQh+1harIMwdNfklpy3VV7zBe9heVEel9iB9xCdd8XKSKFQlf4y4uw0LfxAd/h96YIduR97pkYMN2bnyhwpdBLl5X0rrUn5GfVUGwBGgr54TmdvGH+nDTqZRchc0j/uaBOUM1xp1UFYN7uqTTNtn81N/XPE6JZg==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774592630; cv=none;\n b=sIiI9jYAK43zVEci/nzqnmZbFz66W8bqrHqY58OeEAQckoeiWtROwSDz0l9f8I/evPU9knsU4lmEidUdWUvHo+gN43ONh+Ie+2Q8Zxs4+b6UvYOBcqst/+6UIgxut2xNHIPqgop6Pg28AveqwmnGupWuz6CHjYOeeN+E+lYKjWw="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1774593083; c=relaxed/relaxed;\n\tbh=/eIr9wIIm6iGlYV1kRtLFx5UsBKOxZ4VNuwt7IPsmcE=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=UyytbTOn+o5ersbYsgHqA3TD9xha0TW9hVn8L+7AXuql/6BtAxjnCG3Ch3RwvHHjfYUiuYTDWm7mMNIMXyDOYW4KIbT9y//eD6mKiRJ4DqybdMcQ7EROh6b6nrlpq9NuskTCA3CT6G4wxJeizldbzcjsoB7SfIwMLEgzpw1WGRskyexdy5KeDqLQu4pB7D1Y1AIq86xqRPpnxdBqdGtKVgeJ55Wnp14zO69fbEpQoj0n24ueOBhwOVRg0eqZ1+P3MlITDjo7uIp+H8m2V8BIMlCM+iw+3PBBp57AaS/AGUZ4QAyx19OPCf42a4oGGfPyUjsUMyVtjV7b6NnmHqPKcA==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774592630; c=relaxed/simple;\n\tbh=T78+0GNbmPLnTNrMBAs1W2fFBF5QBqGty/2MKyQM950=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=IlUrPAeIZb2FOaz78JPJBauvg1w2U1AUpByM7bUBeHnaJ3V+ATuZCuDIBomZPDrZxRseyVKrEPzq9YuVCF3gZcG2C4RpvsbV4j030+gjuO4CrHxweI+s/KSpTaIhKQ1W+FkZ/9NIj8lncp3lfdnCz1jK71bUynnkLvVAvGvfWWE="
        ],
        "ARC-Authentication-Results": [
            "i=2; gandalf.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=B79nu8vZ; dkim-atps=neutral;\n spf=pass (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=sparclinux+bounces-6602-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org",
            "i=1; smtp.subspace.kernel.org;\n dmarc=fail (p=none dis=none) header.from=lst.de;\n spf=none smtp.mailfrom=bombadil.srs.infradead.org;\n dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org\n header.b=B79nu8vZ; arc=none smtp.client-ip=198.137.202.133"
        ],
        "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=/eIr9wIIm6iGlYV1kRtLFx5UsBKOxZ4VNuwt7IPsmcE=; b=B79nu8vZV/CSonC7sqH0z/OKAl\n\t/edR6ukNRR9e2OXsqxy0hAnd5awCq7NvJwVK47ZKrEiivroyi32XYu/5O7DE3UVV+WHCNSS21upsn\n\tEIXvxSssYk7zka1I4NceFAoBnl09Knq/JdUYOBMvS5imNReaFZVqF+mv5nV5Ire0iaK4aU/FoGjBS\n\tgQSw3TnFArvcWd/YcTPub9h8vqlqP3T9T9lLgNPj6HzbaS4/yGeqaATp/M0uxw1Lj/MkY8Am7Xwcf\n\txRlX2Ud6W+b75r2z7YD9t8zysNMUf9FFMQRTNUgMpGapVKo9FFHAg0we3BXkJFwBw2HyU89gxIW3g\n\tn4l5zDjg==;",
        "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 27/28] xor: use static_call for xor_gen",
        "Date": "Fri, 27 Mar 2026 07:16:59 +0100",
        "Message-ID": "<20260327061704.3707577-28-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>",
        "Precedence": "bulk",
        "X-Mailing-List": "sparclinux@vger.kernel.org",
        "List-Id": "<sparclinux.vger.kernel.org>",
        "List-Subscribe": "<mailto:sparclinux+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:sparclinux+unsubscribe@vger.kernel.org>",
        "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.2 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIM_SIGNED,DKIM_VALID,DMARC_NONE,HEADER_FROM_DIFFERENT_DOMAINS,\n\tMAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=disabled\n\tversion=4.0.1",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org"
    },
    "content": "Avoid the indirect call for xor_generation by using a static_call.\n\nSigned-off-by: Christoph Hellwig <hch@lst.de>\n---\n lib/raid/xor/xor-core.c | 22 +++++++++++-----------\n 1 file changed, 11 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/lib/raid/xor/xor-core.c b/lib/raid/xor/xor-core.c\nindex 9e043d8c3a7a..bd4e6e434418 100644\n--- a/lib/raid/xor/xor-core.c\n+++ b/lib/raid/xor/xor-core.c\n@@ -11,10 +11,10 @@\n #include <linux/raid/xor.h>\n #include <linux/jiffies.h>\n #include <linux/preempt.h>\n+#include <linux/static_call.h>\n #include \"xor_impl.h\"\n \n-/* The xor routine to use.  */\n-static struct xor_block_template *active_template;\n+DEFINE_STATIC_CALL_NULL(xor_gen_impl, *xor_block_8regs.xor_gen);\n \n /**\n  * xor_gen - generate RAID-style XOR information\n@@ -37,13 +37,13 @@ void xor_gen(void *dest, void **srcs, unsigned int src_cnt, unsigned int bytes)\n \tWARN_ON_ONCE(bytes == 0);\n \tWARN_ON_ONCE(bytes & 511);\n \n-\tactive_template->xor_gen(dest, srcs, src_cnt, bytes);\n+\tstatic_call(xor_gen_impl)(dest, srcs, src_cnt, bytes);\n }\n EXPORT_SYMBOL(xor_gen);\n \n /* Set of all registered templates.  */\n static struct xor_block_template *__initdata template_list;\n-static bool __initdata xor_forced = false;\n+static struct xor_block_template *forced_template;\n \n /**\n  * xor_register - register a XOR template\n@@ -69,7 +69,7 @@ void __init xor_register(struct xor_block_template *tmpl)\n  */\n void __init xor_force(struct xor_block_template *tmpl)\n {\n-\tactive_template = tmpl;\n+\tforced_template = tmpl;\n }\n \n #define BENCH_SIZE\t4096\n@@ -111,7 +111,7 @@ static int __init calibrate_xor_blocks(void)\n \tvoid *b1, *b2;\n \tstruct xor_block_template *f, *fastest;\n \n-\tif (xor_forced)\n+\tif (forced_template)\n \t\treturn 0;\n \n \tb1 = (void *) __get_free_pages(GFP_KERNEL, 2);\n@@ -128,7 +128,7 @@ static int __init calibrate_xor_blocks(void)\n \t\tif (f->speed > fastest->speed)\n \t\t\tfastest = f;\n \t}\n-\tactive_template = fastest;\n+\tstatic_call_update(xor_gen_impl, fastest->xor_gen);\n \tpr_info(\"xor: using function: %s (%d MB/sec)\\n\",\n \t       fastest->name, fastest->speed);\n \n@@ -156,10 +156,10 @@ static int __init xor_init(void)\n \t * If this arch/cpu has a short-circuited selection, don't loop through\n \t * all the possible functions, just use the best one.\n \t */\n-\tif (active_template) {\n+\tif (forced_template) {\n \t\tpr_info(\"xor: automatically using best checksumming function   %-10s\\n\",\n-\t\t\tactive_template->name);\n-\t\txor_forced = true;\n+\t\t\tforced_template->name);\n+\t\tstatic_call_update(xor_gen_impl, forced_template->xor_gen);\n \t\treturn 0;\n \t}\n \n@@ -170,7 +170,7 @@ static int __init xor_init(void)\n \t * Pick the first template as the temporary default until calibration\n \t * happens.\n \t */\n-\tactive_template = template_list;\n+\tstatic_call_update(xor_gen_impl, template_list->xor_gen);\n \treturn 0;\n #endif\n }\n",
    "prefixes": [
        "27/28"
    ]
}