arm-xtensa-simplify-initialization-of-high-memory-pages.patch removed from -mm tree
The patch titled
Subject: arm, xtensa: simplify initialization of high memory pages
has been removed from the -mm tree. Its filename was
arm-xtensa-simplify-initialization-of-high-memory-pages.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Mike Rapoport <[email protected]>
Subject: arm, xtensa: simplify initialization of high memory pages
free_highpages() in both arm and xtensa essentially open-code for_each_free_mem_range() loop to detect high memory pages that were not reserved and that should be initialized and passed to the buddy allocator.
Replace open-coded implementation of for_each_free_mem_range() with usage of memblock API to simplify the code.
---
arch/arm/mm/init.c | 48 +++++----------------------------- arch/xtensa/mm/init.c | 55 +++++++--------------------------------- 2 files changed, 18 insertions(+), 85 deletions(-)
arch/arm/mm/init.c renamed from arch/arm/mm/init.c~arm-xtensa-simplify-initialization-of-high-memory-pages +8 -40
@@ -347,61 +347,29 @@ static void __init free_unused_memmap(vo#endif } -#ifdef CONFIG_HIGHMEM -static inline void free_area_high (unsigned long pfn,unsigned long end) -{ -for (; pfn < end; pfn++) -free_highmem_page (pfn_to_page (pfn)); -} -#endif -static void __init free_highpages (void ) {#ifdef CONFIG_HIGHMEM unsigned long max_low = max_low_pfn; -struct memblock_region *mem, *res; +phys_addr_t range_start, range_end; +u64 i;/* set highmem page free */ -for_each_memblock (memory, mem) { -unsigned long start =memblock_region_memory_base_pfn (mem); -unsigned long end =memblock_region_memory_end_pfn (mem); +for_each_free_mem_range (i,NUMA_NO_NODE ,MEMBLOCK_NONE , + &range_start, &range_end,NULL ) { +unsigned long start =PHYS_PFN (range_start); +unsigned long end =PHYS_PFN (range_end);/* Ignore complete lowmem entries */ if (end <= max_low)continue ; -if (memblock_is_nomap (mem)) -continue ; -/* Truncate partial highmem entries */ if (start < max_low) start = max_low; -/* Find and exclude any reserved regions */ -for_each_memblock (reserved, res) { -unsigned long res_start, res_end; - - res_start =memblock_region_reserved_base_pfn (res); - res_end =memblock_region_reserved_end_pfn (res); - -if (res_end < start) -continue ; -if (res_start < start) - res_start = start; -if (res_start > end) - res_start = end; -if (res_end > end) - res_end = end; -if (res_start != start) -free_area_high (start, res_start); - start = res_end; -if (start == end) -break ; - } - -/* And now free anything which remains */ -if (start < end) -free_area_high (start, end); +for (; start < end; start++) +free_highmem_page (pfn_to_page (start)); }#endif }
arch/xtensa/mm/init.c renamed from arch/xtensa/mm/init.c~arm-xtensa-simplify-initialization-of-high-memory-pages +10 -45
77 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
mm-remove-unused-early_pfn_valid.patch