All of lore.kernel.org
 help / color / mirror / Atom feed
* [MIPS] Remove the RAMROOT function for msp71xx
@ 2009-04-28 23:00 Shane McDonald
  2009-04-29  6:07 ` Ralf Baechle
  2009-04-29 12:10 ` Christoph Hellwig
  0 siblings, 2 replies; 4+ messages in thread
From: Shane McDonald @ 2009-04-28 23:00 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf

The RAMROOT function was a successful but non-portable attempt to append
the root filesystem to the end of the kernel image.  The preferred and
portable solution is to use an initramfs instead.  This patch removes
the RAMROOT functionality.

This patch has been compile-tested against the current HEAD.

Signed-off-by: Shane McDonald <mcdonald.shane@gmail.com>
---
 arch/mips/pmc-sierra/Kconfig            |   12 ------
 arch/mips/pmc-sierra/msp71xx/msp_prom.c |   60 +------------------------------
 2 files changed, 1 insertions(+), 71 deletions(-)

diff --git a/arch/mips/pmc-sierra/Kconfig b/arch/mips/pmc-sierra/Kconfig
index 90261b8..c139988 100644
--- a/arch/mips/pmc-sierra/Kconfig
+++ b/arch/mips/pmc-sierra/Kconfig
@@ -36,18 +36,6 @@ config PMC_MSP7120_FPGA
 
 endchoice
 
-menu "Options for PMC-Sierra MSP chipsets"
-	depends on PMC_MSP
-
-config PMC_MSP_EMBEDDED_ROOTFS
-	bool "Root filesystem embedded in kernel image"
-	select MTD
-	select MTD_BLOCK
-	select MTD_PMC_MSP_RAMROOT
-	select MTD_RAM
-
-endmenu
-
 config HYPERTRANSPORT
 	bool "Hypertransport Support for PMC-Sierra Yosemite"
 	depends on PMC_YOSEMITE
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_prom.c b/arch/mips/pmc-sierra/msp71xx/msp_prom.c
index e5bd548..c317a36 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_prom.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_prom.c
@@ -40,12 +40,6 @@
 #include <linux/string.h>
 #include <linux/interrupt.h>
 #include <linux/mm.h>
-#ifdef CONFIG_CRAMFS
-#include <linux/cramfs_fs.h>
-#endif
-#ifdef CONFIG_SQUASHFS
-#include <linux/squashfs_fs.h>
-#endif
 
 #include <asm/addrspace.h>
 #include <asm/bootinfo.h>
@@ -435,10 +429,6 @@ struct prom_pmemblock *__init prom_getmdesc(void)
 	char		*str;
 	unsigned int	memsize;
 	unsigned int	heaptop;
-#ifdef CONFIG_MTD_PMC_MSP_RAMROOT
-	void		*ramroot_start;
-	unsigned long	ramroot_size;
-#endif
 	int i;
 
 	str = prom_getenv(memsz_env);
@@ -506,19 +496,7 @@ struct prom_pmemblock *__init prom_getmdesc(void)
 	i++;			/* 3 */
 	mdesc[i].type = BOOT_MEM_RESERVED;
 	mdesc[i].base = CPHYSADDR((u32)_text);
-#ifdef CONFIG_MTD_PMC_MSP_RAMROOT
-	if (get_ramroot(&ramroot_start, &ramroot_size)) {
-		/*
-		 * Rootfs in RAM -- follows kernel
-		 * Combine rootfs image with kernel block so a
-		 * page (4k) isn't wasted between memory blocks
-		 */
-		mdesc[i].size = CPHYSADDR(PAGE_ALIGN(
-			(u32)ramroot_start + ramroot_size)) - mdesc[i].base;
-	} else
-#endif
-		mdesc[i].size = CPHYSADDR(PAGE_ALIGN(
-			(u32)_end)) - mdesc[i].base;
+	mdesc[i].size = CPHYSADDR(PAGE_ALIGN((u32)_end)) - mdesc[i].base;
 
 	/* Remainder of RAM -- under memsize */
 	i++;			/* 5 */
@@ -528,39 +506,3 @@ struct prom_pmemblock *__init prom_getmdesc(void)
 
 	return &mdesc[0];
 }
-
-/* rootfs functions */
-#ifdef CONFIG_MTD_PMC_MSP_RAMROOT
-bool get_ramroot(void **start, unsigned long *size)
-{
-	extern char _end[];
-
-	/* Check for start following the end of the kernel */
-	void *check_start = (void *)_end;
-
-	/* Check for supported rootfs types */
-#ifdef CONFIG_CRAMFS
-	if (*(__u32 *)check_start == CRAMFS_MAGIC) {
-		/* Get CRAMFS size */
-		*start = check_start;
-		*size = PAGE_ALIGN(((struct cramfs_super *)
-				   check_start)->size);
-
-		return true;
-	}
-#endif
-#ifdef CONFIG_SQUASHFS
-	if (*((unsigned int *)check_start) == SQUASHFS_MAGIC) {
-		/* Get SQUASHFS size */
-		*start = check_start;
-		*size = PAGE_ALIGN(((struct squashfs_super_block *)
-				   check_start)->bytes_used);
-
-		return true;
-	}
-#endif
-
-	return false;
-}
-EXPORT_SYMBOL(get_ramroot);
-#endif
-- 
1.6.2.4

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

* Re: [MIPS] Remove the RAMROOT function for msp71xx
  2009-04-28 23:00 [MIPS] Remove the RAMROOT function for msp71xx Shane McDonald
@ 2009-04-29  6:07 ` Ralf Baechle
  2009-04-29 12:10 ` Christoph Hellwig
  1 sibling, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2009-04-29  6:07 UTC (permalink / raw)
  To: Shane McDonald; +Cc: linux-mips

On Tue, Apr 28, 2009 at 05:00:27PM -0600, Shane McDonald wrote:

> The RAMROOT function was a successful but non-portable attempt to append
> the root filesystem to the end of the kernel image.  The preferred and
> portable solution is to use an initramfs instead.  This patch removes
> the RAMROOT functionality.
> 
> This patch has been compile-tested against the current HEAD.

Thanks, applied!

  Ralf

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

* Re: [MIPS] Remove the RAMROOT function for msp71xx
  2009-04-28 23:00 [MIPS] Remove the RAMROOT function for msp71xx Shane McDonald
  2009-04-29  6:07 ` Ralf Baechle
@ 2009-04-29 12:10 ` Christoph Hellwig
  2009-04-29 14:11   ` Shane McDonald
  1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2009-04-29 12:10 UTC (permalink / raw)
  To: Shane McDonald; +Cc: linux-mips, ralf

On Tue, Apr 28, 2009 at 05:00:27PM -0600, Shane McDonald wrote:
> The RAMROOT function was a successful but non-portable attempt to append
> the root filesystem to the end of the kernel image.  The preferred and
> portable solution is to use an initramfs instead.  This patch removes
> the RAMROOT functionality.
> 
> This patch has been compile-tested against the current HEAD.
> 
> Signed-off-by: Shane McDonald <mcdonald.shane@gmail.com>
> ---
>  arch/mips/pmc-sierra/Kconfig            |   12 ------
>  arch/mips/pmc-sierra/msp71xx/msp_prom.c |   60 +------------------------------

Looks good to me, but now a build of drivers/mtd/maps/pmcmsp-ramroot.c
will fail.  Given that it's useless now you should probably remove it,
too.

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

* Re: [MIPS] Remove the RAMROOT function for msp71xx
  2009-04-29 12:10 ` Christoph Hellwig
@ 2009-04-29 14:11   ` Shane McDonald
  0 siblings, 0 replies; 4+ messages in thread
From: Shane McDonald @ 2009-04-29 14:11 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-mips, ralf

[-- Attachment #1: Type: text/plain, Size: 1017 bytes --]

Hi Christoph:

On Wed, Apr 29, 2009 at 6:10 AM, Christoph Hellwig <hch@lst.de> wrote:

> On Tue, Apr 28, 2009 at 05:00:27PM -0600, Shane McDonald wrote:
> > The RAMROOT function was a successful but non-portable attempt to append
> > the root filesystem to the end of the kernel image.  The preferred and
> > portable solution is to use an initramfs instead.  This patch removes
> > the RAMROOT functionality.
> >
> > This patch has been compile-tested against the current HEAD.
> >
> > Signed-off-by: Shane McDonald <mcdonald.shane@gmail.com>
> > ---
> >  arch/mips/pmc-sierra/Kconfig            |   12 ------
> >  arch/mips/pmc-sierra/msp71xx/msp_prom.c |   60
> +------------------------------
>
> Looks good to me, but now a build of drivers/mtd/maps/pmcmsp-ramroot.c
> will fail.  Given that it's useless now you should probably remove it,
> too.


  Yes, definitely.  I wanted to get this patch through before submitting the
mtd patch.  Now that this one is accepted, I'll send off the other patch
soon.

Shane

[-- Attachment #2: Type: text/html, Size: 1473 bytes --]

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

end of thread, other threads:[~2009-04-29 14:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-28 23:00 [MIPS] Remove the RAMROOT function for msp71xx Shane McDonald
2009-04-29  6:07 ` Ralf Baechle
2009-04-29 12:10 ` Christoph Hellwig
2009-04-29 14:11   ` Shane McDonald

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.