Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2221886/?format=api
{ "id": 2221886, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2221886/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260410120319.263143276@kernel.org/", "project": { "id": 8, "url": "http://patchwork.ozlabs.org/api/1.2/projects/8/?format=api", "name": "Linux ext4 filesystem development", "link_name": "linux-ext4", "list_id": "linux-ext4.vger.kernel.org", "list_email": "linux-ext4@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260410120319.263143276@kernel.org>", "list_archive_url": null, "date": "2026-04-10T12:20:31", "name": "[25/38] arm64: Select ARCH_HAS_RANDOM_ENTROPY", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "ca33cd2508f02796194bb9bca0f579c70cd9e9ca", "submitter": { "id": 92397, "url": "http://patchwork.ozlabs.org/api/1.2/people/92397/?format=api", "name": "Thomas Gleixner", "email": "tglx@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260410120319.263143276@kernel.org/mbox/", "series": [ { "id": 499451, "url": "http://patchwork.ozlabs.org/api/1.2/series/499451/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=499451", "date": "2026-04-10T12:18:27", "name": "treewide: Cleanup LATCH, CLOCK_TICK_RATE and get_cycles() [ab]use", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499451/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2221886/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2221886/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <SRS0=qkaD=CJ=vger.kernel.org=linux-ext4+bounces-15760-patchwork-incoming=ozlabs.org@ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-ext4@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 unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=UsSMuuI0;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=150.107.74.76; helo=mail.ozlabs.org;\n envelope-from=srs0=qkad=cj=vger.kernel.org=linux-ext4+bounces-15760-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)", "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=172.232.135.74 arc.chain=subspace.kernel.org", "gandalf.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org", "gandalf.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=UsSMuuI0;\n\tdkim-atps=neutral", "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.232.135.74; helo=sto.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15760-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"UsSMuuI0\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201" ], "Received": [ "from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76])\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 4fsbtH3nYHz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 22:37:43 +1000 (AEST)", "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fsbtH3JDXz4wJP\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 22:37:43 +1000 (AEST)", "by gandalf.ozlabs.org (Postfix)\n\tid 4fsbtH3BGNz4wLx; Fri, 10 Apr 2026 22:37:43 +1000 (AEST)", "from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])\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 4fsbtC4fN9z4wJP\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 10 Apr 2026 22:37:39 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id E74D830C2AFD\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 10 Apr 2026 12:26:52 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 963243DCDA3;\n\tFri, 10 Apr 2026 12:20:34 +0000 (UTC)", "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\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 487C63C0635;\n\tFri, 10 Apr 2026 12:20:34 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 59123C2BC87;\n\tFri, 10 Apr 2026 12:20:33 +0000 (UTC)" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1775824663; cv=pass;\n\tb=GV5bqahwFst/LpRLXB3iPbpDT1Nv3DO8MOXIc2bgl3mtHNPBYJZQ6Hr4Dc1e6iBO27ZtaPSWkJivd593CWLqvggrBTxWkgHUjAqjQLRZM0kHj3+nP3atXX3eLhlC3YHm5qjzGBorVWvu6VJbYsVH0I81dIZBYaKRXIUTCLi4855HF9283d8DOjHGLpA0g7O/MJjiet7MVW/69YDMyeAVMis7J2wcrqHMpT5PoW+aVJeyKcpVEIEaeFatAaBwAMNl9HJqEtEWVRANa69c0xOD1oN0Uq1z1TwxTbIbRloYKw7Jj8JNfXgvgm0lrZdnsQQIJLhEMsQkkzOvi9iH0+6yIw==", "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775823634; cv=none;\n b=kw/y9sTZaHK2WHMZ+ZQVcYd7xeA1iV/G4DFWYHN7Iy6LsGlc2vOG+yc2OjKz0YILTY7Wx1dLvmstx5TfaKMQdzjyBJg1ERhEriFFpMjgbTp6Sepd06kZ3QKC9aVEVufYLbysYtiAyW7k9D4xWSqBhilcLwBWQ3EspQqxIJXmsPg=" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1775824663; c=relaxed/relaxed;\n\tbh=T5BmJ1FF4HBJvfl1JxkNrWx4X3v6jSPy5n7OMhgiRsc=;\n\th=Date:Message-ID:From:To:Cc:Subject:References:MIME-Version:\n\t Content-Type;\n b=tQqP+hFtUTXTs4vrFVWSwyR7D9H+xK3Lm9IsY+LLHFmPt6buum5CoNUVhl//HdpuFG9O2QR+ZL3R5r5UzxCedEb/psJ+rXKKv9KZW6pnJH4BV/qzgQiEi4tZIWQSngVc8fq6zNnj/vA6fQJPOBwXJI+iLbyrQTV33XnxKQAo2NckHNymInXDoOEHJdbC5CoynfRqd0So6cQzBmg0ZIQCSiFZgEZCNVNgq67DXPVzV7mP22Y+qT7WFFRdD2o28H5IBlgvEkK77gUb8efOyF9QkOQLAraRFKqv20x7C1azUtFbQlhEYfnG4qQXOVCk+rLFi0CWTuFc4cLkW2Le0AaVFw==", "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775823634; c=relaxed/simple;\n\tbh=dDZlZkUBE8Yoz+Mf4b2btSZILqeS3wHEYjrON1rjw6U=;\n\th=Date:Message-ID:From:To:Cc:Subject:References:MIME-Version:\n\t Content-Type;\n b=R1hxpitiGibTPOM97tROot1Zqqa5MbMQNqyMD9WJ4vbMqhGCthqmgyxefh6fbp12bryjN0Aps9ABZRY3pdFTkFDJtqz3dkgbNUJPPKXG22cT1s10FyMV5j6Nx7dX/b8MqvykHrIxJZwv7/hnKChgLr+hxA0spbHp1ALN+QTTUf8=" ], "ARC-Authentication-Results": [ "i=2; gandalf.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org;\n dkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=UsSMuuI0; dkim-atps=neutral;\n spf=pass (client-ip=172.232.135.74; helo=sto.lore.kernel.org;\n envelope-from=linux-ext4+bounces-15760-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org", "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=UsSMuuI0; arc=none smtp.client-ip=10.30.226.201" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1775823634;\n\tbh=dDZlZkUBE8Yoz+Mf4b2btSZILqeS3wHEYjrON1rjw6U=;\n\th=Date:From:To:Cc:Subject:References:From;\n\tb=UsSMuuI0fLabe+4dL8zTL2gq7n1Qam6gWMJ4FfKEoBXmYXreb34mK0jfpqexOCcjk\n\t URd+7aIYau5Paex32UCyAHBB1baazBC53HlWWmD8jGnelNjcRxfUYPATekVzRrqJDT\n\t SM4YYaTAd2jF6zuzF3s9v75IAyeOupGmOZUxJte/r7FKLtBw0S1j/Gfer+oeitcrs9\n\t GcWasj5F60hnX72mh29rwAv4UlAzszLEnt4a+71ByOcLxgUh/fQSei1PCaUTQnLPFS\n\t AyV/TWXRXX6WJrt/PID7Ovi55s49ArxiVCGwFwMjqqfxuev0KPjerElNRcERH69T8a\n\t bfdJGP+BHG9rw==", "Date": "Fri, 10 Apr 2026 14:20:31 +0200", "Message-ID": "<20260410120319.263143276@kernel.org>", "User-Agent": "quilt/0.68", "From": "Thomas Gleixner <tglx@kernel.org>", "To": "LKML <linux-kernel@vger.kernel.org>", "Cc": "Catalin Marinas <catalin.marinas@arm.com>,\n linux-arm-kernel@lists.infradead.org,\n Arnd Bergmann <arnd@arndb.de>,\n x86@kernel.org,\n Lu Baolu <baolu.lu@linux.intel.com>,\n iommu@lists.linux.dev,\n Michael Grzeschik <m.grzeschik@pengutronix.de>,\n netdev@vger.kernel.org,\n linux-wireless@vger.kernel.org,\n Herbert Xu <herbert@gondor.apana.org.au>,\n linux-crypto@vger.kernel.org,\n Vlastimil Babka <vbabka@kernel.org>,\n linux-mm@kvack.org,\n David Woodhouse <dwmw2@infradead.org>,\n Bernie Thompson <bernie@plugable.com>,\n linux-fbdev@vger.kernel.org,\n \"Theodore Tso\" <tytso@mit.edu>,\n linux-ext4@vger.kernel.org,\n Andrew Morton <akpm@linux-foundation.org>,\n Uladzislau Rezki <urezki@gmail.com>,\n Marco Elver <elver@google.com>,\n Dmitry Vyukov <dvyukov@google.com>,\n kasan-dev@googlegroups.com,\n Andrey Ryabinin <ryabinin.a.a@gmail.com>,\n Thomas Sailer <t.sailer@alumni.ethz.ch>,\n linux-hams@vger.kernel.org,\n \"Jason A. Donenfeld\" <Jason@zx2c4.com>,\n Richard Henderson <richard.henderson@linaro.org>,\n linux-alpha@vger.kernel.org,\n Russell King <linux@armlinux.org.uk>,\n Huacai Chen <chenhuacai@kernel.org>,\n loongarch@lists.linux.dev,\n Geert Uytterhoeven <geert@linux-m68k.org>,\n linux-m68k@lists.linux-m68k.org,\n Dinh Nguyen <dinguyen@kernel.org>,\n Jonas Bonn <jonas@southpole.se>,\n linux-openrisc@vger.kernel.org,\n Helge Deller <deller@gmx.de>,\n linux-parisc@vger.kernel.org,\n Michael Ellerman <mpe@ellerman.id.au>,\n linuxppc-dev@lists.ozlabs.org,\n Paul Walmsley <pjw@kernel.org>,\n linux-riscv@lists.infradead.org,\n Heiko Carstens <hca@linux.ibm.com>,\n linux-s390@vger.kernel.org,\n \"David S. Miller\" <davem@davemloft.net>,\n sparclinux@vger.kernel.org", "Subject": "[patch 25/38] arm64: Select ARCH_HAS_RANDOM_ENTROPY", "References": "<20260410120044.031381086@kernel.org>", "Precedence": "bulk", "X-Mailing-List": "linux-ext4@vger.kernel.org", "List-Id": "<linux-ext4.vger.kernel.org>", "List-Subscribe": "<mailto:linux-ext4+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-ext4+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "X-Spam-Status": "No, score=-1.2 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,\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": "The only remaining usage of get_cycles() is to provide random_get_entropy().\n\nSwitch arm64 over to the new scheme of selecting ARCH_HAS_RANDOM_ENTROPY\nand providing random_get_entropy() in asm/random.h.\n\nAs a consequence this unearthed a nasty include dependecy hell where random\ncode including rqspinlock.h relies on a magic include of asm/arch_timer.h.\nIncluding the headers in asm/random.h turned out to be impossible as well.\n\nThe only solution for now is to uninline random_get_entropy(). Fix up all\nother dependencies on the content of asm/timex.h in those files which\nreally depend on it.\n\nRemove asm/timex.h as it has no functionality anymore.\n\nSigned-off-by: Thomas Gleixner <tglx@kernel.org>\nCc: Catalin Marinas <catalin.marinas@arm.com>\nCc: linux-arm-kernel@lists.infradead.org\n---\n arch/arm64/Kconfig | 1 +\n arch/arm64/include/asm/io.h | 5 +++--\n arch/arm64/include/asm/random.h | 11 +++++++++++\n arch/arm64/include/asm/rqspinlock.h | 1 +\n arch/arm64/include/asm/timex.h | 18 ------------------\n arch/arm64/kernel/time.c | 6 ++++++\n arch/arm64/kernel/topology.c | 1 +\n arch/arm64/kernel/traps.c | 1 +\n arch/arm64/kvm/emulate-nested.c | 1 +\n arch/arm64/kvm/hyp/include/hyp/switch.h | 1 +\n arch/arm64/lib/delay.c | 1 +\n drivers/irqchip/irq-apple-aic.c | 1 +\n 12 files changed, 28 insertions(+), 20 deletions(-)", "diff": "--- a/arch/arm64/Kconfig\n+++ b/arch/arm64/Kconfig\n@@ -45,6 +45,7 @@ config ARM64\n \tselect ARCH_HAS_PREEMPT_LAZY\n \tselect ARCH_HAS_PTDUMP\n \tselect ARCH_HAS_PTE_SPECIAL\n+\tselect ARCH_HAS_RANDOM_ENTROPY\n \tselect ARCH_HAS_HW_PTE_YOUNG\n \tselect ARCH_HAS_SETUP_DMA_OPS\n \tselect ARCH_HAS_SET_DIRECT_MAP\n--- a/arch/arm64/include/asm/io.h\n+++ b/arch/arm64/include/asm/io.h\n@@ -100,12 +100,13 @@ static __always_inline u64 __raw_readq(c\n ({\t\t\t\t\t\t\t\t\t\\\n \tunsigned long tmp;\t\t\t\t\t\t\\\n \t\t\t\t\t\t\t\t\t\\\n-\tdma_rmb();\t\t\t\t\t\t\t\t\\\n+\tdma_rmb();\t\t\t\t\t\t\t\\\n \t\t\t\t\t\t\t\t\t\\\n \t/*\t\t\t\t\t\t\t\t\\\n \t * Create a dummy control dependency from the IO read to any\t\\\n \t * later instructions. This ensures that a subsequent call to\t\\\n-\t * udelay() will be ordered due to the ISB in get_cycles().\t\\\n+\t * udelay() will be ordered due to the ISB in\t\t\t\\\n+\t * arm_timer_read_counter().\t\t\t\t\t\\\n \t */\t\t\t\t\t\t\t\t\\\n \tasm volatile(\"eor\t%0, %1, %1\\n\"\t\t\t\t\\\n \t\t \"cbnz\t%0, .\"\t\t\t\t\t\\\n--- /dev/null\n+++ b/arch/arm64/include/asm/random.h\n@@ -0,0 +1,11 @@\n+/* SPDX-License-Identifier: GPL-2.0-only */\n+/*\n+ * Copyright (C) 2012 ARM Ltd.\n+ */\n+#ifndef __ASM_RANDOM_H\n+#define __ASM_RANDOM_H\n+\n+/* Out of line to avoid recursive include hell */\n+unsigned long random_get_entropy(void);\n+\n+#endif\n--- a/arch/arm64/include/asm/rqspinlock.h\n+++ b/arch/arm64/include/asm/rqspinlock.h\n@@ -2,6 +2,7 @@\n #ifndef _ASM_RQSPINLOCK_H\n #define _ASM_RQSPINLOCK_H\n \n+#include <asm/arch_timer.h>\n #include <asm/barrier.h>\n \n /*\n--- a/arch/arm64/include/asm/timex.h\n+++ /dev/null\n@@ -1,18 +0,0 @@\n-/* SPDX-License-Identifier: GPL-2.0-only */\n-/*\n- * Copyright (C) 2012 ARM Ltd.\n- */\n-#ifndef __ASM_TIMEX_H\n-#define __ASM_TIMEX_H\n-\n-#include <asm/arch_timer.h>\n-\n-/*\n- * Use the current timer as a cycle counter since this is what we use for\n- * the delay loop.\n- */\n-#define get_cycles()\tarch_timer_read_counter()\n-\n-#include <asm-generic/timex.h>\n-\n-#endif\n--- a/arch/arm64/kernel/time.c\n+++ b/arch/arm64/kernel/time.c\n@@ -29,6 +29,7 @@\n \n #include <clocksource/arm_arch_timer.h>\n \n+#include <asm/arch_timer.h>\n #include <asm/thread_info.h>\n #include <asm/paravirt.h>\n \n@@ -52,6 +53,11 @@ unsigned long profile_pc(struct pt_regs\n }\n EXPORT_SYMBOL(profile_pc);\n \n+static unsigned long random_get_entropy(void)\n+{\n+\treturn arch_timer_read_counter();\n+}\n+\n void __init time_init(void)\n {\n \tu32 arch_timer_rate;\n--- a/arch/arm64/kernel/topology.c\n+++ b/arch/arm64/kernel/topology.c\n@@ -21,6 +21,7 @@\n #include <linux/sched/isolation.h>\n #include <linux/xarray.h>\n \n+#include <asm/arch_timer.h>\n #include <asm/cpu.h>\n #include <asm/cputype.h>\n #include <asm/topology.h>\n--- a/arch/arm64/kernel/traps.c\n+++ b/arch/arm64/kernel/traps.c\n@@ -30,6 +30,7 @@\n #include <linux/ubsan.h>\n #include <linux/cfi.h>\n \n+#include <asm/arch_timer.h>\n #include <asm/atomic.h>\n #include <asm/bug.h>\n #include <asm/cpufeature.h>\n--- a/arch/arm64/kvm/emulate-nested.c\n+++ b/arch/arm64/kvm/emulate-nested.c\n@@ -7,6 +7,7 @@\n #include <linux/kvm.h>\n #include <linux/kvm_host.h>\n \n+#include <asm/arch_timer.h>\n #include <asm/kvm_emulate.h>\n #include <asm/kvm_nested.h>\n \n--- a/arch/arm64/kvm/hyp/include/hyp/switch.h\n+++ b/arch/arm64/kvm/hyp/include/hyp/switch.h\n@@ -18,6 +18,7 @@\n \n #include <kvm/arm_psci.h>\n \n+#include <asm/arch_timer.h>\n #include <asm/barrier.h>\n #include <asm/cpufeature.h>\n #include <asm/extable.h>\n--- a/arch/arm64/lib/delay.c\n+++ b/arch/arm64/lib/delay.c\n@@ -14,6 +14,7 @@\n #include <linux/timex.h>\n \n #include <clocksource/arm_arch_timer.h>\n+#include <asm/arch_timer.h>\n \n #define USECS_TO_CYCLES(time_usecs)\t\t\t\\\n \txloops_to_cycles((time_usecs) * 0x10C7UL)\n--- a/drivers/irqchip/irq-apple-aic.c\n+++ b/drivers/irqchip/irq-apple-aic.c\n@@ -55,6 +55,7 @@\n #include <linux/jump_label.h>\n #include <linux/limits.h>\n #include <linux/of_address.h>\n+#include <asm/arch_timer.h>\n #include <linux/slab.h>\n #include <asm/apple_m1_pmu.h>\n #include <asm/cputype.h>\n", "prefixes": [ "25/38" ] }