diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-06-14 15:15:49 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-06-14 15:15:49 +0900 |
commit | 9aa7719e0c6a1580451900e672744752804f8f75 (patch) | |
tree | ba36c5536342db2759d0a1843dffd0c193e26ff0 /arch/powerpc/mm/mem.c | |
parent | 583af252ab07cd1e8721878463da5b7016c18fdc (diff) | |
parent | 2c53b436a30867eb6b47dd7bab23ba638d1fb0d2 (diff) | |
download | blackbird-obmc-linux-9aa7719e0c6a1580451900e672744752804f8f75.tar.gz blackbird-obmc-linux-9aa7719e0c6a1580451900e672744752804f8f75.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-fixes-for-linus
Diffstat (limited to 'arch/powerpc/mm/mem.c')
-rw-r--r-- | arch/powerpc/mm/mem.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 57e545b84bf1..29d4dde65c45 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c @@ -382,6 +382,25 @@ void __init mem_init(void) mem_init_done = 1; } +#ifdef CONFIG_BLK_DEV_INITRD +void __init free_initrd_mem(unsigned long start, unsigned long end) +{ + if (start >= end) + return; + + start = _ALIGN_DOWN(start, PAGE_SIZE); + end = _ALIGN_UP(end, PAGE_SIZE); + 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++; + } +} +#endif + /* * This is called when a page has been modified by the kernel. * It just marks the page as not i-cache clean. We do the i-cache |