summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2005-10-28 07:14:32 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2005-10-28 07:14:32 +0000
commitbbc49443762a896158d670db273e086896ef1fb2 (patch)
treeec3660dee66cfb145af2faa56f364479e30f8bd7 /sys
parent60aa19b6a784ffcbe7ae3faf83b0c65addb6d95e (diff)
lost a diff from gordon, only attach if we can do something useful
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/powernow-k7.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/i386/i386/powernow-k7.c b/sys/arch/i386/i386/powernow-k7.c
index 4833f174740..57999690bc1 100644
--- a/sys/arch/i386/i386/powernow-k7.c
+++ b/sys/arch/i386/i386/powernow-k7.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: powernow-k7.c,v 1.6 2005/10/28 07:11:13 tedu Exp $ */
+/* $OpenBSD: powernow-k7.c,v 1.7 2005/10/28 07:14:31 tedu Exp $ */
/*
* Copyright (c) 2004 Martin Végiard.
* All rights reserved.
@@ -382,7 +382,9 @@ k7_powernow_init(void)
if (k7pnow_states(cstate, ci->ci_signature, maxfid, startvid)) {
printf("%s: AMD %s: %d available states\n", ci->ci_dev.dv_xname,
techname, cstate->n_states);
- k7pnow_current_state[cpu_number()] = cstate;
- cpu_setperf = k7_powernow_setperf;
+ if (cstate->n_states) {
+ k7pnow_current_state[cpu_number()] = cstate;
+ cpu_setperf = k7_powernow_setperf;
+ }
}
}