Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+12 -6
+5 -5
arch/xtensa/include/asm/page.h
··· 20 20 * Fixed TLB translations in the processor. 21 21 */ 22 22 23 - #define XCHAL_KSEG_CACHED_VADDR 0xd0000000 24 - #define XCHAL_KSEG_BYPASS_VADDR 0xd8000000 25 - #define XCHAL_KSEG_PADDR 0x00000000 26 - #define XCHAL_KSEG_SIZE 0x08000000 23 + #define XCHAL_KSEG_CACHED_VADDR __XTENSA_UL_CONST(0xd0000000) 24 + #define XCHAL_KSEG_BYPASS_VADDR __XTENSA_UL_CONST(0xd8000000) 25 + #define XCHAL_KSEG_PADDR __XTENSA_UL_CONST(0x00000000) 26 + #define XCHAL_KSEG_SIZE __XTENSA_UL_CONST(0x08000000) 27 27 28 28 /* 29 29 * PAGE_SHIFT determines the page size ··· 37 37 #define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR 38 38 #define MAX_MEM_PFN XCHAL_KSEG_SIZE 39 39 #else 40 - #define PAGE_OFFSET 0 40 + #define PAGE_OFFSET __XTENSA_UL_CONST(0) 41 41 #define MAX_MEM_PFN (PLATFORM_DEFAULT_MEM_START + PLATFORM_DEFAULT_MEM_SIZE) 42 42 #endif 43 43
+7 -1
arch/xtensa/mm/init.c
··· 343 343 " pkmap : 0x%08lx - 0x%08lx (%5lu kB)\n" 344 344 " fixmap : 0x%08lx - 0x%08lx (%5lu kB)\n" 345 345 #endif 346 + #ifdef CONFIG_MMU 346 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 350 #ifdef CONFIG_HIGHMEM 349 351 PKMAP_BASE, PKMAP_BASE + LAST_PKMAP * PAGE_SIZE, 350 352 (LAST_PKMAP*PAGE_SIZE) >> 10, 351 353 FIXADDR_START, FIXADDR_TOP, 352 354 (FIXADDR_TOP - FIXADDR_START) >> 10, 353 355 #endif 356 + #ifdef CONFIG_MMU 354 357 VMALLOC_START, VMALLOC_END, 355 358 (VMALLOC_END - VMALLOC_START) >> 20, 356 359 PAGE_OFFSET, PAGE_OFFSET + 357 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 364 ((max_low_pfn - min_low_pfn) * PAGE_SIZE) >> 20); 359 365 } 360 366