diff options
author | Rob Herring <rob.herring@calxeda.com> | 2013-08-30 18:06:53 -0400 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2013-10-09 12:39:01 -0400 |
commit | 29eb45a9ab4839a1e9cef2bcf369b918c9c4fcad (patch) | |
tree | 00893156dab39f9e739ab9055dd163a2a547d721 /arch | |
parent | ec2eaa73b3d21776f46797a2eef983d7be09a964 (diff) |
of: remove early_init_dt_setup_initrd_arch
All arches do essentially the same thing now for
early_init_dt_setup_initrd_arch, so it can now be removed.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arc/mm/init.c | 7 | ||||
-rw-r--r-- | arch/arm/mm/init.c | 8 | ||||
-rw-r--r-- | arch/c6x/kernel/devicetree.c | 10 | ||||
-rw-r--r-- | arch/metag/mm/init.c | 9 | ||||
-rw-r--r-- | arch/microblaze/kernel/prom.c | 9 | ||||
-rw-r--r-- | arch/mips/kernel/prom.c | 10 | ||||
-rw-r--r-- | arch/openrisc/kernel/prom.c | 9 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom.c | 9 | ||||
-rw-r--r-- | arch/x86/kernel/devicetree.c | 9 | ||||
-rw-r--r-- | arch/xtensa/kernel/setup.c | 15 |
10 files changed, 4 insertions, 91 deletions
diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c index 81279ec73a6a..55e0a85bea78 100644 --- a/arch/arc/mm/init.c +++ b/arch/arc/mm/init.c | |||
@@ -125,10 +125,3 @@ void __init free_initrd_mem(unsigned long start, unsigned long end) | |||
125 | free_reserved_area((void *)start, (void *)end, -1, "initrd"); | 125 | free_reserved_area((void *)start, (void *)end, -1, "initrd"); |
126 | } | 126 | } |
127 | #endif | 127 | #endif |
128 | |||
129 | #ifdef CONFIG_OF_FLATTREE | ||
130 | void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) | ||
131 | { | ||
132 | pr_err("%s(%llx, %llx)\n", __func__, start, end); | ||
133 | } | ||
134 | #endif /* CONFIG_OF_FLATTREE */ | ||
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 9eeb1cd1c401..9d0b91dccf37 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -77,14 +77,6 @@ static int __init parse_tag_initrd2(const struct tag *tag) | |||
77 | 77 | ||
78 | __tagtable(ATAG_INITRD2, parse_tag_initrd2); | 78 | __tagtable(ATAG_INITRD2, parse_tag_initrd2); |
79 | 79 | ||
80 | #if defined(CONFIG_OF_FLATTREE) && defined(CONFIG_BLK_DEV_INITRD) | ||
81 | void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) | ||
82 | { | ||
83 | initrd_start = (unsigned long)__va(start); | ||
84 | initrd_end = (unsigned long)__va(end); | ||
85 | } | ||
86 | #endif /* CONFIG_OF_FLATTREE */ | ||
87 | |||
88 | /* | 80 | /* |
89 | * This keeps memory configuration data used by a couple memory | 81 | * This keeps memory configuration data used by a couple memory |
90 | * initialization functions, as well as show_mem() for the skipping | 82 | * initialization functions, as well as show_mem() for the skipping |
diff --git a/arch/c6x/kernel/devicetree.c b/arch/c6x/kernel/devicetree.c index d28a92fc0c52..fa3e5741514e 100644 --- a/arch/c6x/kernel/devicetree.c +++ b/arch/c6x/kernel/devicetree.c | |||
@@ -10,18 +10,8 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/initrd.h> | ||
14 | #include <linux/memblock.h> | 13 | #include <linux/memblock.h> |
15 | 14 | ||
16 | #ifdef CONFIG_BLK_DEV_INITRD | ||
17 | void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) | ||
18 | { | ||
19 | initrd_start = (unsigned long)__va(start); | ||
20 | initrd_end = (unsigned long)__va(end); | ||
21 | initrd_below_start_ok = 1; | ||
22 | } | ||
23 | #endif | ||
24 | |||
25 | void __init early_init_dt_add_memory_arch(u64 base, u64 size) | 15 | void __init early_init_dt_add_memory_arch(u64 base, u64 size) |
26 | { | 16 | { |
27 | c6x_add_memory(base, size); | 17 | c6x_add_memory(base, size); |
diff --git a/arch/metag/mm/init.c b/arch/metag/mm/init.c index 123919534b80..249fff66add3 100644 --- a/arch/metag/mm/init.c +++ b/arch/metag/mm/init.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/percpu.h> | 12 | #include <linux/percpu.h> |
13 | #include <linux/memblock.h> | 13 | #include <linux/memblock.h> |
14 | #include <linux/initrd.h> | 14 | #include <linux/initrd.h> |
15 | #include <linux/of_fdt.h> | ||
16 | 15 | ||
17 | #include <asm/setup.h> | 16 | #include <asm/setup.h> |
18 | #include <asm/page.h> | 17 | #include <asm/page.h> |
@@ -405,11 +404,3 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
405 | "initrd"); | 404 | "initrd"); |
406 | } | 405 | } |
407 | #endif | 406 | #endif |
408 | |||
409 | #ifdef CONFIG_OF_FLATTREE | ||
410 | void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) | ||
411 | { | ||
412 | pr_err("%s(%llx, %llx)\n", | ||
413 | __func__, start, end); | ||
414 | } | ||
415 | #endif /* CONFIG_OF_FLATTREE */ | ||
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c index 951e4d61ca2d..cab6dc356119 100644 --- a/arch/microblaze/kernel/prom.c +++ b/arch/microblaze/kernel/prom.c | |||
@@ -114,15 +114,6 @@ void __init early_init_devtree(void *params) | |||
114 | pr_debug(" <- early_init_devtree()\n"); | 114 | pr_debug(" <- early_init_devtree()\n"); |
115 | } | 115 | } |
116 | 116 | ||
117 | #ifdef CONFIG_BLK_DEV_INITRD | ||
118 | void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) | ||
119 | { | ||
120 | initrd_start = (unsigned long)__va(start); | ||
121 | initrd_end = (unsigned long)__va(end); | ||
122 | initrd_below_start_ok = 1; | ||
123 | } | ||
124 | #endif | ||
125 | |||
126 | /******* | 117 | /******* |
127 | * | 118 | * |
128 | * New implementation of the OF "find" APIs, return a refcounted | 119 | * New implementation of the OF "find" APIs, return a refcounted |
diff --git a/arch/mips/kernel/prom.c b/arch/mips/kernel/prom.c index 67a4c53b2b54..0b2485f9a6c1 100644 --- a/arch/mips/kernel/prom.c +++ b/arch/mips/kernel/prom.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/bootmem.h> | 15 | #include <linux/bootmem.h> |
16 | #include <linux/initrd.h> | ||
17 | #include <linux/debugfs.h> | 16 | #include <linux/debugfs.h> |
18 | #include <linux/of.h> | 17 | #include <linux/of.h> |
19 | #include <linux/of_fdt.h> | 18 | #include <linux/of_fdt.h> |
@@ -48,15 +47,6 @@ void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) | |||
48 | return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS)); | 47 | return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS)); |
49 | } | 48 | } |
50 | 49 | ||
51 | #ifdef CONFIG_BLK_DEV_INITRD | ||
52 | void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) | ||
53 | { | ||
54 | initrd_start = (unsigned long)__va(start); | ||
55 | initrd_end = (unsigned long)__va(end); | ||
56 | initrd_below_start_ok = 1; | ||
57 | } | ||
58 | #endif | ||
59 | |||
60 | int __init early_init_dt_scan_model(unsigned long node, const char *uname, | 50 | int __init early_init_dt_scan_model(unsigned long node, const char *uname, |
61 | int depth, void *data) | 51 | int depth, void *data) |
62 | { | 52 | { |
diff --git a/arch/openrisc/kernel/prom.c b/arch/openrisc/kernel/prom.c index 6dbcaa85421c..2aae474b44c3 100644 --- a/arch/openrisc/kernel/prom.c +++ b/arch/openrisc/kernel/prom.c | |||
@@ -52,12 +52,3 @@ void __init early_init_devtree(void *params) | |||
52 | early_init_dt_scan(params); | 52 | early_init_dt_scan(params); |
53 | memblock_allow_resize(); | 53 | memblock_allow_resize(); |
54 | } | 54 | } |
55 | |||
56 | #ifdef CONFIG_BLK_DEV_INITRD | ||
57 | void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) | ||
58 | { | ||
59 | initrd_start = (unsigned long)__va(start); | ||
60 | initrd_end = (unsigned long)__va(end); | ||
61 | initrd_below_start_ok = 1; | ||
62 | } | ||
63 | #endif | ||
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index b7634ce41dbc..a0894688daef 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -546,15 +546,6 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size) | |||
546 | memblock_add(base, size); | 546 | memblock_add(base, size); |
547 | } | 547 | } |
548 | 548 | ||
549 | #ifdef CONFIG_BLK_DEV_INITRD | ||
550 | void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) | ||
551 | { | ||
552 | initrd_start = (unsigned long)__va(start); | ||
553 | initrd_end = (unsigned long)__va(end); | ||
554 | initrd_below_start_ok = 1; | ||
555 | } | ||
556 | #endif | ||
557 | |||
558 | static void __init early_reserve_mem_dt(void) | 549 | static void __init early_reserve_mem_dt(void) |
559 | { | 550 | { |
560 | unsigned long i, len, dt_root; | 551 | unsigned long i, len, dt_root; |
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 0db805c4b9e8..0e1f95b06336 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c | |||
@@ -51,15 +51,6 @@ void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) | |||
51 | return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS)); | 51 | return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS)); |
52 | } | 52 | } |
53 | 53 | ||
54 | #ifdef CONFIG_BLK_DEV_INITRD | ||
55 | void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) | ||
56 | { | ||
57 | initrd_start = (unsigned long)__va(start); | ||
58 | initrd_end = (unsigned long)__va(end); | ||
59 | initrd_below_start_ok = 1; | ||
60 | } | ||
61 | #endif | ||
62 | |||
63 | void __init add_dtb(u64 data) | 54 | void __init add_dtb(u64 data) |
64 | { | 55 | { |
65 | initial_dtb = data + offsetof(struct setup_data, data); | 56 | initial_dtb = data + offsetof(struct setup_data, data); |
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 65974a8f41a4..6e2b6638122d 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c | |||
@@ -61,8 +61,8 @@ extern struct rtc_ops no_rtc_ops; | |||
61 | struct rtc_ops *rtc_ops; | 61 | struct rtc_ops *rtc_ops; |
62 | 62 | ||
63 | #ifdef CONFIG_BLK_DEV_INITRD | 63 | #ifdef CONFIG_BLK_DEV_INITRD |
64 | extern void *initrd_start; | 64 | extern unsigned long initrd_start; |
65 | extern void *initrd_end; | 65 | extern unsigned long initrd_end; |
66 | int initrd_is_mapped = 0; | 66 | int initrd_is_mapped = 0; |
67 | extern int initrd_below_start_ok; | 67 | extern int initrd_below_start_ok; |
68 | #endif | 68 | #endif |
@@ -149,8 +149,8 @@ static int __init parse_tag_initrd(const bp_tag_t* tag) | |||
149 | { | 149 | { |
150 | meminfo_t* mi; | 150 | meminfo_t* mi; |
151 | mi = (meminfo_t*)(tag->data); | 151 | mi = (meminfo_t*)(tag->data); |
152 | initrd_start = __va(mi->start); | 152 | initrd_start = (unsigned long)__va(mi->start); |
153 | initrd_end = __va(mi->end); | 153 | initrd_end = (unsigned long)__va(mi->end); |
154 | 154 | ||
155 | return 0; | 155 | return 0; |
156 | } | 156 | } |
@@ -167,13 +167,6 @@ static int __init parse_tag_fdt(const bp_tag_t *tag) | |||
167 | 167 | ||
168 | __tagtable(BP_TAG_FDT, parse_tag_fdt); | 168 | __tagtable(BP_TAG_FDT, parse_tag_fdt); |
169 | 169 | ||
170 | void __init early_init_dt_setup_initrd_arch(u64 start, u64 end) | ||
171 | { | ||
172 | initrd_start = (void *)__va(start); | ||
173 | initrd_end = (void *)__va(end); | ||
174 | initrd_below_start_ok = 1; | ||
175 | } | ||
176 | |||
177 | #endif /* CONFIG_OF */ | 170 | #endif /* CONFIG_OF */ |
178 | 171 | ||
179 | #endif /* CONFIG_BLK_DEV_INITRD */ | 172 | #endif /* CONFIG_BLK_DEV_INITRD */ |