public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM:  Drop support for redundant "keepinitrd" boot-time param.
@ 2007-09-19 16:06 Robert P. J. Day
  2007-09-20  7:22 ` Russell King
  0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2007-09-19 16:06 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Russell King


Given the equivalent "retain_initrd" boot-time paramater, "keepinitrd"
appears to be entirely superfluous.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

---

  since this appears to be exactly the situation as with AVR32, it's
an equivalent patch.  there are no other situations like this in the
tree, but the decision is clearly up to the ARM folks.

  not compile tested.


 Documentation/kernel-parameters.txt   |    2 --
 arch/arm/configs/jornada720_defconfig |    2 +-
 arch/arm/mm/init.c                    |   12 +-----------
 3 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 586b6f8..ccd3b1d 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -847,8 +847,6 @@ and is between 256 and 4096 characters. It is defined in the file
 			that the amount of memory usable for all allocations
 			is not too small.

-	keepinitrd	[HW,ARM]
-
 	kstack=N	[X86-32,X86-64] Print N words from the kernel stack
 			in oops dumps.

diff --git a/arch/arm/configs/jornada720_defconfig b/arch/arm/configs/jornada720_defconfig
index 0c55628..e6c45a0 100644
--- a/arch/arm/configs/jornada720_defconfig
+++ b/arch/arm/configs/jornada720_defconfig
@@ -151,7 +151,7 @@ CONFIG_ALIGNMENT_TRAP=y
 #
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="keepinitrd mem=32M"
+CONFIG_CMDLINE="retain_initrd mem=32M"
 # CONFIG_XIP_KERNEL is not set

 #
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index c0ad7c0..440caa4 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -487,19 +487,9 @@ void free_initmem(void)

 #ifdef CONFIG_BLK_DEV_INITRD

-static int keep_initrd;
-
 void free_initrd_mem(unsigned long start, unsigned long end)
 {
-	if (!keep_initrd)
-		free_area(start, end, "initrd");
-}
-
-static int __init keepinitrd_setup(char *__unused)
-{
-	keep_initrd = 1;
-	return 1;
+	free_area(start, end, "initrd");
 }

-__setup("keepinitrd", keepinitrd_setup);
 #endif

 --
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM:  Drop support for redundant "keepinitrd" boot-time param.
  2007-09-19 16:06 [PATCH] ARM: Drop support for redundant "keepinitrd" boot-time param Robert P. J. Day
@ 2007-09-20  7:22 ` Russell King
  2007-09-20  8:15   ` Michael Neuling
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King @ 2007-09-20  7:22 UTC (permalink / raw)
  To: Robert P. J. Day, Andrew Morton, Michael Neuling
  Cc: Linux Kernel Mailing List

On Wed, Sep 19, 2007 at 12:06:44PM -0400, Robert P. J. Day wrote:
> Given the equivalent "retain_initrd" boot-time paramater, "keepinitrd"
> appears to be entirely superfluous.

NAK.  "keepinitrd" is what people expect on ARM.

I'm frustrated that whoever invented "retain_initrd" didn't look around
in the documentation to see if there was any existing implementation
first.  The generic implementation should be fixed IMHO, or at least
the option string moved into init/initramfs.c.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: Drop support for redundant "keepinitrd" boot-time param.
  2007-09-20  7:22 ` Russell King
@ 2007-09-20  8:15   ` Michael Neuling
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Neuling @ 2007-09-20  8:15 UTC (permalink / raw)
  To: Russell King; +Cc: Robert P. J. Day, Andrew Morton, Linux Kernel Mailing List

> NAK.  "keepinitrd" is what people expect on ARM.
> 
> I'm frustrated that whoever invented "retain_initrd" didn't look
> around in the documentation to see if there was any existing
> implementation first.  The generic implementation should be fixed
> IMHO, or at least the option string moved into init/initramfs.c.

Sorry about that.  I'm happy to change retain_initrd to keep keepinitrd.
I don't think many people are using retain_initrd anyway (other than me
and some people I work with).

Otherwise we can support both for a while with something like (and
Robert's patch)....


From: Michael Neuling <mikey@neuling.org>

Make keepinitrd the same as retain_initrd for backwards compatibility
with ARM/AVR32 

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 init/initramfs.c |    7 +++++++
 1 file changed, 7 insertions(+)

Index: linux-2.6-ozlabs/init/initramfs.c
===================================================================
--- linux-2.6-ozlabs.orig/init/initramfs.c
+++ linux-2.6-ozlabs/init/initramfs.c
@@ -502,6 +502,13 @@ static int __init retain_initrd_param(ch
 }
 __setup("retain_initrd", retain_initrd_param);
 
+/* for backwards compatibility with ARM/AVR32 */
+static int __init keepinitrd_param(char *str)
+{
+	return retain_initrd_param(str);
+}
+__setup("keepinitrd", keepinitrd_param);
+
 extern char __initramfs_start[], __initramfs_end[];
 #ifdef CONFIG_BLK_DEV_INITRD
 #include <linux/initrd.h>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-20  8:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-19 16:06 [PATCH] ARM: Drop support for redundant "keepinitrd" boot-time param Robert P. J. Day
2007-09-20  7:22 ` Russell King
2007-09-20  8:15   ` Michael Neuling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox