diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-05-26 23:44:50 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-05-27 02:32:50 -0400 |
commit | f637a49e507c88354ab32b5d914e06acfb7ee00d (patch) | |
tree | 60ec94bc3dcf323028faf8b7fd31e6d4c73f2bb5 /arch/powerpc/mm | |
parent | b16e7766d6436835f473ba823ad04fbdfe5e9cbd (diff) |
powerpc: Minor cleanups of kernel virt address space definitions
Make FIXADDR_TOP a compile time constant and cleanup a
couple of definitions relative to the layout of the kernel
address space on ppc32. We also print out that layout at
boot time for debugging purposes.
This is a pre-requisite for properly fixing non-coherent
DMA allocactions.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/init_32.c | 8 | ||||
-rw-r--r-- | arch/powerpc/mm/mem.c | 13 | ||||
-rw-r--r-- | arch/powerpc/mm/pgtable_32.c | 2 |
3 files changed, 15 insertions, 8 deletions
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index 666a5e8a5be1..3de6a0d93824 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c | |||
@@ -168,12 +168,8 @@ void __init MMU_init(void) | |||
168 | ppc_md.progress("MMU:mapin", 0x301); | 168 | ppc_md.progress("MMU:mapin", 0x301); |
169 | mapin_ram(); | 169 | mapin_ram(); |
170 | 170 | ||
171 | #ifdef CONFIG_HIGHMEM | 171 | /* Initialize early top-down ioremap allocator */ |
172 | ioremap_base = PKMAP_BASE; | 172 | ioremap_bot = IOREMAP_TOP; |
173 | #else | ||
174 | ioremap_base = 0xfe000000UL; /* for now, could be 0xfffff000 */ | ||
175 | #endif /* CONFIG_HIGHMEM */ | ||
176 | ioremap_bot = ioremap_base; | ||
177 | 173 | ||
178 | /* Map in I/O resources */ | 174 | /* Map in I/O resources */ |
179 | if (ppc_md.progress) | 175 | if (ppc_md.progress) |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index d0602a76bf7f..d3a4e67561fa 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -380,6 +380,19 @@ void __init mem_init(void) | |||
380 | bsssize >> 10, | 380 | bsssize >> 10, |
381 | initsize >> 10); | 381 | initsize >> 10); |
382 | 382 | ||
383 | #ifdef CONFIG_PPC32 | ||
384 | pr_info("Kernel virtual memory layout:\n"); | ||
385 | pr_info(" * 0x%08lx..0x%08lx : fixmap\n", FIXADDR_START, FIXADDR_TOP); | ||
386 | #ifdef CONFIG_HIGHMEM | ||
387 | pr_info(" * 0x%08lx..0x%08lx : highmem PTEs\n", | ||
388 | PKMAP_BASE, PKMAP_ADDR(LAST_PKMAP)); | ||
389 | #endif /* CONFIG_HIGHMEM */ | ||
390 | pr_info(" * 0x%08lx..0x%08lx : early ioremap\n", | ||
391 | ioremap_bot, IOREMAP_TOP); | ||
392 | pr_info(" * 0x%08lx..0x%08lx : vmalloc & ioremap\n", | ||
393 | VMALLOC_START, VMALLOC_END); | ||
394 | #endif /* CONFIG_PPC32 */ | ||
395 | |||
383 | mem_init_done = 1; | 396 | mem_init_done = 1; |
384 | } | 397 | } |
385 | 398 | ||
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index 430d0908fa50..5422169626ba 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c | |||
@@ -399,8 +399,6 @@ void kernel_map_pages(struct page *page, int numpages, int enable) | |||
399 | #endif /* CONFIG_DEBUG_PAGEALLOC */ | 399 | #endif /* CONFIG_DEBUG_PAGEALLOC */ |
400 | 400 | ||
401 | static int fixmaps; | 401 | static int fixmaps; |
402 | unsigned long FIXADDR_TOP = (-PAGE_SIZE); | ||
403 | EXPORT_SYMBOL(FIXADDR_TOP); | ||
404 | 402 | ||
405 | void __set_fixmap (enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) | 403 | void __set_fixmap (enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) |
406 | { | 404 | { |