]> git.baikalelectronics.ru Git - kernel.git/commitdiff
csky: Use generic free_initrd_mem()
authorMike Rapoport <rppt@linux.ibm.com>
Wed, 28 Aug 2019 13:35:19 +0000 (16:35 +0300)
committerGuo Ren <ren_guo@c-sky.com>
Mon, 30 Sep 2019 02:26:24 +0000 (10:26 +0800)
The csky implementation of free_initrd_mem() is an open-coded version of
free_reserved_area() without poisoning.

Remove it and make csky use the generic version of free_initrd_mem().

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
arch/csky/mm/init.c

index eb0dc9e5065f92f8e647661e2c821f066d7e3eb9..d4c2292ea46bc6cf0825c6af3b9499338577d329 100644 (file)
@@ -60,22 +60,6 @@ void __init mem_init(void)
        mem_init_print_info(NULL);
 }
 
-#ifdef CONFIG_BLK_DEV_INITRD
-void free_initrd_mem(unsigned long start, unsigned long end)
-{
-       if (start < end)
-               pr_info("Freeing initrd memory: %ldk freed\n",
-                       (end - start) >> 10);
-
-       for (; start < end; start += PAGE_SIZE) {
-               ClearPageReserved(virt_to_page(start));
-               init_page_count(virt_to_page(start));
-               free_page(start);
-               totalram_pages_inc();
-       }
-}
-#endif
-
 extern char __init_begin[], __init_end[];
 
 void free_initmem(void)