diff options
Diffstat (limited to 'arch/powerpc/kernel/setup_64.c')
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 62 |
1 files changed, 10 insertions, 52 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 6791668213e7..fdbd9f9122f2 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -57,7 +57,6 @@ | |||
57 | #include <asm/lmb.h> | 57 | #include <asm/lmb.h> |
58 | #include <asm/iseries/it_lp_naca.h> | 58 | #include <asm/iseries/it_lp_naca.h> |
59 | #include <asm/firmware.h> | 59 | #include <asm/firmware.h> |
60 | #include <asm/systemcfg.h> | ||
61 | #include <asm/xmon.h> | 60 | #include <asm/xmon.h> |
62 | #include <asm/udbg.h> | 61 | #include <asm/udbg.h> |
63 | 62 | ||
@@ -375,9 +374,8 @@ static void __init initialize_cache_info(void) | |||
375 | DBG("Argh, can't find dcache properties ! " | 374 | DBG("Argh, can't find dcache properties ! " |
376 | "sizep: %p, lsizep: %p\n", sizep, lsizep); | 375 | "sizep: %p, lsizep: %p\n", sizep, lsizep); |
377 | 376 | ||
378 | _systemcfg->dcache_size = ppc64_caches.dsize = size; | 377 | ppc64_caches.dsize = size; |
379 | _systemcfg->dcache_line_size = | 378 | ppc64_caches.dline_size = lsize; |
380 | ppc64_caches.dline_size = lsize; | ||
381 | ppc64_caches.log_dline_size = __ilog2(lsize); | 379 | ppc64_caches.log_dline_size = __ilog2(lsize); |
382 | ppc64_caches.dlines_per_page = PAGE_SIZE / lsize; | 380 | ppc64_caches.dlines_per_page = PAGE_SIZE / lsize; |
383 | 381 | ||
@@ -393,22 +391,13 @@ static void __init initialize_cache_info(void) | |||
393 | DBG("Argh, can't find icache properties ! " | 391 | DBG("Argh, can't find icache properties ! " |
394 | "sizep: %p, lsizep: %p\n", sizep, lsizep); | 392 | "sizep: %p, lsizep: %p\n", sizep, lsizep); |
395 | 393 | ||
396 | _systemcfg->icache_size = ppc64_caches.isize = size; | 394 | ppc64_caches.isize = size; |
397 | _systemcfg->icache_line_size = | 395 | ppc64_caches.iline_size = lsize; |
398 | ppc64_caches.iline_size = lsize; | ||
399 | ppc64_caches.log_iline_size = __ilog2(lsize); | 396 | ppc64_caches.log_iline_size = __ilog2(lsize); |
400 | ppc64_caches.ilines_per_page = PAGE_SIZE / lsize; | 397 | ppc64_caches.ilines_per_page = PAGE_SIZE / lsize; |
401 | } | 398 | } |
402 | } | 399 | } |
403 | 400 | ||
404 | /* Add an eye catcher and the systemcfg layout version number */ | ||
405 | strcpy(_systemcfg->eye_catcher, "SYSTEMCFG:PPC64"); | ||
406 | _systemcfg->version.major = SYSTEMCFG_MAJOR; | ||
407 | _systemcfg->version.minor = SYSTEMCFG_MINOR; | ||
408 | _systemcfg->processor = mfspr(SPRN_PVR); | ||
409 | _systemcfg->platform = _machine; | ||
410 | _systemcfg->physicalMemorySize = lmb_phys_mem_size(); | ||
411 | |||
412 | DBG(" <- initialize_cache_info()\n"); | 401 | DBG(" <- initialize_cache_info()\n"); |
413 | } | 402 | } |
414 | 403 | ||
@@ -495,15 +484,14 @@ void __init setup_system(void) | |||
495 | 484 | ||
496 | printk("-----------------------------------------------------\n"); | 485 | printk("-----------------------------------------------------\n"); |
497 | printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); | 486 | printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); |
498 | printk("ppc64_interrupt_controller = 0x%ld\n", ppc64_interrupt_controller); | 487 | printk("ppc64_interrupt_controller = 0x%ld\n", |
499 | printk("systemcfg = 0x%p\n", _systemcfg); | 488 | ppc64_interrupt_controller); |
500 | printk("systemcfg->platform = 0x%x\n", _systemcfg->platform); | 489 | printk("platform = 0x%x\n", _machine); |
501 | printk("systemcfg->processorCount = 0x%lx\n", _systemcfg->processorCount); | 490 | printk("physicalMemorySize = 0x%lx\n", lmb_phys_mem_size()); |
502 | printk("systemcfg->physicalMemorySize = 0x%lx\n", _systemcfg->physicalMemorySize); | ||
503 | printk("ppc64_caches.dcache_line_size = 0x%x\n", | 491 | printk("ppc64_caches.dcache_line_size = 0x%x\n", |
504 | ppc64_caches.dline_size); | 492 | ppc64_caches.dline_size); |
505 | printk("ppc64_caches.icache_line_size = 0x%x\n", | 493 | printk("ppc64_caches.icache_line_size = 0x%x\n", |
506 | ppc64_caches.iline_size); | 494 | ppc64_caches.iline_size); |
507 | printk("htab_address = 0x%p\n", htab_address); | 495 | printk("htab_address = 0x%p\n", htab_address); |
508 | printk("htab_hash_mask = 0x%lx\n", htab_hash_mask); | 496 | printk("htab_hash_mask = 0x%lx\n", htab_hash_mask); |
509 | printk("-----------------------------------------------------\n"); | 497 | printk("-----------------------------------------------------\n"); |
@@ -568,33 +556,6 @@ static void __init emergency_stack_init(void) | |||
568 | } | 556 | } |
569 | 557 | ||
570 | /* | 558 | /* |
571 | * Called from setup_arch to initialize the bitmap of available | ||
572 | * syscalls in the systemcfg page | ||
573 | */ | ||
574 | void __init setup_syscall_map(void) | ||
575 | { | ||
576 | unsigned int i, count64 = 0, count32 = 0; | ||
577 | extern unsigned long *sys_call_table; | ||
578 | extern unsigned long sys_ni_syscall; | ||
579 | |||
580 | |||
581 | for (i = 0; i < __NR_syscalls; i++) { | ||
582 | if (sys_call_table[i*2] != sys_ni_syscall) { | ||
583 | count64++; | ||
584 | _systemcfg->syscall_map_64[i >> 5] |= | ||
585 | 0x80000000UL >> (i & 0x1f); | ||
586 | } | ||
587 | if (sys_call_table[i*2+1] != sys_ni_syscall) { | ||
588 | count32++; | ||
589 | _systemcfg->syscall_map_32[i >> 5] |= | ||
590 | 0x80000000UL >> (i & 0x1f); | ||
591 | } | ||
592 | } | ||
593 | printk(KERN_INFO "Syscall map setup, %d 32-bit and %d 64-bit syscalls\n", | ||
594 | count32, count64); | ||
595 | } | ||
596 | |||
597 | /* | ||
598 | * Called into from start_kernel, after lock_kernel has been called. | 559 | * Called into from start_kernel, after lock_kernel has been called. |
599 | * Initializes bootmem, which is unsed to manage page allocation until | 560 | * Initializes bootmem, which is unsed to manage page allocation until |
600 | * mem_init is called. | 561 | * mem_init is called. |
@@ -635,9 +596,6 @@ void __init setup_arch(char **cmdline_p) | |||
635 | do_init_bootmem(); | 596 | do_init_bootmem(); |
636 | sparse_init(); | 597 | sparse_init(); |
637 | 598 | ||
638 | /* initialize the syscall map in systemcfg */ | ||
639 | setup_syscall_map(); | ||
640 | |||
641 | #ifdef CONFIG_DUMMY_CONSOLE | 599 | #ifdef CONFIG_DUMMY_CONSOLE |
642 | conswitchp = &dummy_con; | 600 | conswitchp = &dummy_con; |
643 | #endif | 601 | #endif |