Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365366
b: refs/heads/master
c: 32ce012
h: refs/heads/master
v: v3
  • Loading branch information
Jiang Liu authored and Linus Torvalds committed Apr 29, 2013
1 parent 6727b2d commit 9c362a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31605922613dfc59402cd6f3a1b019bc2138ff47
refs/heads/master: 32ce012064b3cc89d2081d34a745af598e5e56c5
23 changes: 2 additions & 21 deletions trunk/arch/mn10300/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,31 +138,12 @@ void __init mem_init(void)
totalhigh_pages << (PAGE_SHIFT - 10));
}

/*
*
*/
void free_init_pages(char *what, unsigned long begin, unsigned long end)
{
unsigned long addr;

for (addr = begin; addr < end; addr += PAGE_SIZE) {
ClearPageReserved(virt_to_page(addr));
init_page_count(virt_to_page(addr));
memset((void *) addr, 0xcc, PAGE_SIZE);
free_page(addr);
totalram_pages++;
}
printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10);
}

/*
* recycle memory containing stuff only required for initialisation
*/
void free_initmem(void)
{
free_init_pages("unused kernel memory",
(unsigned long) &__init_begin,
(unsigned long) &__init_end);
free_initmem_default(POISON_FREE_INITMEM);
}

/*
Expand All @@ -171,6 +152,6 @@ void free_initmem(void)
#ifdef CONFIG_BLK_DEV_INITRD
void free_initrd_mem(unsigned long start, unsigned long end)
{
free_init_pages("initrd memory", start, end);
free_reserved_area(start, end, POISON_FREE_INITMEM, "initrd");
}
#endif

0 comments on commit 9c362a8

Please sign in to comment.