Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343373
b: refs/heads/master
c: f50bf88
h: refs/heads/master
i:
  343371: e0363e1
v: v3
  • Loading branch information
Greg Ungerer authored and Geert Uytterhoeven committed Nov 14, 2012
1 parent 12b04eb commit fa0cfea
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 37 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: dd1cb3a7c43508c29e17836628090c0735bd3137
refs/heads/master: f50bf88df3ccda3e88e28f81d366dc79266a16c8
22 changes: 8 additions & 14 deletions trunk/arch/m68k/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,32 +103,26 @@ void __init paging_init(void)
free_area_init(zones_size);
}

#endif /* CONFIG_MMU */

void free_initmem(void)
{
#ifdef CONFIG_RAMKERNEL
#ifndef CONFIG_MMU_SUN3
unsigned long addr;

/*
* The following code should be cool even if these sections
* are not page aligned.
*/
addr = PAGE_ALIGN((unsigned long) __init_begin);
/* next to check that the page we free is not a partial page */
for (; addr + PAGE_SIZE < ((unsigned long) __init_end); addr += PAGE_SIZE) {
addr = (unsigned long) __init_begin;
for (; addr < ((unsigned long) __init_end); addr += PAGE_SIZE) {
ClearPageReserved(virt_to_page(addr));
init_page_count(virt_to_page(addr));
free_page(addr);
totalram_pages++;
}
pr_notice("Freeing unused kernel memory: %luk freed (0x%x - 0x%x)\n",
(addr - PAGE_ALIGN((unsigned long) __init_begin)) >> 10,
(int)(PAGE_ALIGN((unsigned long) __init_begin)),
(int)(addr - PAGE_SIZE));
#endif
(addr - (unsigned long) __init_begin) >> 10,
(unsigned int) __init_begin, (unsigned int) __init_end);
#endif /* CONFIG_MMU_SUN3 */
}

#endif /* CONFIG_MMU */

#if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE)
#define VECTORS &vectors[0]
#else
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/m68k/mm/mcfmmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ atomic_t nr_free_contexts;
struct mm_struct *context_mm[LAST_CONTEXT+1];
extern unsigned long num_pages;

void free_initmem(void)
{
}

/*
* ColdFire paging_init derived from sun3.
*/
Expand Down
14 changes: 0 additions & 14 deletions trunk/arch/m68k/mm/motorola.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,17 +304,3 @@ void __init paging_init(void)
}
}

void free_initmem(void)
{
unsigned long addr;

addr = (unsigned long)__init_begin;
for (; addr < (unsigned long)__init_end; addr += PAGE_SIZE) {
virt_to_page(addr)->flags &= ~(1 << PG_reserved);
init_page_count(virt_to_page(addr));
free_page(addr);
totalram_pages++;
}
}


4 changes: 0 additions & 4 deletions trunk/arch/m68k/mm/sun3mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ const char bad_pmd_string[] = "Bad pmd in pte_alloc: %08lx\n";

extern unsigned long num_pages;

void free_initmem(void)
{
}

/* For the sun3 we try to follow the i386 paging_init() more closely */
/* start_mem and end_mem have PAGE_OFFSET added already */
/* now sets up tables using sun3 PTEs rather than i386 as before. --m */
Expand Down

0 comments on commit fa0cfea

Please sign in to comment.