From bbc49443762a896158d670db273e086896ef1fb2 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Fri, 28 Oct 2005 07:14:32 +0000 Subject: lost a diff from gordon, only attach if we can do something useful --- sys/arch/i386/i386/powernow-k7.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/arch/i386') 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; + } } } -- cgit v1.2.3