aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/setup.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2005-09-26 03:32:17 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-09-26 03:32:17 -0400
commit80dc0d6b44ce0f01df58d8899e46612690ed7d81 (patch)
tree570b8e834c0fae0793bdf75dd2fd2516b0fabf4f /arch/sparc64/kernel/setup.c
parent56425306517ef28a9b480161cdb96d182172bc1d (diff)
[SPARC64]: Probe D/I/E-cache config and use.
At boot time, determine the D-cache, I-cache and E-cache size and line-size. Use them in cache flushes when appropriate. This change was motivated by discovering that the D-cache on UltraSparc-IIIi and later are 64K not 32K, and the flushes done by the Cheetah error handlers were assuming a 32K size. There are still some pieces of code that are hard coding things and will need to be fixed up at some point. While we're here, fix the D-cache and I-cache parity error handlers to run with interrupts disabled, and when the trap occurs at trap level > 1 log the event via a counter displayed in /proc/cpuinfo. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/setup.c')
-rw-r--r--arch/sparc64/kernel/setup.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index f4345d837284..8e8baf2354df 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -605,6 +605,9 @@ extern void smp_info(struct seq_file *);
605extern void smp_bogo(struct seq_file *); 605extern void smp_bogo(struct seq_file *);
606extern void mmu_info(struct seq_file *); 606extern void mmu_info(struct seq_file *);
607 607
608unsigned int dcache_parity_tl1_occurred;
609unsigned int icache_parity_tl1_occurred;
610
608static int show_cpuinfo(struct seq_file *m, void *__unused) 611static int show_cpuinfo(struct seq_file *m, void *__unused)
609{ 612{
610 seq_printf(m, 613 seq_printf(m,
@@ -615,6 +618,8 @@ static int show_cpuinfo(struct seq_file *m, void *__unused)
615 "type\t\t: sun4u\n" 618 "type\t\t: sun4u\n"
616 "ncpus probed\t: %ld\n" 619 "ncpus probed\t: %ld\n"
617 "ncpus active\t: %ld\n" 620 "ncpus active\t: %ld\n"
621 "D$ parity tl1\t: %u\n"
622 "I$ parity tl1\t: %u\n"
618#ifndef CONFIG_SMP 623#ifndef CONFIG_SMP
619 "Cpu0Bogo\t: %lu.%02lu\n" 624 "Cpu0Bogo\t: %lu.%02lu\n"
620 "Cpu0ClkTck\t: %016lx\n" 625 "Cpu0ClkTck\t: %016lx\n"
@@ -627,7 +632,9 @@ static int show_cpuinfo(struct seq_file *m, void *__unused)
627 (prom_prev >> 8) & 0xff, 632 (prom_prev >> 8) & 0xff,
628 prom_prev & 0xff, 633 prom_prev & 0xff,
629 (long)num_possible_cpus(), 634 (long)num_possible_cpus(),
630 (long)num_online_cpus() 635 (long)num_online_cpus(),
636 dcache_parity_tl1_occurred,
637 icache_parity_tl1_occurred
631#ifndef CONFIG_SMP 638#ifndef CONFIG_SMP
632 , cpu_data(0).udelay_val/(500000/HZ), 639 , cpu_data(0).udelay_val/(500000/HZ),
633 (cpu_data(0).udelay_val/(5000/HZ)) % 100, 640 (cpu_data(0).udelay_val/(5000/HZ)) % 100,