Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 Make the same change to icache/dcac...
details: https://anonhg.NetBSD.org/src/rev/eda38942d10b
branches: trunk
changeset: 519961:eda38942d10b
user: matt <matt%NetBSD.org@localhost>
date: Mon Dec 31 16:26:10 2001 +0000
description:
Make the same change to icache/dcache size calculation as was done to ecache.
Fixes PR 12844.
diffstat:
sys/arch/sparc64/sparc64/cpu.c | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diffs (50 lines):
diff -r 941cc73f6665 -r eda38942d10b sys/arch/sparc64/sparc64/cpu.c
--- a/sys/arch/sparc64/sparc64/cpu.c Mon Dec 31 15:55:51 2001 +0000
+++ b/sys/arch/sparc64/sparc64/cpu.c Mon Dec 31 16:26:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.17 2001/12/31 07:30:46 matt Exp $ */
+/* $NetBSD: cpu.c,v 1.18 2001/12/31 16:26:10 matt Exp $ */
/*
* Copyright (c) 1996
@@ -293,9 +293,13 @@
if ((1 << i) != l && l)
panic("bad icache line size %d", l);
cacheinfo.ic_l2linesize = i;
- cacheinfo.ic_totalsize = l *
- PROM_getpropint(node, "icache-nlines", 64) *
+ cacheinfo.ic_totalsize =
+ PROM_getpropint(node, "icache-size", 0) *
PROM_getpropint(node, "icache-associativity", 1);
+ if (cacheinfo.ic_totalsize == 0)
+ cacheinfo.ic_totalsize = l *
+ PROM_getpropint(node, "icache-nlines", 64) *
+ PROM_getpropint(node, "icache-associativity", 1);
cachesize = cacheinfo.ic_totalsize /
PROM_getpropint(node, "icache-associativity", 1);
@@ -308,9 +312,13 @@
if ((1 << i) != l && l)
panic("bad dcache line size %d", l);
cacheinfo.dc_l2linesize = i;
- cacheinfo.dc_totalsize = l *
- PROM_getpropint(node, "dcache-nlines", 128) *
+ cacheinfo.dc_totalsize =
+ PROM_getpropint(node, "dcache-size", 0) *
PROM_getpropint(node, "dcache-associativity", 1);
+ if (cacheinfo.dc_totalsize == 0)
+ cacheinfo.dc_totalsize = l *
+ PROM_getpropint(node, "dcache-nlines", 128) *
+ PROM_getpropint(node, "dcache-associativity", 1);
cachesize = cacheinfo.dc_totalsize /
PROM_getpropint(node, "dcache-associativity", 1);
@@ -373,7 +381,7 @@
(long)cacheinfo.ec_totalsize/1024,
(long)cacheinfo.ec_linesize);
}
- printf(" \n");
+ printf("\n");
cache_enable();
/*
Home |
Main Index |
Thread Index |
Old Index