diff options
| author | 2010-06-07 19:44:54 +0000 | |
|---|---|---|
| committer | 2010-06-07 19:44:54 +0000 | |
| commit | dba1033c9347a8aa37549435ca991e1bed91c5b3 (patch) | |
| tree | f5fa5327b2331f45bb23026a6fb9ee2638dbf26c /sys/arch/sparc | |
| parent | Nuke old eeprom.h compatibility defines; ok todd@ (diff) | |
| download | wireguard-openbsd-dba1033c9347a8aa37549435ca991e1bed91c5b3.tar.xz wireguard-openbsd-dba1033c9347a8aa37549435ca991e1bed91c5b3.zip | |
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; } |
