summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-01-07 18:13:42 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-01-07 18:13:42 +0000
commitb3f266ca412dc47853a5d3de203358fb6cca7eaf (patch)
treecf76c39852a39b65acc72fbe140454824b647a77 /sys/arch/sparc64
parent51edd210cfec73b7a7f90ee1b2237199e7dca132 (diff)
The associativity of the cache is already taken into account for
[ide]cache-size, so don't multiply it with [ide]cache-associativity.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/cpu.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/arch/sparc64/sparc64/cpu.c b/sys/arch/sparc64/sparc64/cpu.c
index 8902ac6d917..8b69deaba04 100644
--- a/sys/arch/sparc64/sparc64/cpu.c
+++ b/sys/arch/sparc64/sparc64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.17 2007/01/07 16:54:46 kettenis Exp $ */
+/* $OpenBSD: cpu.c,v 1.18 2007/01/07 18:13:41 kettenis Exp $ */
/* $NetBSD: cpu.c,v 1.13 2001/05/26 21:27:15 chs Exp $ */
/*
@@ -187,9 +187,7 @@ cpu_attach(parent, dev, aux)
if ((1 << i) != l && l)
panic("bad icache line size %d", l);
cacheinfo.ic_l2linesize = i;
- cacheinfo.ic_totalsize =
- getpropint(node, "icache-size", 0) *
- getpropint(node, "icache-associativity", 1);
+ cacheinfo.ic_totalsize = getpropint(node, "icache-size", 0);
if (cacheinfo.ic_totalsize == 0)
cacheinfo.ic_totalsize = l *
getpropint(node, "icache-nlines", 64) *
@@ -202,9 +200,7 @@ cpu_attach(parent, dev, aux)
if ((1 << i) != l && l)
panic("bad dcache line size %d", l);
cacheinfo.dc_l2linesize = i;
- cacheinfo.dc_totalsize =
- getpropint(node, "dcache-size", 0) *
- getpropint(node, "dcache-associativity", 1);
+ cacheinfo.dc_totalsize = getpropint(node, "dcache-size", 0);
if (cacheinfo.dc_totalsize == 0)
cacheinfo.dc_totalsize = l *
getpropint(node, "dcache-nlines", 128) *
@@ -217,9 +213,7 @@ cpu_attach(parent, dev, aux)
if ((1 << i) != l && l)
panic("bad ecache line size %d", l);
cacheinfo.ec_l2linesize = i;
- cacheinfo.ec_totalsize =
- getpropint(node, "ecache-size", 0) *
- getpropint(node, "ecache-associativity", 1);
+ cacheinfo.ec_totalsize = getpropint(node, "ecache-size", 0);
if (cacheinfo.ec_totalsize == 0)
cacheinfo.ec_totalsize = l *
getpropint(node, "ecache-nlines", 32768) *