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

Configure Feed

Select the types of activity you want to include in your feed.

csky: use free_initmem_default() in free_initmem()

The existing code is essentially
free_initmem_default()->free_reserved_area() without poisoning.

Note that existing code missed to update the managed page count of the
zone.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
Tested-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Guo Ren <guoren@kernel.org>
Signed-off-by: David Hildenbrand <david@redhat.com>

authored by

David Hildenbrand and committed by
Guo Ren
5d3f410f c47e1a1c

+1 -16
+1 -16
arch/csky/mm/init.c
··· 110 110 mem_init_print_info(NULL); 111 111 } 112 112 113 - extern char __init_begin[], __init_end[]; 114 - 115 113 void free_initmem(void) 116 114 { 117 - unsigned long addr; 118 - 119 - addr = (unsigned long) &__init_begin; 120 - 121 - while (addr < (unsigned long) &__init_end) { 122 - ClearPageReserved(virt_to_page(addr)); 123 - init_page_count(virt_to_page(addr)); 124 - free_page(addr); 125 - totalram_pages_inc(); 126 - addr += PAGE_SIZE; 127 - } 128 - 129 - pr_info("Freeing unused kernel memory: %dk freed\n", 130 - ((unsigned int)&__init_end - (unsigned int)&__init_begin) >> 10); 115 + free_initmem_default(-1); 131 116 } 132 117 133 118 void pgd_init(unsigned long *p)