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 When determining ecache size, try u...
details: https://anonhg.NetBSD.org/src/rev/d864bb7f9950
branches: trunk
changeset: 519945:d864bb7f9950
user: matt <matt%NetBSD.org@localhost>
date: Mon Dec 31 07:30:46 2001 +0000
description:
When determining ecache size, try using ecache-size. if it doesn't exist,
fallback to the old method (ecache-nlines * ecache-linesize).
diffstat:
sys/arch/sparc64/sparc64/cpu.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (25 lines):
diff -r 8ae2216aed9f -r d864bb7f9950 sys/arch/sparc64/sparc64/cpu.c
--- a/sys/arch/sparc64/sparc64/cpu.c Mon Dec 31 07:16:47 2001 +0000
+++ b/sys/arch/sparc64/sparc64/cpu.c Mon Dec 31 07:30:46 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.16 2001/09/26 20:53:13 eeh Exp $ */
+/* $NetBSD: cpu.c,v 1.17 2001/12/31 07:30:46 matt Exp $ */
/*
* Copyright (c) 1996
@@ -324,9 +324,13 @@
if ((1 << i) != l && l)
panic("bad ecache line size %d", l);
cacheinfo.ec_l2linesize = i;
- cacheinfo.ec_totalsize = l *
- PROM_getpropint(node, "ecache-nlines", 32768) *
+ cacheinfo.ec_totalsize =
+ PROM_getpropint(node, "ecache-size", 0) *
PROM_getpropint(node, "ecache-associativity", 1);
+ if (cacheinfo.ec_totalsize == 0)
+ cacheinfo.ec_totalsize = l *
+ PROM_getpropint(node, "ecache-nlines", 32768) *
+ PROM_getpropint(node, "ecache-associativity", 1);
cachesize = cacheinfo.ec_totalsize /
PROM_getpropint(node, "ecache-associativity", 1);
Home |
Main Index |
Thread Index |
Old Index