diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-06-07 19:44:55 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-06-07 19:44:55 +0000 |
commit | 1830b21e0cbfa30cb3004ba8d485766c5e635007 (patch) | |
tree | 53c6413b402cefc4838bb0f9390f1080f36926a9 /sys/arch/sparc | |
parent | c5e383cb246d63163141adb84b13b9d608a12a29 (diff) |
Do not invoke cache_enable() if there is no cache; prevents a spurious (and
bogus) `cache enabled' line in dmesg on 4/110.
ok todd@ deraadt@
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r-- | sys/arch/sparc/sparc/cpu.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/arch/sparc/sparc/cpu.c b/sys/arch/sparc/sparc/cpu.c index 617a4235711..2e8e617d48d 100644 --- a/sys/arch/sparc/sparc/cpu.c +++ b/sys/arch/sparc/sparc/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.44 2008/06/29 01:27:42 miod Exp $ */ +/* $OpenBSD: cpu.c,v 1.45 2010/06/07 19:44:54 miod Exp $ */ /* $NetBSD: cpu.c,v 1.56 1997/09/15 20:52:36 pk Exp $ */ /* @@ -257,10 +257,12 @@ cpu_attach(parent, self, aux) * nasty to happen to the pagetables while the cache is * enabled and we haven't uncached them yet. */ - s = splhigh(); - sc->cache_enable(); - pmap_cache_enable(); - splx(s); + if (sc->cacheinfo.c_totalsize != 0) { + s = splhigh(); + sc->cache_enable(); + pmap_cache_enable(); + splx(s); + } return; } |