diff options
Diffstat (limited to 'arch/m68k/mm')
-rw-r--r-- | arch/m68k/mm/init_mm.c | 5 | ||||
-rw-r--r-- | arch/m68k/mm/init_no.c | 21 |
2 files changed, 8 insertions, 18 deletions
diff --git a/arch/m68k/mm/init_mm.c b/arch/m68k/mm/init_mm.c index 9113c2f17607..bbe525434ccb 100644 --- a/arch/m68k/mm/init_mm.c +++ b/arch/m68k/mm/init_mm.c | |||
@@ -83,11 +83,6 @@ void __init mem_init(void) | |||
83 | int initpages = 0; | 83 | int initpages = 0; |
84 | int i; | 84 | int i; |
85 | 85 | ||
86 | #ifdef CONFIG_ATARI | ||
87 | if (MACH_IS_ATARI) | ||
88 | atari_stram_mem_init_hook(); | ||
89 | #endif | ||
90 | |||
91 | /* this will put all memory onto the freelists */ | 86 | /* this will put all memory onto the freelists */ |
92 | totalram_pages = num_physpages = 0; | 87 | totalram_pages = num_physpages = 0; |
93 | for_each_online_pgdat(pgdat) { | 88 | for_each_online_pgdat(pgdat) { |
diff --git a/arch/m68k/mm/init_no.c b/arch/m68k/mm/init_no.c index 50cd12cf28d9..1e33d39ca9a0 100644 --- a/arch/m68k/mm/init_no.c +++ b/arch/m68k/mm/init_no.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/gfp.h> | 32 | #include <linux/gfp.h> |
33 | 33 | ||
34 | #include <asm/setup.h> | 34 | #include <asm/setup.h> |
35 | #include <asm/sections.h> | ||
35 | #include <asm/segment.h> | 36 | #include <asm/segment.h> |
36 | #include <asm/page.h> | 37 | #include <asm/page.h> |
37 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
@@ -44,9 +45,6 @@ | |||
44 | */ | 45 | */ |
45 | void *empty_zero_page; | 46 | void *empty_zero_page; |
46 | 47 | ||
47 | extern unsigned long memory_start; | ||
48 | extern unsigned long memory_end; | ||
49 | |||
50 | /* | 48 | /* |
51 | * paging_init() continues the virtual memory environment setup which | 49 | * paging_init() continues the virtual memory environment setup which |
52 | * was begun by the code in arch/head.S. | 50 | * was begun by the code in arch/head.S. |
@@ -78,8 +76,6 @@ void __init mem_init(void) | |||
78 | { | 76 | { |
79 | int codek = 0, datak = 0, initk = 0; | 77 | int codek = 0, datak = 0, initk = 0; |
80 | unsigned long tmp; | 78 | unsigned long tmp; |
81 | extern char _etext, _stext, _sdata, _ebss, __init_begin, __init_end; | ||
82 | extern unsigned int _ramend, _rambase; | ||
83 | unsigned long len = _ramend - _rambase; | 79 | unsigned long len = _ramend - _rambase; |
84 | unsigned long start_mem = memory_start; /* DAVIDM - these must start at end of kernel */ | 80 | unsigned long start_mem = memory_start; /* DAVIDM - these must start at end of kernel */ |
85 | unsigned long end_mem = memory_end; /* DAVIDM - this must not include kernel stack at top */ | 81 | unsigned long end_mem = memory_end; /* DAVIDM - this must not include kernel stack at top */ |
@@ -95,9 +91,9 @@ void __init mem_init(void) | |||
95 | /* this will put all memory onto the freelists */ | 91 | /* this will put all memory onto the freelists */ |
96 | totalram_pages = free_all_bootmem(); | 92 | totalram_pages = free_all_bootmem(); |
97 | 93 | ||
98 | codek = (&_etext - &_stext) >> 10; | 94 | codek = (_etext - _stext) >> 10; |
99 | datak = (&_ebss - &_sdata) >> 10; | 95 | datak = (_ebss - _sdata) >> 10; |
100 | initk = (&__init_begin - &__init_end) >> 10; | 96 | initk = (__init_begin - __init_end) >> 10; |
101 | 97 | ||
102 | tmp = nr_free_pages() << PAGE_SHIFT; | 98 | tmp = nr_free_pages() << PAGE_SHIFT; |
103 | printk(KERN_INFO "Memory available: %luk/%luk RAM, (%dk kernel code, %dk data)\n", | 99 | printk(KERN_INFO "Memory available: %luk/%luk RAM, (%dk kernel code, %dk data)\n", |
@@ -129,22 +125,21 @@ void free_initmem(void) | |||
129 | { | 125 | { |
130 | #ifdef CONFIG_RAMKERNEL | 126 | #ifdef CONFIG_RAMKERNEL |
131 | unsigned long addr; | 127 | unsigned long addr; |
132 | extern char __init_begin, __init_end; | ||
133 | /* | 128 | /* |
134 | * The following code should be cool even if these sections | 129 | * The following code should be cool even if these sections |
135 | * are not page aligned. | 130 | * are not page aligned. |
136 | */ | 131 | */ |
137 | addr = PAGE_ALIGN((unsigned long)(&__init_begin)); | 132 | addr = PAGE_ALIGN((unsigned long) __init_begin); |
138 | /* next to check that the page we free is not a partial page */ | 133 | /* next to check that the page we free is not a partial page */ |
139 | for (; addr + PAGE_SIZE < (unsigned long)(&__init_end); addr +=PAGE_SIZE) { | 134 | for (; addr + PAGE_SIZE < ((unsigned long) __init_end); addr += PAGE_SIZE) { |
140 | ClearPageReserved(virt_to_page(addr)); | 135 | ClearPageReserved(virt_to_page(addr)); |
141 | init_page_count(virt_to_page(addr)); | 136 | init_page_count(virt_to_page(addr)); |
142 | free_page(addr); | 137 | free_page(addr); |
143 | totalram_pages++; | 138 | totalram_pages++; |
144 | } | 139 | } |
145 | pr_notice("Freeing unused kernel memory: %luk freed (0x%x - 0x%x)\n", | 140 | pr_notice("Freeing unused kernel memory: %luk freed (0x%x - 0x%x)\n", |
146 | (addr - PAGE_ALIGN((long) &__init_begin)) >> 10, | 141 | (addr - PAGE_ALIGN((unsigned long) __init_begin)) >> 10, |
147 | (int)(PAGE_ALIGN((unsigned long)(&__init_begin))), | 142 | (int)(PAGE_ALIGN((unsigned long) __init_begin)), |
148 | (int)(addr - PAGE_SIZE)); | 143 | (int)(addr - PAGE_SIZE)); |
149 | #endif | 144 | #endif |
150 | } | 145 | } |