Commit 012d1f4a authored by Russell King's avatar Russell King Committed by Russell King

[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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 446616db
...@@ -113,9 +113,6 @@ static struct stack stacks[NR_CPUS]; ...@@ -113,9 +113,6 @@ static struct stack stacks[NR_CPUS];
char elf_platform[ELF_PLATFORM_SIZE]; char elf_platform[ELF_PLATFORM_SIZE];
EXPORT_SYMBOL(elf_platform); EXPORT_SYMBOL(elf_platform);
unsigned long phys_initrd_start __initdata = 0;
unsigned long phys_initrd_size __initdata = 0;
static struct meminfo meminfo __initdata = { 0, }; static struct meminfo meminfo __initdata = { 0, };
static const char *cpu_name; static const char *cpu_name;
static const char *machine_name; static const char *machine_name;
...@@ -445,20 +442,6 @@ static struct machine_desc * __init setup_machine(unsigned int nr) ...@@ -445,20 +442,6 @@ static struct machine_desc * __init setup_machine(unsigned int nr)
return list; return list;
} }
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 void __init arm_add_memory(unsigned long start, unsigned long size) static void __init arm_add_memory(unsigned long start, unsigned long size)
{ {
struct membank *bank; struct membank *bank;
...@@ -696,26 +679,6 @@ static int __init parse_tag_ramdisk(const struct tag *tag) ...@@ -696,26 +679,6 @@ static int __init parse_tag_ramdisk(const struct tag *tag)
__tagtable(ATAG_RAMDISK, parse_tag_ramdisk); __tagtable(ATAG_RAMDISK, parse_tag_ramdisk);
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);
static int __init parse_tag_serialnr(const struct tag *tag) static int __init parse_tag_serialnr(const struct tag *tag)
{ {
system_serial_low = tag->u.serialnr.low; system_serial_low = tag->u.serialnr.low;
......
...@@ -27,8 +27,43 @@ ...@@ -27,8 +27,43 @@
#include "mm.h" #include "mm.h"
extern void _text, _etext, __data_start, _end, __init_begin, __init_end; 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 * This is used to pass memory configuration data from paging_init
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment