From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH] Extract initrd free logic from arch-specific code. Date: Fri, 30 Mar 2018 13:15:17 +0200 Message-ID: <20180330111517.rrx6gs2skkgk336j@gmail.com> References: <20180325221853.10839-1-shea@shealevy.com> <20180328152714.6103-1-shea@shealevy.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sY9jnuFT0fGYXfClv/mflt7N68mOMZy57Q9CINBz+2A=; b=CNcf87GROxu5u1 0Cd39xIlzR8LZFVtF6lyi5cKm1erVgta+H/F2vY/T/oWm95AaKKdJMPXUtEyiOHifVz4rPsVrsOlN aFTOE6NSik3ccoeD8zUFJyHlppspwPGNHrOG5zmoTwTvMXAoqxc+vPP0uFqoGB3sEFOyPxax/MDQL CmTjycvtBeNwwDHQYr/h1S90k3dmp1PVBsMKaARWhONdr1F42J/9eU99903bvXaendIeDbZVh0Z88 YiPSNubFzYEz7dbaDLtxEGgmsU4/uoQ6cbl/i8gHhPUN/jR5PkiqPlb8alRjVMPvjwuI/q2MsUQrv QewkWe2ckDnonnp4b/Pw==; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rXlwKiGp/tjcc21tBymr4J+1neoT8IuyCWGzifMsAiI=; b=fysDn56UqnevxUbaoy1VRSzbBB9C98IilJevPKrf40kajh/UE6Q/LFUDrC3h3W+2oq Cxj8mLmKm+NsKsifdFebdo6U3/ZfNlWDiH2Vw2x6vJCf6aF4IMLydRLAv2ndcykXwu19 KLy8K7VJ3BAQxRxf7bLEgHfvjdeV41uzrzGopnPQqwqmIp1xPTg19h6XZxcf5odYH9ZD 13eX/w907kli8eOg47jTAluybo8ursolJV387ocdiq8ee4sz4tQBrh1niCQ4fz/aZYDf tlZeXxiszp6F0z5MPSRLvoV6iVPlgpaln8NGoPxSGXLVmxm+msY7aCC83RCri+PxtG5h FIEw== Content-Disposition: inline In-Reply-To: <20180328152714.6103-1-shea@shealevy.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+gla-linux-snps-arc=m.gmane.org@lists.infradead.org To: Shea Levy Cc: linux-mips@linux-mips.org, linux-sh@vger.kernel.org, Benjamin Herrenschmidt , Linus Walleij , Will Deacon , Paul Mackerras , Michael Ellerman , "James E.J. Bottomley" , Christoph Hellwig , Geert Uytterhoeven , Catalin Marinas , Matt Turner , Eugeniy Paltsev , uclinux-h8-devel@lists.sourceforge.jp, Vladimir Murzin , Marc Zyngier , adi-buildroot-devel@lists.sourceforge.net, Al Viro , Thomas Gleixner , Richard Henderson , linux-cris-kernel@axis.com, Greg Kroah-Hartman , linux-kernel@vger.kerne * Shea Levy wrote: > Now only those architectures that have custom initrd free requirements > need to define free_initrd_mem. > > Signed-off-by: Shea Levy Please put the Kconfig symbol name this patch introduces both into the title, so that people know what to grep for. > --- > arch/alpha/mm/init.c | 8 -------- > arch/arc/mm/init.c | 7 ------- > arch/arm/Kconfig | 1 + > arch/arm64/Kconfig | 1 + > arch/blackfin/Kconfig | 1 + > arch/c6x/mm/init.c | 7 ------- > arch/cris/Kconfig | 1 + > arch/frv/mm/init.c | 11 ----------- > arch/h8300/mm/init.c | 7 ------- > arch/hexagon/Kconfig | 1 + > arch/ia64/Kconfig | 1 + > arch/m32r/Kconfig | 1 + > arch/m32r/mm/init.c | 11 ----------- > arch/m68k/mm/init.c | 7 ------- > arch/metag/Kconfig | 1 + > arch/microblaze/mm/init.c | 7 ------- > arch/mips/Kconfig | 1 + > arch/mn10300/Kconfig | 1 + > arch/nios2/mm/init.c | 7 ------- > arch/openrisc/mm/init.c | 7 ------- > arch/parisc/mm/init.c | 7 ------- > arch/powerpc/mm/mem.c | 7 ------- > arch/riscv/mm/init.c | 6 ------ > arch/s390/Kconfig | 1 + > arch/score/Kconfig | 1 + > arch/sh/mm/init.c | 7 ------- > arch/sparc/Kconfig | 1 + > arch/tile/Kconfig | 1 + > arch/um/kernel/mem.c | 7 ------- > arch/unicore32/Kconfig | 1 + > arch/x86/Kconfig | 1 + > arch/xtensa/Kconfig | 1 + > init/initramfs.c | 7 +++++++ > usr/Kconfig | 4 ++++ > 34 files changed, 28 insertions(+), 113 deletions(-) Please also put it into Documentation/features/. > diff --git a/usr/Kconfig b/usr/Kconfig > index 43658b8a975e..7a94f6df39bf 100644 > --- a/usr/Kconfig > +++ b/usr/Kconfig > @@ -233,3 +233,7 @@ config INITRAMFS_COMPRESSION > default ".lzma" if RD_LZMA > default ".bz2" if RD_BZIP2 > default "" > + > +config HAVE_ARCH_FREE_INITRD_MEM > + bool > + default n Help text would be nice, to tell arch maintainers what the purpose of this switch is. Also, a nit, I think this should be named "ARCH_HAS_FREE_INITRD_MEM", which is the dominant pattern: triton:~/tip> git grep 'select.*ARCH' arch/x86/Kconfig* | cut -f2 | cut -d_ -f1-2 | sort | uniq -c | sort -n ... 2 select ARCH_USES 2 select ARCH_WANTS 3 select ARCH_MIGHT 3 select ARCH_WANT 4 select ARCH_SUPPORTS 4 select ARCH_USE 16 select HAVE_ARCH 23 select ARCH_HAS It also reads nicely in English: "arch has free_initrd_mem()" While the other makes little sense: "have arch free_initrd_mem()" ? Thanks, Ingo