From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7938DBA33 for ; Tue, 12 Dec 2023 05:45:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rNtxqUYc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4CAEC433C8; Tue, 12 Dec 2023 05:45:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702359911; bh=mHTlLv30/N1FGCwE1RN2Idzyae1yHlvZ/uAAgfjPKQw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=rNtxqUYc1im8TipwhJQJsspUs+vROyW3CZNv26KJu9Kz+SyIcZSTYmcABoPs06z/R B3xZzFtGY966zdTdLhuiVp6HEFMYSKKSJCHekwrJ58qWRs9Wn+LMxek67p8xmo3Ar2 WogE+dv43o+St165tvUdZVMfnzIon5IBUHv6lOmDcSUBqyJ8SAp1OLAmxUuYp4saFv JEhfnPkP+Ho3w8s2Xmoe+fn0uvG1MeBeeMXZZGesL7zRuCGYHbfW859f2C3TQS9Gnc 0+WbxEOSqGcnPEoVl/gMDQXM5cMd7R24yVgsBpoC3Er77x+7pEbhdKJ7BoEwQyIz/C TIGa4Hbx4VMeg== Message-ID: Date: Mon, 11 Dec 2023 21:45:11 -0800 Precedence: bulk X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC][PATCHES] getting rid of asm/unaligned.h includes Content-Language: en-US To: Al Viro , linux-arch@vger.kernel.org Cc: Helge Deller , Greg Kroah-Hartman References: <20231212024920.GG1674809@ZenIV> From: Vineet Gupta In-Reply-To: <20231212024920.GG1674809@ZenIV> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 12/11/23 18:49, Al Viro wrote: > The most common include of asm/*.h is that of asm/unaligned.h. > However, asm/unaligned.h is almost always the same - on everything > other than arc and parisc it's simply an autogenerated include of > asm-generic/unaligned.h. These two architectures do have asm/unaligned.h > of their own. However, both instances consist of include of the same > asm-generic/unaligned.h plus a few definitions that are never used outside > of arch/{arc,parisc}/kernel/{trap,unaligned}.c. > > Separating that cruft into arch/{arc,parisc}/kernel/unaligned.h > allows to kill *all* asm/unaligned.h instances. The first patch in the > series does just that; the rest can be done mechanically just before > the next -rc1 - remove unaligned.h from mandatory-y, move the file from > asm-generic to linux and do a global search-and-replace of asm/unaligned.h > to linux/unaligned.h. > > I've put that into > git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git #headers.unaligned > (both getting rid of non-default asm/unaligned.h instances and the mechanical > followup conversion). The former patch follows below, the latter ends up > being 10963 lines long, so if you want to see it, look at > https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/commit/?h=headers.unaligned&id=959598f725aa7721a4bad53c2e997c7255ff32dc > In any case, the second one is just for illustration purpose - it ought to be > regenerated just before the close of next merge window. > > I hadn't found any regressions on cross-builds. Not sure which > tree should that stuff go through; suggestions? Anything that makes the 2nd patch easier for you works for me. I don't anticipate any conflicts in this area so you could keep it simple and keep arch patches in your tree along side the 2nd one and let them go directly to Linus whenever that happens. > From 286cfede3d8ca0fad1528a61293650aa6d63be58 Mon Sep 17 00:00:00 2001 > From: Al Viro > Date: Tue, 5 Dec 2023 21:53:22 -0500 > Subject: [PATCH 1/2] arc, parisc: get rid of private asm/unaligned.h > > Declarations local to arch/*/kernel/*.c are better off *not* in a public > header - arch/{arc,parisc}/kernel/unaligned.h is just fine for those > bits. > > With that done these asm/unaligned.h instances are reduced to include > of asm-generic/unaligned.h and can be removed - unaligned.h is in > mandatory-y in include/asm-generic/Kbuild. > > Signed-off-by: Al Viro Acked-by: Vineet Gupta   #arch/arc