aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/kernel/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/kernel/setup.c')
-rw-r--r--arch/m68k/kernel/setup.c37
1 files changed, 8 insertions, 29 deletions
diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c
index 610319356691..215c7bd43924 100644
--- a/arch/m68k/kernel/setup.c
+++ b/arch/m68k/kernel/setup.c
@@ -60,14 +60,12 @@ extern unsigned long availmem;
60int m68k_num_memory; 60int m68k_num_memory;
61int m68k_realnum_memory; 61int m68k_realnum_memory;
62EXPORT_SYMBOL(m68k_realnum_memory); 62EXPORT_SYMBOL(m68k_realnum_memory);
63#ifdef CONFIG_SINGLE_MEMORY_CHUNK
64unsigned long m68k_memoffset; 63unsigned long m68k_memoffset;
65EXPORT_SYMBOL(m68k_memoffset); 64EXPORT_SYMBOL(m68k_memoffset);
66#endif
67struct mem_info m68k_memory[NUM_MEMINFO]; 65struct mem_info m68k_memory[NUM_MEMINFO];
68EXPORT_SYMBOL(m68k_memory); 66EXPORT_SYMBOL(m68k_memory);
69 67
70static struct mem_info m68k_ramdisk; 68struct mem_info m68k_ramdisk;
71 69
72static char m68k_command_line[CL_SIZE]; 70static char m68k_command_line[CL_SIZE];
73 71
@@ -208,9 +206,6 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
208void __init setup_arch(char **cmdline_p) 206void __init setup_arch(char **cmdline_p)
209{ 207{
210 extern int _etext, _edata, _end; 208 extern int _etext, _edata, _end;
211#ifndef CONFIG_SUN3
212 unsigned long endmem, startmem;
213#endif
214 int i; 209 int i;
215 210
216 /* The bootinfo is located right after the kernel bss */ 211 /* The bootinfo is located right after the kernel bss */
@@ -320,30 +315,16 @@ void __init setup_arch(char **cmdline_p)
320 panic("No configuration setup"); 315 panic("No configuration setup");
321 } 316 }
322 317
323#ifndef CONFIG_SUN3 318 paging_init();
324 startmem= m68k_memory[0].addr;
325 endmem = startmem + m68k_memory[0].size;
326 high_memory = (void *)PAGE_OFFSET;
327 for (i = 0; i < m68k_num_memory; i++) {
328 m68k_memory[i].size &= MASK_256K;
329 if (m68k_memory[i].addr < startmem)
330 startmem = m68k_memory[i].addr;
331 if (m68k_memory[i].addr+m68k_memory[i].size > endmem)
332 endmem = m68k_memory[i].addr+m68k_memory[i].size;
333 high_memory += m68k_memory[i].size;
334 }
335
336 availmem += init_bootmem_node(NODE_DATA(0), availmem >> PAGE_SHIFT,
337 startmem >> PAGE_SHIFT, endmem >> PAGE_SHIFT);
338
339 for (i = 0; i < m68k_num_memory; i++)
340 free_bootmem(m68k_memory[i].addr, m68k_memory[i].size);
341
342 reserve_bootmem(m68k_memory[0].addr, availmem - m68k_memory[0].addr);
343 319
320#ifndef CONFIG_SUN3
321 for (i = 1; i < m68k_num_memory; i++)
322 free_bootmem_node(NODE_DATA(i), m68k_memory[i].addr,
323 m68k_memory[i].size);
344#ifdef CONFIG_BLK_DEV_INITRD 324#ifdef CONFIG_BLK_DEV_INITRD
345 if (m68k_ramdisk.size) { 325 if (m68k_ramdisk.size) {
346 reserve_bootmem(m68k_ramdisk.addr, m68k_ramdisk.size); 326 reserve_bootmem_node(__virt_to_node(phys_to_virt(m68k_ramdisk.addr)),
327 m68k_ramdisk.addr, m68k_ramdisk.size);
347 initrd_start = (unsigned long)phys_to_virt(m68k_ramdisk.addr); 328 initrd_start = (unsigned long)phys_to_virt(m68k_ramdisk.addr);
348 initrd_end = initrd_start + m68k_ramdisk.size; 329 initrd_end = initrd_start + m68k_ramdisk.size;
349 printk("initrd: %08lx - %08lx\n", initrd_start, initrd_end); 330 printk("initrd: %08lx - %08lx\n", initrd_start, initrd_end);
@@ -362,8 +343,6 @@ void __init setup_arch(char **cmdline_p)
362 343
363#endif /* !CONFIG_SUN3 */ 344#endif /* !CONFIG_SUN3 */
364 345
365 paging_init();
366
367/* set ISA defs early as possible */ 346/* set ISA defs early as possible */
368#if defined(CONFIG_ISA) && defined(MULTI_ISA) 347#if defined(CONFIG_ISA) && defined(MULTI_ISA)
369#if defined(CONFIG_Q40) 348#if defined(CONFIG_Q40)