Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365355
b: refs/heads/master
c: c15da0a
h: refs/heads/master
i:
  365353: 35b01fc
  365351: 492d9fb
v: v3
  • Loading branch information
Jiang Liu authored and Linus Torvalds committed Apr 29, 2013
1 parent 205bcf6 commit 4588841
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 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: 83db0384a92ac4e52dccd275bc1a58dca86d629d
refs/heads/master: c15da0a87c33e32b4984d367799b32dda2024af8
24 changes: 2 additions & 22 deletions trunk/arch/avr32/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,34 +146,14 @@ void __init mem_init(void)
initsize >> 10);
}

static inline void free_area(unsigned long addr, unsigned long end, char *s)
{
unsigned int size = (end - addr) >> 10;

for (; addr < end; addr += PAGE_SIZE) {
struct page *page = virt_to_page(addr);
ClearPageReserved(page);
init_page_count(page);
free_page(addr);
totalram_pages++;
}

if (size && s)
printk(KERN_INFO "Freeing %s memory: %dK (%lx - %lx)\n",
s, size, end - (size << 10), end);
}

void free_initmem(void)
{
free_area((unsigned long)__init_begin, (unsigned long)__init_end,
"init");
free_initmem_default(0);
}

#ifdef CONFIG_BLK_DEV_INITRD

void free_initrd_mem(unsigned long start, unsigned long end)
{
free_area(start, end, "initrd");
free_reserved_area(start, end, 0, "initrd");
}

#endif

0 comments on commit 4588841

Please sign in to comment.