summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-09-06 10:57:03 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-09-06 10:57:03 +0100
commit012d1f4af1b07e5ccfcd23b7c1dcdcc30a068257 (patch)
treeb054a3cc06cf026160a3e44b51b4ccc167baba4b /arch/arm/mm
parent446616dbb48c7dc039649f796c3fab55c44bd0bc (diff)
downloadblackbird-op-linux-012d1f4af1b07e5ccfcd23b7c1dcdcc30a068257.tar.gz
blackbird-op-linux-012d1f4af1b07e5ccfcd23b7c1dcdcc30a068257.zip
[ARM] move initrd code from kernel/setup.c to mm/init.c
This quietens some sparse warnings about phys_initrd_start and phys_initrd_size. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/init.c39
1 files changed, 37 insertions, 2 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 30a69d67d673..c70fb1d18903 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -27,8 +27,43 @@
#include "mm.h"
extern void _text, _etext, __data_start, _end, __init_begin, __init_end;
-extern unsigned long phys_initrd_start;
-extern unsigned long phys_initrd_size;
+
+static unsigned long phys_initrd_start __initdata = 0;
+static unsigned long phys_initrd_size __initdata = 0;
+
+static void __init early_initrd(char **p)
+{
+ unsigned long start, size;
+
+ start = memparse(*p, p);
+ if (**p == ',') {
+ size = memparse((*p) + 1, p);
+
+ phys_initrd_start = start;
+ phys_initrd_size = size;
+ }
+}
+__early_param("initrd=", early_initrd);
+
+static int __init parse_tag_initrd(const struct tag *tag)
+{
+ printk(KERN_WARNING "ATAG_INITRD is deprecated; "
+ "please update your bootloader.\n");
+ phys_initrd_start = __virt_to_phys(tag->u.initrd.start);
+ phys_initrd_size = tag->u.initrd.size;
+ return 0;
+}
+
+__tagtable(ATAG_INITRD, parse_tag_initrd);
+
+static int __init parse_tag_initrd2(const struct tag *tag)
+{
+ phys_initrd_start = tag->u.initrd.start;
+ phys_initrd_size = tag->u.initrd.size;
+ return 0;
+}
+
+__tagtable(ATAG_INITRD2, parse_tag_initrd2);
/*
* This is used to pass memory configuration data from paging_init
OpenPOWER on IntegriCloud