Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113105
b: refs/heads/master
c: 1aa0365
h: refs/heads/master
i:
  113103: 866acb2
v: v3
  • Loading branch information
Robert Reif authored and David S. Miller committed Sep 3, 2008
1 parent 6eba07c commit 7f50311
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 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: 94d5b5432b96efa69840b397853cf2cb81ab4fab
refs/heads/master: 1aa0365f275f7df6bb1e0b6667ed2b54199fe21d
14 changes: 11 additions & 3 deletions trunk/arch/sparc/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/highmem.h>
#include <linux/bootmem.h>
#include <linux/pagemap.h>
#include <linux/poison.h>

#include <asm/system.h>
#include <asm/vac-ops.h>
Expand Down Expand Up @@ -480,6 +481,7 @@ void free_initmem (void)
for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) {
struct page *p;

memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE);
p = virt_to_page(addr);

ClearPageReserved(p);
Expand All @@ -488,20 +490,26 @@ void free_initmem (void)
totalram_pages++;
num_physpages++;
}
printk (KERN_INFO "Freeing unused kernel memory: %dk freed\n", (&__init_end - &__init_begin) >> 10);
printk(KERN_INFO "Freeing unused kernel memory: %dk freed\n",
(&__init_end - &__init_begin) >> 10);
}

#ifdef CONFIG_BLK_DEV_INITRD
void free_initrd_mem(unsigned long start, unsigned long end)
{
if (start < end)
printk (KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
printk(KERN_INFO "Freeing initrd memory: %ldk freed\n",
(end - start) >> 10);
for (; start < end; start += PAGE_SIZE) {
struct page *p = virt_to_page(start);
struct page *p;

memset((void *)start, POISON_FREE_INITMEM, PAGE_SIZE);
p = virt_to_page(start);

ClearPageReserved(p);
init_page_count(p);
__free_page(p);
totalram_pages++;
num_physpages++;
}
}
Expand Down

0 comments on commit 7f50311

Please sign in to comment.