From nobody Mon May 25 04:33:42 2026 Received: from mail-dy1-f195.google.com (mail-dy1-f195.google.com [74.125.82.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51BAE22D7A1 for ; Tue, 19 May 2026 01:19:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779153602; cv=none; b=P7hh8ncpEJDiBmihA+7NECHzZEhXxLue3qEeoq4lTzleAKByfDnyBWYBXsbpUUWJ5bJzAaTq6orAQJIUWhR0gXW8lkFgnAo2PLPGUHwfY1j10zRObzIBiujVQCieIeDvu8LBH3Zss0VYf5zW2g1K7JOTTv4ryqzgatWwhsMAGM0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779153602; c=relaxed/simple; bh=uC/YTHZQN/5OVj8zrqwkRVYTiYsHlJGxeqoHIVP2gds=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GA0L0x36dEeJz/WHQWRHCQo7LTReKG+GHfo7wNK999Iapkl+RDjZYlNsnWigbf5td8rxm4VBXWVP06cK0N0nLzlLcRoMZvGBIyqk2DWAP+MVBOW8t11wncKAfcWVPTwI6nAEp8xMI4tknoGnPSd5/2AmkNoBnK/X7u3sGWrqwY8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Gnq9KH6L; arc=none smtp.client-ip=74.125.82.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Gnq9KH6L" Received: by mail-dy1-f195.google.com with SMTP id 5a478bee46e88-2ee1054627bso2621724eec.1 for ; Mon, 18 May 2026 18:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779153598; x=1779758398; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=61IH/1X9bdUpbndRHMPT6pWv81GYEfTAPjpqMU4gh2E=; b=Gnq9KH6LWICcWk7JWuKm/yO7WrEL8YdF16tJOwwX6ldJtlzHzg3BPOJ5xEFqBZtB+Y tRPoXh2UKPZykIPBQ1B2NCVcMrXZd4p2O71mHDrUTiQ+Mu9SheWOXy+e0EKwgA1J5sn+ kJLd+JOHTDf3Ubb8ibtuh5QOvXaRY74iKP49OIXMtqOTVTBJmIx97QXFq072WIaI7g9/ EqFGjQzC2UkprAahERIuFlfyxObO3ZWMcnoqPZl/kh6sFUXla246l8PpDSAmOSh/7Pc7 r98KsIGUv5IXvdjaAonGlfTxKVzsGZJB0DFMy0ttEpIU4Sly8j8QLk36NAPTHdOAAe2N AkdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779153598; x=1779758398; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=61IH/1X9bdUpbndRHMPT6pWv81GYEfTAPjpqMU4gh2E=; b=mLzyIrVU8QutaS7DW6IH7/W7asgFeofxhPCI0yMBBYZsPcvK7BNXc3USyf1Aj4g+1W uYLE6n2N05RuEa+ElA7r0vnd5hxC6fjNFW5Aqy8pDuWbUOnHhSF//AViL5Cru3k3cn+B KB9b8/xc5xUx6t/PJjR2/wkMGB53q5grk3v/E2Wxp70latt2Grz/xQyG7jzoMcFq5dZ/ eE1/c5W98WsX4E/alTaYfdJzqelepVlKSM6F68lZycMvW0clqg47mqNwarre68vjqcv+ iexWttddKpOdljXQ8O/gwz8CZR7qAyFLbmuwtNJftUpsGZiIBrZLDjTGZGSzsr8fPiWK MPfQ== X-Gm-Message-State: AOJu0Yw11tl++1jxpfsdfVYajkDHs9dCP1Ny4lRoZWCn2II5q6yuMms/ jpFE5fw018KIcKEHkwNYU4Yw1Nv+F5ftjhSktI4STuUYoJMrgzP9vZVc018o97oLhug= X-Gm-Gg: Acq92OFo+Sz6tkaIwMT5h5O2HnyDGqG/Cz34j5ts8TK3zzXioxoz9cXJxQIYYZ8QYCg shiv03H8Nd+Vti0K5nnFiq38Jsc5PCjtbUQiShsuZYBpmsKdspjaiQuGW4ENT+YlYC0p1ZhAy6a v6v0Yz9idvVuELFiAN01mn92uAadm1jFz6Kknam+460qC160Z+qWy5yeKjgm9aJ4mVYDbdWqfYT PeD1pOBEcLlW2a4saWLLJtWFstTTYjWqj5VgKyrXmOSVG2jw7bh6V4F4I2IlZKmtoaJyDc5RbC3 tEPzZThOkMTDke4D1MuYXa23OCqQA/r5rlyhtV1anRS+JEILkrwDXuUt3UjcK2YOT0hCNCHvldU gMah3HRs/mM8weiKQ07WDrFwmzU8v0w0nPpIkqIKHTK/R7grauj8wugaRlJmRYB073QHGXXq4sK RDJr1WXCKZ1psFQLakvmOh8M8Hy18RHK9YatIvDkELWw8pmK85fxw6vSxy7cuVA6Jh+4yR3onON wjvzc4f8oD1J5HqhEh8bmdZ9/4Q7plALTSM5ZgWTWm4nG1Xbs13xMj+yXC93Jrn2Ohfgpl7CVD6 7xac/RUe+6NN+1XKvA== X-Received: by 2002:a05:7300:ec07:b0:302:b44b:b64a with SMTP id 5a478bee46e88-3039785c81fmr7064800eec.1.1779153598298; Mon, 18 May 2026 18:19:58 -0700 (PDT) Received: from ethan-latitude5420.. (host-127-24.cafrjco.fresno.ca.us.clients.pavlovmedia.net. [68.180.127.24]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30296dcb6adsm17034305eec.15.2026.05.18.18.19.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 18:19:57 -0700 (PDT) From: Ethan Nelson-Moore To: linux-kernel@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-mips@vger.kernel.org, linux-openrisc@vger.kernel.org, linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org Cc: Ethan Nelson-Moore , Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Brian Cain , Huacai Chen , WANG Xuerui , Geert Uytterhoeven , Michal Simek , Thomas Bogendoerfer , Dinh Nguyen , Jonas Bonn , Stefan Kristiansson , Stafford Horne , "James E.J. Bottomley" , Helge Deller , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , "David S. Miller" , Andreas Larsson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Chris Zankel , Max Filippov , Arnd Bergmann Subject: [PATCH] Generate and remove identical copies in all architectures Date: Mon, 18 May 2026 18:18:41 -0700 Message-ID: <20260519011928.78398-1-enelsonmoore@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Every architecture supported by the kernel has a functionally identical copy of which simply includes , even though it is also present in asm-generic. Eliminate this unnecessary complexity by adding to the list of mandatory asm headers, which causes a copy of it that includes to be generated automatically. Signed-off-by: Ethan Nelson-Moore --- arch/arc/include/asm/asm-offsets.h | 6 ------ arch/arm/include/asm/asm-offsets.h | 1 - arch/arm64/include/asm/asm-offsets.h | 1 - arch/hexagon/include/asm/asm-offsets.h | 1 - arch/loongarch/include/asm/asm-offsets.h | 5 ----- arch/m68k/include/asm/asm-offsets.h | 1 - arch/microblaze/include/asm/asm-offsets.h | 1 - arch/mips/include/asm/asm-offsets.h | 1 - arch/nios2/include/asm/asm-offsets.h | 7 ------- arch/openrisc/include/asm/asm-offsets.h | 1 - arch/parisc/include/asm/asm-offsets.h | 1 - arch/powerpc/include/asm/asm-offsets.h | 1 - arch/riscv/include/asm/asm-offsets.h | 1 - arch/sh/include/asm/asm-offsets.h | 2 -- arch/sparc/include/asm/asm-offsets.h | 1 - arch/x86/include/asm/asm-offsets.h | 1 - arch/xtensa/include/asm/asm-offsets.h | 1 - include/asm-generic/Kbuild | 1 + 18 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 arch/arc/include/asm/asm-offsets.h delete mode 100644 arch/arm/include/asm/asm-offsets.h delete mode 100644 arch/arm64/include/asm/asm-offsets.h delete mode 100644 arch/hexagon/include/asm/asm-offsets.h delete mode 100644 arch/loongarch/include/asm/asm-offsets.h delete mode 100644 arch/m68k/include/asm/asm-offsets.h delete mode 100644 arch/microblaze/include/asm/asm-offsets.h delete mode 100644 arch/mips/include/asm/asm-offsets.h delete mode 100644 arch/nios2/include/asm/asm-offsets.h delete mode 100644 arch/openrisc/include/asm/asm-offsets.h delete mode 100644 arch/parisc/include/asm/asm-offsets.h delete mode 100644 arch/powerpc/include/asm/asm-offsets.h delete mode 100644 arch/riscv/include/asm/asm-offsets.h delete mode 100644 arch/sh/include/asm/asm-offsets.h delete mode 100644 arch/sparc/include/asm/asm-offsets.h delete mode 100644 arch/x86/include/asm/asm-offsets.h delete mode 100644 arch/xtensa/include/asm/asm-offsets.h diff --git a/arch/arc/include/asm/asm-offsets.h b/arch/arc/include/asm/asm-= offsets.h deleted file mode 100644 index 32a1d3d518dc..000000000000 --- a/arch/arc/include/asm/asm-offsets.h +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.c= om) - */ - -#include diff --git a/arch/arm/include/asm/asm-offsets.h b/arch/arm/include/asm/asm-= offsets.h deleted file mode 100644 index d370ee36a182..000000000000 --- a/arch/arm/include/asm/asm-offsets.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/arm64/include/asm/asm-offsets.h b/arch/arm64/include/asm/= asm-offsets.h deleted file mode 100644 index d370ee36a182..000000000000 --- a/arch/arm64/include/asm/asm-offsets.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/hexagon/include/asm/asm-offsets.h b/arch/hexagon/include/= asm/asm-offsets.h deleted file mode 100644 index d370ee36a182..000000000000 --- a/arch/hexagon/include/asm/asm-offsets.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/loongarch/include/asm/asm-offsets.h b/arch/loongarch/incl= ude/asm/asm-offsets.h deleted file mode 100644 index d9ad88d293e7..000000000000 --- a/arch/loongarch/include/asm/asm-offsets.h +++ /dev/null @@ -1,5 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * Copyright (C) 2020-2022 Loongson Technology Corporation Limited - */ -#include diff --git a/arch/m68k/include/asm/asm-offsets.h b/arch/m68k/include/asm/as= m-offsets.h deleted file mode 100644 index d370ee36a182..000000000000 --- a/arch/m68k/include/asm/asm-offsets.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/microblaze/include/asm/asm-offsets.h b/arch/microblaze/in= clude/asm/asm-offsets.h deleted file mode 100644 index d370ee36a182..000000000000 --- a/arch/microblaze/include/asm/asm-offsets.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/mips/include/asm/asm-offsets.h b/arch/mips/include/asm/as= m-offsets.h deleted file mode 100644 index d370ee36a182..000000000000 --- a/arch/mips/include/asm/asm-offsets.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/nios2/include/asm/asm-offsets.h b/arch/nios2/include/asm/= asm-offsets.h deleted file mode 100644 index e51465213b53..000000000000 --- a/arch/nios2/include/asm/asm-offsets.h +++ /dev/null @@ -1,7 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * Copyright (C) 2010 Tobias Klauser - * Copyright (C) 2009 Thomas Chou - */ - -#include diff --git a/arch/openrisc/include/asm/asm-offsets.h b/arch/openrisc/includ= e/asm/asm-offsets.h deleted file mode 100644 index d370ee36a182..000000000000 --- a/arch/openrisc/include/asm/asm-offsets.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/parisc/include/asm/asm-offsets.h b/arch/parisc/include/as= m/asm-offsets.h deleted file mode 100644 index d370ee36a182..000000000000 --- a/arch/parisc/include/asm/asm-offsets.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/powerpc/include/asm/asm-offsets.h b/arch/powerpc/include/= asm/asm-offsets.h deleted file mode 100644 index d370ee36a182..000000000000 --- a/arch/powerpc/include/asm/asm-offsets.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/riscv/include/asm/asm-offsets.h b/arch/riscv/include/asm/= asm-offsets.h deleted file mode 100644 index d370ee36a182..000000000000 --- a/arch/riscv/include/asm/asm-offsets.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/sh/include/asm/asm-offsets.h b/arch/sh/include/asm/asm-of= fsets.h deleted file mode 100644 index 9f8535716392..000000000000 --- a/arch/sh/include/asm/asm-offsets.h +++ /dev/null @@ -1,2 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#include diff --git a/arch/sparc/include/asm/asm-offsets.h b/arch/sparc/include/asm/= asm-offsets.h deleted file mode 100644 index d370ee36a182..000000000000 --- a/arch/sparc/include/asm/asm-offsets.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/x86/include/asm/asm-offsets.h b/arch/x86/include/asm/asm-= offsets.h deleted file mode 100644 index d370ee36a182..000000000000 --- a/arch/x86/include/asm/asm-offsets.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/arch/xtensa/include/asm/asm-offsets.h b/arch/xtensa/include/as= m/asm-offsets.h deleted file mode 100644 index d370ee36a182..000000000000 --- a/arch/xtensa/include/asm/asm-offsets.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild index 2c53a1e0b760..9879bba63a38 100644 --- a/include/asm-generic/Kbuild +++ b/include/asm-generic/Kbuild @@ -6,6 +6,7 @@ =20 mandatory-y +=3D atomic.h mandatory-y +=3D archrandom.h +mandatory-y +=3D asm-offsets.h mandatory-y +=3D barrier.h mandatory-y +=3D bitops.h mandatory-y +=3D bug.h --=20 2.43.0