diff options
Diffstat (limited to 'arch/microblaze/mm')
-rw-r--r-- | arch/microblaze/mm/init.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index aa6e163411b5..1608e2e1a44a 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c | |||
@@ -23,6 +23,9 @@ | |||
23 | #include <asm/sections.h> | 23 | #include <asm/sections.h> |
24 | #include <asm/tlb.h> | 24 | #include <asm/tlb.h> |
25 | 25 | ||
26 | /* Use for MMU and noMMU because of PCI generic code */ | ||
27 | int mem_init_done; | ||
28 | |||
26 | #ifndef CONFIG_MMU | 29 | #ifndef CONFIG_MMU |
27 | unsigned int __page_offset; | 30 | unsigned int __page_offset; |
28 | EXPORT_SYMBOL(__page_offset); | 31 | EXPORT_SYMBOL(__page_offset); |
@@ -30,7 +33,6 @@ EXPORT_SYMBOL(__page_offset); | |||
30 | #else | 33 | #else |
31 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 34 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
32 | 35 | ||
33 | int mem_init_done; | ||
34 | static int init_bootmem_done; | 36 | static int init_bootmem_done; |
35 | #endif /* CONFIG_MMU */ | 37 | #endif /* CONFIG_MMU */ |
36 | 38 | ||
@@ -202,9 +204,7 @@ void __init mem_init(void) | |||
202 | printk(KERN_INFO "Memory: %luk/%luk available\n", | 204 | printk(KERN_INFO "Memory: %luk/%luk available\n", |
203 | nr_free_pages() << (PAGE_SHIFT-10), | 205 | nr_free_pages() << (PAGE_SHIFT-10), |
204 | num_physpages << (PAGE_SHIFT-10)); | 206 | num_physpages << (PAGE_SHIFT-10)); |
205 | #ifdef CONFIG_MMU | ||
206 | mem_init_done = 1; | 207 | mem_init_done = 1; |
207 | #endif | ||
208 | } | 208 | } |
209 | 209 | ||
210 | #ifndef CONFIG_MMU | 210 | #ifndef CONFIG_MMU |
@@ -216,6 +216,10 @@ int ___range_ok(unsigned long addr, unsigned long size) | |||
216 | } | 216 | } |
217 | EXPORT_SYMBOL(___range_ok); | 217 | EXPORT_SYMBOL(___range_ok); |
218 | 218 | ||
219 | int page_is_ram(unsigned long pfn) | ||
220 | { | ||
221 | return __range_ok(pfn, 0); | ||
222 | } | ||
219 | #else | 223 | #else |
220 | int page_is_ram(unsigned long pfn) | 224 | int page_is_ram(unsigned long pfn) |
221 | { | 225 | { |
@@ -344,6 +348,8 @@ void __init *early_get_page(void) | |||
344 | return p; | 348 | return p; |
345 | } | 349 | } |
346 | 350 | ||
351 | #endif /* CONFIG_MMU */ | ||
352 | |||
347 | void * __init_refok alloc_maybe_bootmem(size_t size, gfp_t mask) | 353 | void * __init_refok alloc_maybe_bootmem(size_t size, gfp_t mask) |
348 | { | 354 | { |
349 | if (mem_init_done) | 355 | if (mem_init_done) |
@@ -365,5 +371,3 @@ void * __init_refok zalloc_maybe_bootmem(size_t size, gfp_t mask) | |||
365 | } | 371 | } |
366 | return p; | 372 | return p; |
367 | } | 373 | } |
368 | |||
369 | #endif /* CONFIG_MMU */ | ||