diff options
-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 | ||||
-rw-r--r-- | drivers/of/fdt.c | 9 | ||||
-rw-r--r-- | include/linux/of_fdt.h | 10 |
12 files changed, 10 insertions, 104 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 */ |
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 5bc55b6e2b41..5f4cc88cd89e 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
@@ -624,7 +624,7 @@ int __init of_scan_flat_dt_by_path(const char *path, | |||
624 | * early_init_dt_check_for_initrd - Decode initrd location from flat tree | 624 | * early_init_dt_check_for_initrd - Decode initrd location from flat tree |
625 | * @node: reference to node containing initrd location ('chosen') | 625 | * @node: reference to node containing initrd location ('chosen') |
626 | */ | 626 | */ |
627 | void __init early_init_dt_check_for_initrd(unsigned long node) | 627 | static void __init early_init_dt_check_for_initrd(unsigned long node) |
628 | { | 628 | { |
629 | u64 start, end; | 629 | u64 start, end; |
630 | unsigned long len; | 630 | unsigned long len; |
@@ -642,12 +642,15 @@ void __init early_init_dt_check_for_initrd(unsigned long node) | |||
642 | return; | 642 | return; |
643 | end = of_read_number(prop, len/4); | 643 | end = of_read_number(prop, len/4); |
644 | 644 | ||
645 | early_init_dt_setup_initrd_arch(start, end); | 645 | initrd_start = (unsigned long)__va(start); |
646 | initrd_end = (unsigned long)__va(end); | ||
647 | initrd_below_start_ok = 1; | ||
648 | |||
646 | pr_debug("initrd_start=0x%llx initrd_end=0x%llx\n", | 649 | pr_debug("initrd_start=0x%llx initrd_end=0x%llx\n", |
647 | (unsigned long long)start, (unsigned long long)end); | 650 | (unsigned long long)start, (unsigned long long)end); |
648 | } | 651 | } |
649 | #else | 652 | #else |
650 | inline void early_init_dt_check_for_initrd(unsigned long node) | 653 | static inline void early_init_dt_check_for_initrd(unsigned long node) |
651 | { | 654 | { |
652 | } | 655 | } |
653 | #endif /* CONFIG_BLK_DEV_INITRD */ | 656 | #endif /* CONFIG_BLK_DEV_INITRD */ |
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index 73e16511134e..b365f5ac7b54 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h | |||
@@ -96,22 +96,12 @@ extern int of_scan_flat_dt_by_path(const char *path, | |||
96 | 96 | ||
97 | extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, | 97 | extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, |
98 | int depth, void *data); | 98 | int depth, void *data); |
99 | extern void early_init_dt_check_for_initrd(unsigned long node); | ||
100 | extern int early_init_dt_scan_memory(unsigned long node, const char *uname, | 99 | extern int early_init_dt_scan_memory(unsigned long node, const char *uname, |
101 | int depth, void *data); | 100 | int depth, void *data); |
102 | extern void early_init_dt_add_memory_arch(u64 base, u64 size); | 101 | extern void early_init_dt_add_memory_arch(u64 base, u64 size); |
103 | extern void * early_init_dt_alloc_memory_arch(u64 size, u64 align); | 102 | extern void * early_init_dt_alloc_memory_arch(u64 size, u64 align); |
104 | extern u64 dt_mem_next_cell(int s, __be32 **cellp); | 103 | extern u64 dt_mem_next_cell(int s, __be32 **cellp); |
105 | 104 | ||
106 | /* | ||
107 | * If BLK_DEV_INITRD, the fdt early init code will call this function, | ||
108 | * to be provided by the arch code. start and end are specified as | ||
109 | * physical addresses. | ||
110 | */ | ||
111 | #ifdef CONFIG_BLK_DEV_INITRD | ||
112 | extern void early_init_dt_setup_initrd_arch(u64 start, u64 end); | ||
113 | #endif | ||
114 | |||
115 | /* Early flat tree scan hooks */ | 105 | /* Early flat tree scan hooks */ |
116 | extern int early_init_dt_scan_root(unsigned long node, const char *uname, | 106 | extern int early_init_dt_scan_root(unsigned long node, const char *uname, |
117 | int depth, void *data); | 107 | int depth, void *data); |