diff options
Diffstat (limited to 'arch/m68k/mm/init.c')
-rw-r--r-- | arch/m68k/mm/init.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index b0f201a409f3..f0e05bce92f2 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c | |||
@@ -103,32 +103,26 @@ void __init paging_init(void) | |||
103 | free_area_init(zones_size); | 103 | free_area_init(zones_size); |
104 | } | 104 | } |
105 | 105 | ||
106 | #endif /* CONFIG_MMU */ | ||
107 | |||
106 | void free_initmem(void) | 108 | void free_initmem(void) |
107 | { | 109 | { |
108 | #ifdef CONFIG_RAMKERNEL | 110 | #ifndef CONFIG_MMU_SUN3 |
109 | unsigned long addr; | 111 | unsigned long addr; |
110 | 112 | ||
111 | /* | 113 | addr = (unsigned long) __init_begin; |
112 | * The following code should be cool even if these sections | 114 | for (; addr < ((unsigned long) __init_end); addr += PAGE_SIZE) { |
113 | * are not page aligned. | ||
114 | */ | ||
115 | addr = PAGE_ALIGN((unsigned long) __init_begin); | ||
116 | /* next to check that the page we free is not a partial page */ | ||
117 | for (; addr + PAGE_SIZE < ((unsigned long) __init_end); addr += PAGE_SIZE) { | ||
118 | ClearPageReserved(virt_to_page(addr)); | 115 | ClearPageReserved(virt_to_page(addr)); |
119 | init_page_count(virt_to_page(addr)); | 116 | init_page_count(virt_to_page(addr)); |
120 | free_page(addr); | 117 | free_page(addr); |
121 | totalram_pages++; | 118 | totalram_pages++; |
122 | } | 119 | } |
123 | pr_notice("Freeing unused kernel memory: %luk freed (0x%x - 0x%x)\n", | 120 | pr_notice("Freeing unused kernel memory: %luk freed (0x%x - 0x%x)\n", |
124 | (addr - PAGE_ALIGN((unsigned long) __init_begin)) >> 10, | 121 | (addr - (unsigned long) __init_begin) >> 10, |
125 | (int)(PAGE_ALIGN((unsigned long) __init_begin)), | 122 | (unsigned int) __init_begin, (unsigned int) __init_end); |
126 | (int)(addr - PAGE_SIZE)); | 123 | #endif /* CONFIG_MMU_SUN3 */ |
127 | #endif | ||
128 | } | 124 | } |
129 | 125 | ||
130 | #endif /* CONFIG_MMU */ | ||
131 | |||
132 | #if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE) | 126 | #if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE) |
133 | #define VECTORS &vectors[0] | 127 | #define VECTORS &vectors[0] |
134 | #else | 128 | #else |