diff options
Diffstat (limited to 'arch/sparc64/kernel/setup.c')
-rw-r--r-- | arch/sparc64/kernel/setup.c | 58 |
1 files changed, 10 insertions, 48 deletions
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index ddbed3341a23..c1f34237cdf2 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c | |||
@@ -187,17 +187,13 @@ int prom_callback(long *args) | |||
187 | } | 187 | } |
188 | 188 | ||
189 | if ((va >= KERNBASE) && (va < (KERNBASE + (4 * 1024 * 1024)))) { | 189 | if ((va >= KERNBASE) && (va < (KERNBASE + (4 * 1024 * 1024)))) { |
190 | unsigned long kernel_pctx = 0; | 190 | extern unsigned long sparc64_kern_pri_context; |
191 | |||
192 | if (tlb_type == cheetah_plus) | ||
193 | kernel_pctx |= (CTX_CHEETAH_PLUS_NUC | | ||
194 | CTX_CHEETAH_PLUS_CTX0); | ||
195 | 191 | ||
196 | /* Spitfire Errata #32 workaround */ | 192 | /* Spitfire Errata #32 workaround */ |
197 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" | 193 | __asm__ __volatile__("stxa %0, [%1] %2\n\t" |
198 | "flush %%g6" | 194 | "flush %%g6" |
199 | : /* No outputs */ | 195 | : /* No outputs */ |
200 | : "r" (kernel_pctx), | 196 | : "r" (sparc64_kern_pri_context), |
201 | "r" (PRIMARY_CONTEXT), | 197 | "r" (PRIMARY_CONTEXT), |
202 | "i" (ASI_DMMU)); | 198 | "i" (ASI_DMMU)); |
203 | 199 | ||
@@ -464,8 +460,6 @@ static void __init boot_flags_init(char *commands) | |||
464 | } | 460 | } |
465 | } | 461 | } |
466 | 462 | ||
467 | extern int prom_probe_memory(void); | ||
468 | extern unsigned long start, end; | ||
469 | extern void panic_setup(char *, int *); | 463 | extern void panic_setup(char *, int *); |
470 | 464 | ||
471 | extern unsigned short root_flags; | 465 | extern unsigned short root_flags; |
@@ -492,13 +486,8 @@ void register_prom_callbacks(void) | |||
492 | "' linux-.soft2 to .soft2"); | 486 | "' linux-.soft2 to .soft2"); |
493 | } | 487 | } |
494 | 488 | ||
495 | extern void paging_init(void); | ||
496 | |||
497 | void __init setup_arch(char **cmdline_p) | 489 | void __init setup_arch(char **cmdline_p) |
498 | { | 490 | { |
499 | unsigned long highest_paddr; | ||
500 | int i; | ||
501 | |||
502 | /* Initialize PROM console and command line. */ | 491 | /* Initialize PROM console and command line. */ |
503 | *cmdline_p = prom_getbootargs(); | 492 | *cmdline_p = prom_getbootargs(); |
504 | strcpy(saved_command_line, *cmdline_p); | 493 | strcpy(saved_command_line, *cmdline_p); |
@@ -517,40 +506,6 @@ void __init setup_arch(char **cmdline_p) | |||
517 | boot_flags_init(*cmdline_p); | 506 | boot_flags_init(*cmdline_p); |
518 | 507 | ||
519 | idprom_init(); | 508 | idprom_init(); |
520 | (void) prom_probe_memory(); | ||
521 | |||
522 | /* In paging_init() we tip off this value to see if we need | ||
523 | * to change init_mm.pgd to point to the real alias mapping. | ||
524 | */ | ||
525 | phys_base = 0xffffffffffffffffUL; | ||
526 | highest_paddr = 0UL; | ||
527 | for (i = 0; sp_banks[i].num_bytes != 0; i++) { | ||
528 | unsigned long top; | ||
529 | |||
530 | if (sp_banks[i].base_addr < phys_base) | ||
531 | phys_base = sp_banks[i].base_addr; | ||
532 | top = sp_banks[i].base_addr + | ||
533 | sp_banks[i].num_bytes; | ||
534 | if (highest_paddr < top) | ||
535 | highest_paddr = top; | ||
536 | } | ||
537 | pfn_base = phys_base >> PAGE_SHIFT; | ||
538 | |||
539 | switch (tlb_type) { | ||
540 | default: | ||
541 | case spitfire: | ||
542 | kern_base = spitfire_get_itlb_data(sparc64_highest_locked_tlbent()); | ||
543 | kern_base &= _PAGE_PADDR_SF; | ||
544 | break; | ||
545 | |||
546 | case cheetah: | ||
547 | case cheetah_plus: | ||
548 | kern_base = cheetah_get_litlb_data(sparc64_highest_locked_tlbent()); | ||
549 | kern_base &= _PAGE_PADDR; | ||
550 | break; | ||
551 | }; | ||
552 | |||
553 | kern_size = (unsigned long)&_end - (unsigned long)KERNBASE; | ||
554 | 509 | ||
555 | if (!root_flags) | 510 | if (!root_flags) |
556 | root_mountflags &= ~MS_RDONLY; | 511 | root_mountflags &= ~MS_RDONLY; |
@@ -625,6 +580,9 @@ extern void smp_info(struct seq_file *); | |||
625 | extern void smp_bogo(struct seq_file *); | 580 | extern void smp_bogo(struct seq_file *); |
626 | extern void mmu_info(struct seq_file *); | 581 | extern void mmu_info(struct seq_file *); |
627 | 582 | ||
583 | unsigned int dcache_parity_tl1_occurred; | ||
584 | unsigned int icache_parity_tl1_occurred; | ||
585 | |||
628 | static int show_cpuinfo(struct seq_file *m, void *__unused) | 586 | static int show_cpuinfo(struct seq_file *m, void *__unused) |
629 | { | 587 | { |
630 | seq_printf(m, | 588 | seq_printf(m, |
@@ -635,6 +593,8 @@ static int show_cpuinfo(struct seq_file *m, void *__unused) | |||
635 | "type\t\t: sun4u\n" | 593 | "type\t\t: sun4u\n" |
636 | "ncpus probed\t: %ld\n" | 594 | "ncpus probed\t: %ld\n" |
637 | "ncpus active\t: %ld\n" | 595 | "ncpus active\t: %ld\n" |
596 | "D$ parity tl1\t: %u\n" | ||
597 | "I$ parity tl1\t: %u\n" | ||
638 | #ifndef CONFIG_SMP | 598 | #ifndef CONFIG_SMP |
639 | "Cpu0Bogo\t: %lu.%02lu\n" | 599 | "Cpu0Bogo\t: %lu.%02lu\n" |
640 | "Cpu0ClkTck\t: %016lx\n" | 600 | "Cpu0ClkTck\t: %016lx\n" |
@@ -647,7 +607,9 @@ static int show_cpuinfo(struct seq_file *m, void *__unused) | |||
647 | (prom_prev >> 8) & 0xff, | 607 | (prom_prev >> 8) & 0xff, |
648 | prom_prev & 0xff, | 608 | prom_prev & 0xff, |
649 | (long)num_possible_cpus(), | 609 | (long)num_possible_cpus(), |
650 | (long)num_online_cpus() | 610 | (long)num_online_cpus(), |
611 | dcache_parity_tl1_occurred, | ||
612 | icache_parity_tl1_occurred | ||
651 | #ifndef CONFIG_SMP | 613 | #ifndef CONFIG_SMP |
652 | , cpu_data(0).udelay_val/(500000/HZ), | 614 | , cpu_data(0).udelay_val/(500000/HZ), |
653 | (cpu_data(0).udelay_val/(5000/HZ)) % 100, | 615 | (cpu_data(0).udelay_val/(5000/HZ)) % 100, |