From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shea Levy Subject: Re: [PATCH] Extract initrd free logic from arch-specific code. Date: Sun, 01 Apr 2018 11:05:21 -0400 Message-ID: <87bmf3rmq6.fsf@xps13.shealevy.com> References: <20180325221853.10839-1-shea@shealevy.com> <20180328152714.6103-1-shea@shealevy.com> <20180330111517.rrx6gs2skkgk336j@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7840985626795173511==" 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 To: Ingo Molnar Return-path: In-Reply-To: <20180330111517.rrx6gs2skkgk336j@gmail.com> List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-snps-arc-bounces+gla-linux-snps-arc=m.gmane.org@lists.infradead.org --===============7840985626795173511== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Ingo, Ingo Molnar writes: > * Shea Levy wrote: > >> Now only those architectures that have custom initrd free requirements >> need to define free_initrd_mem. >>=20 >> Signed-off-by: Shea Levy > > Please put the Kconfig symbol name this patch introduces both into the ti= tle, so=20 > 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/. > I switched this patch series (the latest revision v6 was just posted) to using weak symbols instead of Kconfig. Does it still warrant documentation? > >> 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 thi= s switch=20 > is. > > Also, a nit, I think this should be named "ARCH_HAS_FREE_INITRD_MEM", whi= ch is the=20 > 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 Thanks, Shea --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE6ESKvwKkwnxgMLnaXAvWlX2G/icFAlrA9TEACgkQXAvWlX2G /ieu+w/9EljMoicXq5AAY0iiZCVMRqXrkcnMT+1jcMEtLA8mLL1ibZrYLGALlTF+ +M0+7Nn2Gs9Nfna/5Mj+IW+WiQ93nFKqKWL22tBheoM6at3oZsOtX0oBI4mB9eIT kzwUcCpCQDXvyuVbsV6XqJkCAlpYBAFE2wquWM6DVovxW91kN8cQpP3qZGtTKMkr DMAe4LUUbM40/dDsHu43aoFb08mCct1TLf4W/CGMxSapt+8SYow7I6w1QuTJ9NYk zTDJuV6J2xP5x4h7zPnzKA/wBkYhMrzgiMC0o3EeKWFUSa+3yCWM+dvHFzqqaz5/ jW0FUCI3mVaJgkDcdDp41mqI69WqYfpqp9LXdEjuQXRl/m9/icJL41/91XUHEfOk k3N6HdGi7eEQ93Qo3Yv4ohr9YlK1Ah7vPK3Zq5c69k4T+sVnk5C1k/wtUkceEfGy mgXXL9FxfFi7LpMxEpLsr8NpgkV38H1L4wanzwJGgJAeqn+bqUbhactKwl9AO7mR u2xDrICYqEDR6bPuPHQQaF0UrsAR0uyfUGUEnuFLlTdrfgY3cpod5D+UKYCohDCC iWuHhKxUY0SQrq99eS9oQD5JSyhqGWF61/nDzMLJ/ApFFBURUiIiW2V4NoRNMB/N +lyDeFwyn4ApvGm5GvQlfnkaWew/0jVqx9iihclpvw3yNRSbm1M= =FCRP -----END PGP SIGNATURE----- --=-=-=-- --===============7840985626795173511== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc --===============7840985626795173511==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AIpwx49xdR4D+VNStalX9t9IJOZG/UpaSNi4bw3oo5kN5PQjKi63tgvFQbYpGCaf1dmxFhdjH+eo ARC-Seal: i=1; a=rsa-sha256; t=1522595129; cv=none; d=google.com; s=arc-20160816; b=VdAwg/pg/Rgf8XibCL2Tu24DGO4Cc/fiTBtNXi2a+55nUcR5vHqQWPWkoXoaJU2nzb xZ2oOhqCthmJDBpBFtNMt6HcmQki9yo0rMY5jTofv6DWXrhzmUus2JyC4MoTNWMG/tpE FxwG8QhPdl6atOmWo5hzIRFkzud33tEKDhnKbKjSHWAtT0xgrPIeBvUF7bqpkfYrKSU0 JRLCDIJVzfUqefz6hn5zCuPvAR+6PapfrIu9UcOXeHQNd0Y3XLjtSwUgvOS96H+LUp5x REQwd35Bv3lvH4OaIX51v+8YqGVHNyG2w6E2Z0wvTcCHmfm4R+xDtqArohy9hVsPhgCC PKuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:arc-authentication-results; bh=J3jv/pPqMXT8UEwIXCGz7aVFAx153VZP/6fao73D8xs=; b=IKohmuWVJN+XafGf+c1pSLUu0LQ21mnSsvSD/SUOedGLvfR7Jffhv//ZZV7opMRuWp YfR7mXeZcVaUUK9QY0QLVLAm0Wzjwdv88uZyssK2G7jyEgt4awxkjzK2t6mI6xYwy1Om MUuIXW2ugSvGwohGgcEqNC+yN+uDjnHYHfDgqzqNR6LczRr6G5c+1AE2Y6jmpMXZpMfz k+SFOK0IQDsdW5zJrAogFHax6nvg7OYObAITrs1mnfttfUN710XVktuwlLab7zQdYiiY eOsCEpWXNvOZMUkPIAn+WjdO+vILM1AFOn8kd6sCej+vLnqJNxuh3/+rVbJ1h40SJSpa B3Tg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of shea@shealevy.com designates 216.40.44.112 as permitted sender) smtp.mailfrom=shea@shealevy.com Authentication-Results: mx.google.com; spf=pass (google.com: domain of shea@shealevy.com designates 216.40.44.112 as permitted sender) smtp.mailfrom=shea@shealevy.com X-Session-Marker: 7368656140736865616C6576792E636F6D X-Spam-Summary: X-HE-Tag: comb88_11e6e5a2a4c21 X-Filterd-Recvd-Size: 8704 From: Shea Levy To: Ingo Molnar Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Mark Salter , Aurelien Jacquiot , Mikael Starvik , Jesper Nilsson , Yoshinori Sato , Richard Kuo , Tony Luck , Fenghua Yu , Geert Uytterhoeven , James Hogan , Michal Simek , Ralf Baechle , David Howells , Ley Foon Tan , Jonas Bonn , Stefan Kristiansson , Stafford Horne , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Palmer Dabbelt , Albert Ou , Martin Schwidefsky , Heiko Carstens , Chen Liqin , Lennox Wu , Rich Felker , "David S. Miller" , Jeff Dike , Richard Weinberger , Guan Xuetao , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Chris Zankel , Max Filippov , Kate Stewart , Greg Kroah-Hartman , Philippe Ombredanne , Eugeniy Paltsev , Al Viro , Vladimir Murzin , Linus Walleij , Michal Hocko , Andrew Morton , Sudip Mukherjee , Marc Zyngier , Rob Herring , Kees Cook , Vlastimil Babka , Balbir Singh , Christophe Leroy , Joe Perches , Oliver O'Halloran , Dan Williams , Wei Yang , Christian =?utf-8?Q?K=C3=B6nig?= , Arnd Bergmann , Deepa Dinamani , Daniel Thompson , Rob Landley , Florian Fainelli , linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, adi-buildroot-devel@lists.sourceforge.net, linux-c6x-dev@linux-c6x.org, linux-cris-kernel@axis.com, uclinux-h8-devel@lists.sourceforge.jp, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linux-am33-list@redhat.com, nios2-dev@lists.rocketboards.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, user-mode-linux-devel@lists.sourceforge.net, user-mode-linux-user@lists.sourceforge.net, linux-xtensa@linux-xtensa.org Subject: Re: [PATCH] Extract initrd free logic from arch-specific code. In-Reply-To: <20180330111517.rrx6gs2skkgk336j@gmail.com> References: <20180325221853.10839-1-shea@shealevy.com> <20180328152714.6103-1-shea@shealevy.com> <20180330111517.rrx6gs2skkgk336j@gmail.com> Date: Sun, 01 Apr 2018 11:05:21 -0400 Message-ID: <87bmf3rmq6.fsf@xps13.shealevy.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1596195734883590774?= X-GMAIL-MSGID: =?utf-8?q?1596556710294693098?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Ingo, Ingo Molnar writes: > * Shea Levy wrote: > >> Now only those architectures that have custom initrd free requirements >> need to define free_initrd_mem. >>=20 >> Signed-off-by: Shea Levy > > Please put the Kconfig symbol name this patch introduces both into the ti= tle, so=20 > 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/. > I switched this patch series (the latest revision v6 was just posted) to using weak symbols instead of Kconfig. Does it still warrant documentation? > >> 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 thi= s switch=20 > is. > > Also, a nit, I think this should be named "ARCH_HAS_FREE_INITRD_MEM", whi= ch is the=20 > 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 Thanks, Shea --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE6ESKvwKkwnxgMLnaXAvWlX2G/icFAlrA9TEACgkQXAvWlX2G /ieu+w/9EljMoicXq5AAY0iiZCVMRqXrkcnMT+1jcMEtLA8mLL1ibZrYLGALlTF+ +M0+7Nn2Gs9Nfna/5Mj+IW+WiQ93nFKqKWL22tBheoM6at3oZsOtX0oBI4mB9eIT kzwUcCpCQDXvyuVbsV6XqJkCAlpYBAFE2wquWM6DVovxW91kN8cQpP3qZGtTKMkr DMAe4LUUbM40/dDsHu43aoFb08mCct1TLf4W/CGMxSapt+8SYow7I6w1QuTJ9NYk zTDJuV6J2xP5x4h7zPnzKA/wBkYhMrzgiMC0o3EeKWFUSa+3yCWM+dvHFzqqaz5/ jW0FUCI3mVaJgkDcdDp41mqI69WqYfpqp9LXdEjuQXRl/m9/icJL41/91XUHEfOk k3N6HdGi7eEQ93Qo3Yv4ohr9YlK1Ah7vPK3Zq5c69k4T+sVnk5C1k/wtUkceEfGy mgXXL9FxfFi7LpMxEpLsr8NpgkV38H1L4wanzwJGgJAeqn+bqUbhactKwl9AO7mR u2xDrICYqEDR6bPuPHQQaF0UrsAR0uyfUGUEnuFLlTdrfgY3cpod5D+UKYCohDCC iWuHhKxUY0SQrq99eS9oQD5JSyhqGWF61/nDzMLJ/ApFFBURUiIiW2V4NoRNMB/N +lyDeFwyn4ApvGm5GvQlfnkaWew/0jVqx9iihclpvw3yNRSbm1M= =FCRP -----END PGP SIGNATURE----- --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: shea@shealevy.com (Shea Levy) Date: Sun, 01 Apr 2018 11:05:21 -0400 Subject: [PATCH] Extract initrd free logic from arch-specific code. In-Reply-To: <20180330111517.rrx6gs2skkgk336j@gmail.com> References: <20180325221853.10839-1-shea@shealevy.com> <20180328152714.6103-1-shea@shealevy.com> <20180330111517.rrx6gs2skkgk336j@gmail.com> Message-ID: <87bmf3rmq6.fsf@xps13.shealevy.com> To: linux-riscv@lists.infradead.org List-Id: linux-riscv.lists.infradead.org Hi Ingo, Ingo Molnar writes: > * 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/. > I switched this patch series (the latest revision v6 was just posted) to using weak symbols instead of Kconfig. Does it still warrant documentation? > >> 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 Thanks, Shea -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From mboxrd@z Thu Jan 1 00:00:00 1970 From: shea@shealevy.com (Shea Levy) Date: Sun, 01 Apr 2018 11:05:21 -0400 Subject: [PATCH] Extract initrd free logic from arch-specific code. In-Reply-To: <20180330111517.rrx6gs2skkgk336j@gmail.com> References: <20180325221853.10839-1-shea@shealevy.com> <20180328152714.6103-1-shea@shealevy.com> <20180330111517.rrx6gs2skkgk336j@gmail.com> List-ID: Message-ID: <87bmf3rmq6.fsf@xps13.shealevy.com> To: linux-snps-arc@lists.infradead.org Hi Ingo, Ingo Molnar writes: > * 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/. > I switched this patch series (the latest revision v6 was just posted) to using weak symbols instead of Kconfig. Does it still warrant documentation? > >> 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 Thanks, Shea -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shea Levy Date: Sun, 01 Apr 2018 11:05:21 -0400 Subject: [OpenRISC] [PATCH] Extract initrd free logic from arch-specific code. In-Reply-To: <20180330111517.rrx6gs2skkgk336j@gmail.com> References: <20180325221853.10839-1-shea@shealevy.com> <20180328152714.6103-1-shea@shealevy.com> <20180330111517.rrx6gs2skkgk336j@gmail.com> Message-ID: <87bmf3rmq6.fsf@xps13.shealevy.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org Hi Ingo, Ingo Molnar writes: > * 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/. > I switched this patch series (the latest revision v6 was just posted) to using weak symbols instead of Kconfig. Does it still warrant documentation? > >> 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 Thanks, Shea -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: