xtensa: nommu: clean up memory map dump
authorMax Filippov <jcmvbkbc@gmail.com>
Fri, 3 Oct 2014 23:50:33 +0000 (03:50 +0400)
committerMax Filippov <jcmvbkbc@gmail.com>
Tue, 21 Oct 2014 09:28:58 +0000 (13:28 +0400)
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>
arch/xtensa/include/asm/page.h
arch/xtensa/mm/init.c

index 619a51bb0163740552eb8e72593da53ff5f2f22a..ad38500471fa314fdef56b1aef6d1ad72578b9d7 100644 (file)
  * Fixed TLB translations in the processor.
  */
 
-#define XCHAL_KSEG_CACHED_VADDR 0xd0000000
-#define XCHAL_KSEG_BYPASS_VADDR 0xd8000000
-#define XCHAL_KSEG_PADDR        0x00000000
-#define XCHAL_KSEG_SIZE         0x08000000
+#define XCHAL_KSEG_CACHED_VADDR __XTENSA_UL_CONST(0xd0000000)
+#define XCHAL_KSEG_BYPASS_VADDR __XTENSA_UL_CONST(0xd8000000)
+#define XCHAL_KSEG_PADDR        __XTENSA_UL_CONST(0x00000000)
+#define XCHAL_KSEG_SIZE         __XTENSA_UL_CONST(0x08000000)
 
 /*
  * PAGE_SHIFT determines the page size
@@ -37,7 +37,7 @@
 #define PAGE_OFFSET    XCHAL_KSEG_CACHED_VADDR
 #define MAX_MEM_PFN    XCHAL_KSEG_SIZE
 #else
-#define PAGE_OFFSET    0
+#define PAGE_OFFSET    __XTENSA_UL_CONST(0)
 #define MAX_MEM_PFN    (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE)
 #endif
 
index 5a084fa5b6088b7985b851f52463433cffacabe7..9a9a5935bd3673f48a93fc5e96cac7e888f03c0e 100644 (file)
@@ -343,18 +343,24 @@ void __init mem_init(void)
                "    pkmap   : 0x%08lx - 0x%08lx  (%5lu kB)\n"
                "    fixmap  : 0x%08lx - 0x%08lx  (%5lu kB)\n"
 #endif
+#ifdef CONFIG_MMU
                "    vmalloc : 0x%08x - 0x%08x  (%5u MB)\n"
-               "    lowmem  : 0x%08x - 0x%08lx  (%5lu MB)\n",
+#endif
+               "    lowmem  : 0x%08lx - 0x%08lx  (%5lu MB)\n",
 #ifdef CONFIG_HIGHMEM
                PKMAP_BASE, PKMAP_BASE + LAST_PKMAP * PAGE_SIZE,
                (LAST_PKMAP*PAGE_SIZE) >> 10,
                FIXADDR_START, FIXADDR_TOP,
                (FIXADDR_TOP - FIXADDR_START) >> 10,
 #endif
+#ifdef CONFIG_MMU
                VMALLOC_START, VMALLOC_END,
                (VMALLOC_END - VMALLOC_START) >> 20,
                PAGE_OFFSET, PAGE_OFFSET +
                (max_low_pfn - min_low_pfn) * PAGE_SIZE,
+#else
+               min_low_pfn * PAGE_SIZE, max_low_pfn * PAGE_SIZE,
+#endif
                ((max_low_pfn - min_low_pfn) * PAGE_SIZE) >> 20);
 }