diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-09-06 05:57:03 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-09-06 05:57:03 -0400 |
commit | 012d1f4af1b07e5ccfcd23b7c1dcdcc30a068257 (patch) | |
tree | b054a3cc06cf026160a3e44b51b4ccc167baba4b /arch/arm | |
parent | 446616dbb48c7dc039649f796c3fab55c44bd0bc (diff) |
[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')
-rw-r--r-- | arch/arm/kernel/setup.c | 37 | ||||
-rw-r--r-- | arch/arm/mm/init.c | 39 |
2 files changed, 37 insertions, 39 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 67d20e9a7451..f972fc3e979b 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -113,9 +113,6 @@ static struct stack stacks[NR_CPUS]; | |||
113 | char elf_platform[ELF_PLATFORM_SIZE]; | 113 | char elf_platform[ELF_PLATFORM_SIZE]; |
114 | EXPORT_SYMBOL(elf_platform); | 114 | EXPORT_SYMBOL(elf_platform); |
115 | 115 | ||
116 | unsigned long phys_initrd_start __initdata = 0; | ||
117 | unsigned long phys_initrd_size __initdata = 0; | ||
118 | |||
119 | static struct meminfo meminfo __initdata = { 0, }; | 116 | static struct meminfo meminfo __initdata = { 0, }; |
120 | static const char *cpu_name; | 117 | static const char *cpu_name; |
121 | static const char *machine_name; | 118 | static const char *machine_name; |
@@ -445,20 +442,6 @@ static struct machine_desc * __init setup_machine(unsigned int nr) | |||
445 | return list; | 442 | return list; |
446 | } | 443 | } |
447 | 444 | ||
448 | static void __init early_initrd(char **p) | ||
449 | { | ||
450 | unsigned long start, size; | ||
451 | |||
452 | start = memparse(*p, p); | ||
453 | if (**p == ',') { | ||
454 | size = memparse((*p) + 1, p); | ||
455 | |||
456 | phys_initrd_start = start; | ||
457 | phys_initrd_size = size; | ||
458 | } | ||
459 | } | ||
460 | __early_param("initrd=", early_initrd); | ||
461 | |||
462 | static void __init arm_add_memory(unsigned long start, unsigned long size) | 445 | static void __init arm_add_memory(unsigned long start, unsigned long size) |
463 | { | 446 | { |
464 | struct membank *bank; | 447 | struct membank *bank; |
@@ -696,26 +679,6 @@ static int __init parse_tag_ramdisk(const struct tag *tag) | |||
696 | 679 | ||
697 | __tagtable(ATAG_RAMDISK, parse_tag_ramdisk); | 680 | __tagtable(ATAG_RAMDISK, parse_tag_ramdisk); |
698 | 681 | ||
699 | static int __init parse_tag_initrd(const struct tag *tag) | ||
700 | { | ||
701 | printk(KERN_WARNING "ATAG_INITRD is deprecated; " | ||
702 | "please update your bootloader.\n"); | ||
703 | phys_initrd_start = __virt_to_phys(tag->u.initrd.start); | ||
704 | phys_initrd_size = tag->u.initrd.size; | ||
705 | return 0; | ||
706 | } | ||
707 | |||
708 | __tagtable(ATAG_INITRD, parse_tag_initrd); | ||
709 | |||
710 | static int __init parse_tag_initrd2(const struct tag *tag) | ||
711 | { | ||
712 | phys_initrd_start = tag->u.initrd.start; | ||
713 | phys_initrd_size = tag->u.initrd.size; | ||
714 | return 0; | ||
715 | } | ||
716 | |||
717 | __tagtable(ATAG_INITRD2, parse_tag_initrd2); | ||
718 | |||
719 | static int __init parse_tag_serialnr(const struct tag *tag) | 682 | static int __init parse_tag_serialnr(const struct tag *tag) |
720 | { | 683 | { |
721 | system_serial_low = tag->u.serialnr.low; | 684 | system_serial_low = tag->u.serialnr.low; |
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 @@ | |||
27 | #include "mm.h" | 27 | #include "mm.h" |
28 | 28 | ||
29 | extern void _text, _etext, __data_start, _end, __init_begin, __init_end; | 29 | extern void _text, _etext, __data_start, _end, __init_begin, __init_end; |
30 | extern unsigned long phys_initrd_start; | 30 | |
31 | extern unsigned long phys_initrd_size; | 31 | static unsigned long phys_initrd_start __initdata = 0; |
32 | static unsigned long phys_initrd_size __initdata = 0; | ||
33 | |||
34 | static void __init early_initrd(char **p) | ||
35 | { | ||
36 | unsigned long start, size; | ||
37 | |||
38 | start = memparse(*p, p); | ||
39 | if (**p == ',') { | ||
40 | size = memparse((*p) + 1, p); | ||
41 | |||
42 | phys_initrd_start = start; | ||
43 | phys_initrd_size = size; | ||
44 | } | ||
45 | } | ||
46 | __early_param("initrd=", early_initrd); | ||
47 | |||
48 | static int __init parse_tag_initrd(const struct tag *tag) | ||
49 | { | ||
50 | printk(KERN_WARNING "ATAG_INITRD is deprecated; " | ||
51 | "please update your bootloader.\n"); | ||
52 | phys_initrd_start = __virt_to_phys(tag->u.initrd.start); | ||
53 | phys_initrd_size = tag->u.initrd.size; | ||
54 | return 0; | ||
55 | } | ||
56 | |||
57 | __tagtable(ATAG_INITRD, parse_tag_initrd); | ||
58 | |||
59 | static int __init parse_tag_initrd2(const struct tag *tag) | ||
60 | { | ||
61 | phys_initrd_start = tag->u.initrd.start; | ||
62 | phys_initrd_size = tag->u.initrd.size; | ||
63 | return 0; | ||
64 | } | ||
65 | |||
66 | __tagtable(ATAG_INITRD2, parse_tag_initrd2); | ||
32 | 67 | ||
33 | /* | 68 | /* |
34 | * This is used to pass memory configuration data from paging_init | 69 | * This is used to pass memory configuration data from paging_init |