Skip to content

Commit

Permalink
csky: Use generic free_initrd_mem()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Guo Ren <[email protected]>
  • Loading branch information
rppt authored and guoren83 committed Sep 30, 2019
1 parent 4ad35c1 commit fdbdcdd
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions arch/csky/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fdbdcdd

Please sign in to comment.