From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f194.google.com (mail-dy1-f194.google.com [74.125.82.194]) (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 4484A54768 for ; Tue, 19 May 2026 01:19:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779153601; cv=none; b=qv/sC3fyYj8L9REDz+DMuPjjy2bNV52v/BgCMLUA92Dghs1P7zRTxqoHX5J2XUEC3Yjlp/OlDeav2stjThskbN7/9pokA1MxvZQJs3xxbGr/hn7ET49nPmwYjYHS+ZxxH5w5D2UwVzaL0wwj1OfUlidvhxJHObVe4E5TO1E+c6s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779153601; c=relaxed/simple; bh=uC/YTHZQN/5OVj8zrqwkRVYTiYsHlJGxeqoHIVP2gds=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=os0mqWc+aZNC5+bPNivVy7O1TP1a0qW+NVdtxNfcBIuKNh3x2br5HZKPma8g2eJmmCZK/nDtNc7qgi47vfBAtmwbJskdM3hvSEOjzZGwUcL1RnS6F5jC9W4n09jyGSUba/o90p1fyIdeeJjguP7j9318cS4s904fFKeKc4elcm8= 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.194 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-f194.google.com with SMTP id 5a478bee46e88-2bdcf5970cdso1885419eec.0 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=h3GOl2HlZdx0tSlAE4e+P3Ycgbrtb4MbHoSCUpWs1urbmaOeRaYpYk//YdZ4wYFlov 9sAuGvuEaOx//pPa3nUZzflmPaVAc8MiA1eqMe6tFbeWoDSXPWgCkCgjf0U5OxT8Nx+m 8E1KQsstwGYYrNmnkyHP9SlW+/FfeEb4u8Zgjm/a9ccfZ95BLlo8TJTl9A3rRKJvgb6G Y8EGN2wHrnIDQ5QWm4hr/hCxW3yqVUcnmmAMzkXBMmwJ8XF9T2QdnQGV3Mek4jJ+wUYf pE8FFdXsftz8MUgy/MPD9KR+Vq2mkiQV+AXhcvyHkqWtYZaVosatZg0ttG/myTCfZ6Rp B+kA== X-Forwarded-Encrypted: i=1; AFNElJ+SpLdouShMrFfLjFtg6+QK92CvvfxDabgCEJRRnn/MtXxRaBMy5kdF61I533gbMKGa0e8GVfek7r91@vger.kernel.org X-Gm-Message-State: AOJu0Yyp1QKAHhbpBxMkVS/4TrLObQ6bbreeVQmvrypkPnzDr7CYanwi GDuOdBqjbv/rQ4Ts6HsumRXNoHSkM5grZ01PQMvuodGOadR228BlFYX8 X-Gm-Gg: Acq92OE+VRkWzR7ts8E+PwovoeX83V2gY2r38AVYJlvH1PAUpTwl6MbOZkYVFeEYtAV IGm/v6VSsl59Y7uCQjElwuAL2nAWW0s2zR+2lF4Z95AVxQlPpQ+VIy/ceYnvlCdAcmazDekw0Dq s0MLfRLphUbjVTazhqUkLoWiKclbll9g4rkOlPL8Ybof2frmVmuCBe7QzLC5meYbTuFBokImzIi 2ctn2l0CbTbahNkNonp1gv5O9AsSNTMxji22BewlVeqlASCw8q+QBE1yx+mYXBfdNgjo4k1AEBL WpJUypsY6bmbj3Te6JYstZZQjmVete9RLIEgqI5uhewzFYkhD6suLCR4FyDW/ZeRapBBnQDdkBK Me9pwlgij6N2DbXFHeDjd+Yg+OMt+TLo+Lep2fS88/LC4ofTWo9Qu/wdMnoZeGtvy7Z4OnrM75q RqWgG/C65nikqkuFbluPy2iC8zQj5sSRSugkLkkPzENkP4PfSHiZurKvZHH9aHlDpehmYowmeQQ m6MZcCNEPHW7Q2ayQgTc1kUf+ImxjcAvYa6fnVUdqcOxhPwL6tvsvEkyZPpBRabi1Gt47mj0a4/ tPaIgtEyn4utkuv5/w== 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-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.com) - */ - -#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/include/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/asm-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/include/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/asm-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/include/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/asm/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-offsets.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/asm/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 @@ mandatory-y += atomic.h mandatory-y += archrandom.h +mandatory-y += asm-offsets.h mandatory-y += barrier.h mandatory-y += bitops.h mandatory-y += bug.h -- 2.43.0