linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: Shea Levy <shea@shealevy.com>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: "Christoph Hellwig" <hch@infradead.org>,
	"Richard Henderson" <rth@twiddle.net>,
	"Ivan Kokshaysky" <ink@jurassic.park.msu.ru>,
	"Matt Turner" <mattst88@gmail.com>,
	"Vineet Gupta" <vgupta@synopsys.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will.deacon@arm.com>,
	"Mark Salter" <msalter@redhat.com>,
	"Aurelien Jacquiot" <jacquiot.aurelien@gmail.com>,
	"Mikael Starvik" <starvik@axis.com>,
	"Jesper Nilsson" <jesper.nilsson@axis.com>,
	"Yoshinori Sato" <ysato@users.sourceforge.jp>,
	"Richard Kuo" <rkuo@codeaurora.org>,
	"Tony Luck" <tony.luck@intel.com>,
	"Fenghua Yu" <fenghua.yu@intel.com>,
	"Geert Uytterhoeven" <geert@linux-m68k.org>,
	"James Hogan" <jhogan@kernel.org>,
	"Michal Simek" <monstr@monstr.eu>,
	"Ralf Baechle" <ralf@linux-mips.org>,
	"David Howells" <dhowells@redhat.com>,
	"Ley Foon Tan" <lftan@altera.com>,
	"Jonas Bonn" <jonas@southpole.se>,
	"Stefan Kristiansson" <stefan.kristiansson@saunalahti.fi>,
	"Stafford Horne" <shorne@gmail.com>,
	"James E.J. Bottomley" <jejb@parisc-linux.org>,
	"Helge Deller" <deller@gmx.de>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Paul Mackerras" <paulus@samba.org>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Palmer Dabbelt" <palmer@sifive.com>,
	"Albert Ou" <albert@sifive.com>,
	"Martin Schwidefsky" <schwidefsky@de.ibm.com>,
	"Heiko Carstens" <heiko.carstens@de.ibm.com>,
	"Chen Liqin" <liqin.linux@gmail.com>,
	"Lennox Wu" <lennox.wu@gmail.com>,
	"Rich Felker" <dalias@libc.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Jeff Dike" <jdike@addtoit.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Guan Xuetao" <gxt@mprc.pku.edu.cn>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, "Chris Zankel" <chris@zankel.net>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Kate Stewart" <kstewart@linuxfoundation.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Philippe Ombredanne" <pombredanne@nexb.com>,
	"Eugeniy Paltsev" <Eugeniy.Paltsev@synopsys.com>,
	"Al Viro" <viro@zeniv.linux.org.uk>,
	"Vladimir Murzin" <vladimir.murzin@arm.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Michal Hocko" <mhocko@suse.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Sudip Mukherjee" <sudipm.mukherjee@gmail.com>,
	"Marc Zyngier" <marc.zyngier@arm.com>,
	"Rob Herring" <robh@kernel.org>,
	"Kees Cook" <keescook@chromium.org>,
	"Vlastimil Babka" <vbabka@suse.cz>,
	"Balbir Singh" <bsingharora@gmail.com>,
	"Christophe Leroy" <christophe.leroy@c-s.fr>,
	"Joe Perches" <joe@perches.com>,
	"Oliver O'Halloran" <oohall@gmail.com>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Wei Yang" <richard.weiyang@gmail.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Deepa Dinamani" <deepa.kernel@gmail.com>,
	"Daniel Thompson" <daniel.thompson@linaro.org>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	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.
Date: Wed, 28 Mar 2018 10:58:51 -0500	[thread overview]
Message-ID: <05620fee-e8b5-0668-77b8-da073dc78c40@landley.net> (raw)
In-Reply-To: <20180328152714.6103-1-shea@shealevy.com>

On 03/28/2018 10:26 AM, Shea Levy wrote:
> Now only those architectures that have custom initrd free requirements
> need to define free_initrd_mem.
...
> --- a/arch/arc/mm/init.c
> +++ b/arch/arc/mm/init.c
> @@ -229,10 +229,3 @@ void __ref free_initmem(void)
>  {
>  	free_initmem_default(-1);
>  }
> -
> -#ifdef CONFIG_BLK_DEV_INITRD
> -void __init free_initrd_mem(unsigned long start, unsigned long end)
> -{
> -	free_reserved_area((void *)start, (void *)end, -1, "initrd");
> -}
> -#endif
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 3f972e83909b..19d1c5594e2d 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -47,6 +47,7 @@ config ARM
>  	select HARDIRQS_SW_RESEND
>  	select HAVE_ARCH_AUDITSYSCALL if (AEABI && !OABI_COMPAT)
>  	select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6
> +	select HAVE_ARCH_FREE_INITRD_MEM
>  	select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL && !CPU_ENDIAN_BE32 && MMU
>  	select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32 && MMU
>  	select HAVE_ARCH_MMAP_RND_BITS if MMU

Isn't this why weak symbols were invented?

Confused,

Rob

  reply	other threads:[~2018-03-28 15:58 UTC|newest]

Thread overview: 128+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-24 17:44 [PATCH 00/16] Generic infrastructure for unloading initramfs Shea Levy
2018-03-24 17:44 ` [PATCH 01/16] initrd: Add generic code path for common initrd unloading logic Shea Levy
2018-03-25 17:17   ` LEROY Christophe
2018-03-25 22:20     ` Shea Levy
2018-03-28 12:04   ` Christoph Hellwig
2018-03-28 12:23     ` Geert Uytterhoeven
2018-03-24 17:44 ` [PATCH 02/16] riscv: Use INITRAMFS_GENERIC_UNLOAD Shea Levy
2018-03-24 17:44 ` [PATCH 03/16] alpha: " Shea Levy
2018-03-24 17:44 ` [PATCH 04/16] arc: " Shea Levy
2018-03-24 17:44 ` [PATCH 05/16] c6x: " Shea Levy
2018-03-24 17:44 ` [PATCH 06/16] frv: " Shea Levy
2018-03-24 17:44 ` [PATCH 07/16] h8300: " Shea Levy
2018-03-24 17:44 ` [PATCH 08/16] m32r: " Shea Levy
2018-03-24 17:44 ` [PATCH 09/16] m68k: " Shea Levy
2018-03-24 17:44 ` [PATCH 10/16] microblaze: " Shea Levy
2018-03-24 17:44 ` [PATCH 11/16] nios2: " Shea Levy
2018-03-24 17:44 ` [PATCH 12/16] openrisc: " Shea Levy
2018-03-24 17:44 ` [PATCH 13/16] parisc: " Shea Levy
2018-03-24 17:44 ` [PATCH 14/16] powerpc: " Shea Levy
2018-03-24 17:44 ` [PATCH 15/16] sh: " Shea Levy
2018-03-24 17:44 ` [PATCH 16/16] um: " Shea Levy
2018-03-25 22:18 ` [PATCH v2 00/16] Generic infrastructure for unloading initramfs Shea Levy
2018-03-25 22:18   ` [PATCH v2 01/16] initrd: Add generic code path for common initrd unloading logic Shea Levy
2018-03-25 22:18   ` [PATCH v2 02/16] riscv: Use INITRAMFS_GENERIC_UNLOAD Shea Levy
2018-03-26  0:41     ` Palmer Dabbelt
2018-03-26  0:55       ` Shea Levy
2018-03-25 22:18   ` [PATCH v2 03/16] alpha: " Shea Levy
2018-03-25 22:18   ` [PATCH v2 04/16] arc: " Shea Levy
2018-03-25 22:18   ` [PATCH v2 05/16] c6x: " Shea Levy
2018-03-25 22:18   ` [PATCH v2 06/16] frv: " Shea Levy
2018-03-25 22:18   ` [PATCH v2 07/16] h8300: " Shea Levy
2018-03-25 22:18   ` [PATCH v2 08/16] m32r: " Shea Levy
2018-03-25 22:18   ` [PATCH v2 09/16] m68k: " Shea Levy
2018-03-25 22:18   ` [PATCH v2 10/16] microblaze: " Shea Levy
2018-03-25 22:18   ` [PATCH v2 11/16] nios2: " Shea Levy
2018-03-25 22:18   ` [PATCH v2 12/16] openrisc: " Shea Levy
2018-03-25 22:18   ` [PATCH v2 13/16] parisc: " Shea Levy
2018-03-25 22:18   ` [PATCH v2 14/16] powerpc: " Shea Levy
2018-03-25 22:18   ` [PATCH v2 15/16] sh: " Shea Levy
2018-03-25 22:18   ` [PATCH v2 16/16] um: " Shea Levy
2018-03-28 15:26   ` [PATCH] Extract initrd free logic from arch-specific code Shea Levy
2018-03-28 15:58     ` Rob Landley [this message]
2018-03-28 16:04       ` Shea Levy
2018-03-28 16:48       ` Russell King - ARM Linux
2018-03-28 19:04         ` Rob Landley
2018-03-28 22:14           ` Russell King - ARM Linux
2018-03-28 22:37             ` Oliver
2018-03-29  0:23               ` Nicholas Piggin
2018-03-29 15:27               ` Russell King - ARM Linux
2018-03-29 15:43                 ` Geert Uytterhoeven
2018-03-29 15:58                   ` Russell King - ARM Linux
2018-03-29 16:53                     ` Marc Zyngier
2018-03-29 17:32                       ` Russell King - ARM Linux
2018-03-29 17:53                         ` Marc Zyngier
2018-03-29 17:43                 ` Rob Landley
2018-03-29 16:39             ` Rob Landley
2018-03-29 17:31               ` Russell King - ARM Linux
2018-03-28 16:55     ` Kees Cook
2018-03-29  1:12       ` Wei Yang
2018-03-28 20:36     ` [PATCH v4 0/16] Generic initrd_free_mem Shea Levy
2018-03-28 20:36       ` [PATCH v4 01/16] initrd: Add weakly-linked generic free_initrd_mem Shea Levy
2018-03-28 20:36       ` [PATCH v4 02/16] riscv: Use " Shea Levy
2018-03-29  9:52         ` Daniel Thompson
2018-03-29 11:12           ` Shea Levy
2018-03-28 20:36       ` [PATCH v4 03/16] alpha: " Shea Levy
2018-03-28 20:36       ` [PATCH v4 04/16] arc: " Shea Levy
2018-03-28 20:36       ` [PATCH v4 05/16] c6x: " Shea Levy
2018-03-28 20:36       ` [PATCH v4 06/16] frv: " Shea Levy
2018-03-28 20:36       ` [PATCH v4 07/16] h8300: " Shea Levy
2018-03-28 20:36       ` [PATCH v4 08/16] m32r: " Shea Levy
2018-03-28 20:36       ` [PATCH v4 09/16] m68k: " Shea Levy
2018-03-29  6:55         ` Geert Uytterhoeven
2018-03-28 20:36       ` [PATCH v4 10/16] microblaze: " Shea Levy
2018-03-28 20:36       ` [PATCH v4 11/16] nios2: " Shea Levy
2018-03-28 20:36       ` [PATCH v4 12/16] openrisc: " Shea Levy
2018-03-28 20:36       ` [PATCH v4 13/16] parisc: " Shea Levy
2018-03-28 20:36       ` [PATCH v4 14/16] powerpc: " Shea Levy
2018-03-28 20:44         ` Joe Perches
2018-03-28 20:53           ` Shea Levy
2018-03-29 13:19             ` Michael Ellerman
2018-04-01 15:01               ` Shea Levy
2018-03-28 20:36       ` [PATCH v4 15/16] sh: " Shea Levy
2018-03-28 20:36       ` [PATCH v4 16/16] um: " Shea Levy
2018-03-29 11:31       ` [PATCH v5 01/16] initrd: Add weakly-linked " Shea Levy
2018-03-29 11:31         ` [PATCH v5 02/16] riscv: Free initrds with " Shea Levy
2018-03-29 11:31         ` [PATCH v5 03/16] alpha: Switch to " Shea Levy
2018-03-29 11:31         ` [PATCH v5 04/16] arc: " Shea Levy
2018-03-29 11:31         ` [PATCH v5 05/16] c6x: " Shea Levy
2018-03-29 11:31         ` [PATCH v5 06/16] frv: " Shea Levy
2018-03-29 11:31         ` [PATCH v5 07/16] h8300: " Shea Levy
2018-03-29 11:31         ` [PATCH v5 08/16] m32r: " Shea Levy
2018-03-29 11:32         ` [PATCH v5 09/16] m68k: " Shea Levy
2018-03-29 11:32         ` [PATCH v5 10/16] microblaze: " Shea Levy
2018-03-29 11:32         ` [PATCH v5 11/16] nios2: " Shea Levy
2018-03-29 11:32         ` [PATCH v5 12/16] openrisc: " Shea Levy
2018-03-29 11:50           ` Stafford Horne
2018-03-29 11:32         ` [PATCH v5 13/16] parisc: " Shea Levy
2018-03-29 11:32         ` [PATCH v5 14/16] powerpc: " Shea Levy
2018-03-29 11:32         ` [PATCH v5 15/16] sh: " Shea Levy
2018-03-29 16:26           ` Rich Felker
2018-03-29 11:32         ` [PATCH v5 16/16] um: " Shea Levy
2018-04-01 14:59         ` [PATCH v6 01/16] initrd: Add weakly-linked " Shea Levy
2018-04-01 14:59           ` [PATCH v6 02/16] riscv: Free initrds with " Shea Levy
2018-04-01 14:59           ` [PATCH v6 03/16] alpha: Switch to " Shea Levy
2018-04-01 14:59           ` [PATCH v6 04/16] arc: " Shea Levy
2018-04-04 15:21             ` Alexey Brodkin
2018-04-09 16:40             ` Vineet Gupta
2018-04-01 14:59           ` [PATCH v6 05/16] c6x: " Shea Levy
2018-04-19 16:37             ` Mark Salter
2018-04-01 14:59           ` [PATCH v6 06/16] frv: " Shea Levy
2018-04-01 14:59           ` [PATCH v6 07/16] h8300: " Shea Levy
2018-04-01 14:59           ` [PATCH v6 08/16] m32r: " Shea Levy
2018-04-01 14:59           ` [PATCH v6 09/16] m68k: " Shea Levy
2018-04-01 14:59           ` [PATCH v6 10/16] microblaze: " Shea Levy
2018-04-01 14:59           ` [PATCH v6 11/16] nios2: " Shea Levy
2018-04-02 16:04             ` Ley Foon Tan
2018-04-01 14:59           ` [PATCH v6 12/16] openrisc: " Shea Levy
2018-04-01 14:59           ` [PATCH v6 13/16] parisc: " Shea Levy
2018-04-02 20:07             ` Helge Deller
2018-04-01 14:59           ` [PATCH v6 14/16] powerpc: " Shea Levy
2018-04-01 14:59           ` [PATCH v6 15/16] sh: " Shea Levy
2018-04-01 14:59           ` [PATCH v6 16/16] um: " Shea Levy
2018-04-18 11:10           ` [PATCH v6 01/16] initrd: Add weakly-linked " Shea Levy
2018-04-20 20:22             ` Palmer Dabbelt
2018-04-20 22:50               ` Shea Levy
2018-05-09 11:15                 ` Shea Levy
2018-03-30 11:15     ` [PATCH] Extract initrd free logic from arch-specific code Ingo Molnar
2018-04-01 15:05       ` Shea Levy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05620fee-e8b5-0668-77b8-da073dc78c40@landley.net \
    --to=rob@landley.net \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=adi-buildroot-devel@lists.sourceforge.net \
    --cc=akpm@linux-foundation.org \
    --cc=albert@sifive.com \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=bsingharora@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=chris@zankel.net \
    --cc=christian.koenig@amd.com \
    --cc=christophe.leroy@c-s.fr \
    --cc=dalias@libc.org \
    --cc=dan.j.williams@intel.com \
    --cc=daniel.thompson@linaro.org \
    --cc=davem@davemloft.net \
    --cc=deepa.kernel@gmail.com \
    --cc=deller@gmx.de \
    --cc=dhowells@redhat.com \
    --cc=f.fainelli@gmail.com \
    --cc=fenghua.yu@intel.com \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=hch@infradead.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=jacquiot.aurelien@gmail.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=jdike@addtoit.com \
    --cc=jejb@parisc-linux.org \
    --cc=jesper.nilsson@axis.com \
    --cc=jhogan@kernel.org \
    --cc=joe@perches.com \
    --cc=jonas@southpole.se \
    --cc=keescook@chromium.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=lennox.wu@gmail.com \
    --cc=lftan@altera.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-am33-list@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-c6x-dev@linux-c6x.org \
    --cc=linux-cris-kernel@axis.com \
    --cc=linux-hexagon@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-metag@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=linux@armlinux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=liqin.linux@gmail.com \
    --cc=marc.zyngier@arm.com \
    --cc=mattst88@gmail.com \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=monstr@monstr.eu \
    --cc=mpe@ellerman.id.au \
    --cc=msalter@redhat.com \
    --cc=nios2-dev@lists.rocketboards.org \
    --cc=oohall@gmail.com \
    --cc=openrisc@lists.librecores.org \
    --cc=palmer@sifive.com \
    --cc=paulus@samba.org \
    --cc=pombredanne@nexb.com \
    --cc=ralf@linux-mips.org \
    --cc=richard.weiyang@gmail.com \
    --cc=richard@nod.at \
    --cc=rkuo@codeaurora.org \
    --cc=robh@kernel.org \
    --cc=rth@twiddle.net \
    --cc=schwidefsky@de.ibm.com \
    --cc=shea@shealevy.com \
    --cc=shorne@gmail.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=starvik@axis.com \
    --cc=stefan.kristiansson@saunalahti.fi \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=uclinux-h8-devel@lists.sourceforge.jp \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=user-mode-linux-user@lists.sourceforge.net \
    --cc=vbabka@suse.cz \
    --cc=vgupta@synopsys.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=vladimir.murzin@arm.com \
    --cc=will.deacon@arm.com \
    --cc=x86@kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).