aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2014-10-03 19:50:33 -0400
committerMax Filippov <jcmvbkbc@gmail.com>2014-10-21 05:28:58 -0400
commit5a0b1d78bfc5ca4079ea03abb0ecc0d61d676e41 (patch)
treeea6a9594c87a8cdd2b6eec457ee709a64172cfc6
parent566fb58ed422537715023d1f19b705247a640b11 (diff)
xtensa: nommu: clean up memory map dump
noMMU configuration doesn't use special area for vmalloc allocations, don't print it in the memory map. PAGE_OFFSET is fixed to 0 in noMMU, use min_low_pfn and max_low_pfn for lowmem range display. Make all XCHAL_KSEG_* constants unsigned long for consistency with other addresses. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
-rw-r--r--arch/xtensa/include/asm/page.h10
-rw-r--r--arch/xtensa/mm/init.c8
2 files changed, 12 insertions, 6 deletions
diff --git a/arch/xtensa/include/asm/page.h b/arch/xtensa/include/asm/page.h
index 619a51bb0163..ad38500471fa 100644
--- a/arch/xtensa/include/asm/page.h
+++ b/arch/xtensa/include/asm/page.h
@@ -20,10 +20,10 @@
20 * Fixed TLB translations in the processor. 20 * Fixed TLB translations in the processor.
21 */ 21 */
22 22
23#define XCHAL_KSEG_CACHED_VADDR 0xd0000000 23#define XCHAL_KSEG_CACHED_VADDR __XTENSA_UL_CONST(0xd0000000)
24#define XCHAL_KSEG_BYPASS_VADDR 0xd8000000 24#define XCHAL_KSEG_BYPASS_VADDR __XTENSA_UL_CONST(0xd8000000)
25#define XCHAL_KSEG_PADDR 0x00000000 25#define XCHAL_KSEG_PADDR __XTENSA_UL_CONST(0x00000000)
26#define XCHAL_KSEG_SIZE 0x08000000 26#define XCHAL_KSEG_SIZE __XTENSA_UL_CONST(0x08000000)
27 27
28/* 28/*
29 * PAGE_SHIFT determines the page size 29 * PAGE_SHIFT determines the page size
@@ -37,7 +37,7 @@
37#define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR 37#define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR
38#define MAX_MEM_PFN XCHAL_KSEG_SIZE 38#define MAX_MEM_PFN XCHAL_KSEG_SIZE
39#else 39#else
40#define PAGE_OFFSET 0 40#define PAGE_OFFSET __XTENSA_UL_CONST(0)
41#define MAX_MEM_PFN (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE) 41#define MAX_MEM_PFN (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE)
42#endif 42#endif
43 43
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c
index 5a084fa5b608..9a9a5935bd36 100644
--- a/arch/xtensa/mm/init.c
+++ b/arch/xtensa/mm/init.c
@@ -343,18 +343,24 @@ void __init mem_init(void)
343 " pkmap : 0x%08lx - 0x%08lx (%5lu kB)\n" 343 " pkmap : 0x%08lx - 0x%08lx (%5lu kB)\n"
344 " fixmap : 0x%08lx - 0x%08lx (%5lu kB)\n" 344 " fixmap : 0x%08lx - 0x%08lx (%5lu kB)\n"
345#endif 345#endif
346#ifdef CONFIG_MMU
346 " vmalloc : 0x%08x - 0x%08x (%5u MB)\n" 347 " vmalloc : 0x%08x - 0x%08x (%5u MB)\n"
347 " lowmem : 0x%08x - 0x%08lx (%5lu MB)\n", 348#endif
349 " lowmem : 0x%08lx - 0x%08lx (%5lu MB)\n",
348#ifdef CONFIG_HIGHMEM 350#ifdef CONFIG_HIGHMEM
349 PKMAP_BASE, PKMAP_BASE + LAST_PKMAP * PAGE_SIZE, 351 PKMAP_BASE, PKMAP_BASE + LAST_PKMAP * PAGE_SIZE,
350 (LAST_PKMAP*PAGE_SIZE) >> 10, 352 (LAST_PKMAP*PAGE_SIZE) >> 10,
351 FIXADDR_START, FIXADDR_TOP, 353 FIXADDR_START, FIXADDR_TOP,
352 (FIXADDR_TOP - FIXADDR_START) >> 10, 354 (FIXADDR_TOP - FIXADDR_START) >> 10,
353#endif 355#endif
356#ifdef CONFIG_MMU
354 VMALLOC_START, VMALLOC_END, 357 VMALLOC_START, VMALLOC_END,
355 (VMALLOC_END - VMALLOC_START) >> 20, 358 (VMALLOC_END - VMALLOC_START) >> 20,
356 PAGE_OFFSET, PAGE_OFFSET + 359 PAGE_OFFSET, PAGE_OFFSET +
357 (max_low_pfn - min_low_pfn) * PAGE_SIZE, 360 (max_low_pfn - min_low_pfn) * PAGE_SIZE,
361#else
362 min_low_pfn * PAGE_SIZE, max_low_pfn * PAGE_SIZE,
363#endif
358 ((max_low_pfn - min_low_pfn) * PAGE_SIZE) >> 20); 364 ((max_low_pfn - min_low_pfn) * PAGE_SIZE) >> 20);
359} 365}
360 366