From f1761580d76c1d1ad8e891419493edc8324acc1b Mon Sep 17 00:00:00 2001 From: Gordon Willem Klok Date: Thu, 24 Aug 2006 20:52:22 +0000 Subject: Fix a few more cases where we propogate low level errors to userland. found by niallo. --- sys/arch/amd64/amd64/powernow-k8.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/amd64/amd64/powernow-k8.c b/sys/arch/amd64/amd64/powernow-k8.c index 65541e03fef..9f75d1eca29 100644 --- a/sys/arch/amd64/amd64/powernow-k8.c +++ b/sys/arch/amd64/amd64/powernow-k8.c @@ -1,4 +1,4 @@ -/* $OpenBSD: powernow-k8.c,v 1.8 2006/06/16 05:58:50 gwk Exp $ */ +/* $OpenBSD: powernow-k8.c,v 1.9 2006/08/24 20:52:21 gwk Exp $ */ /* * Copyright (c) 2004 Martin Végiard. * All rights reserved. @@ -193,7 +193,7 @@ k8_powernow_setperf(int level) */ status = rdmsr(MSR_AMDK7_FIDVID_STATUS); if (PN8_STA_PENDING(status)) - return 1; + return 0; cfid = PN8_STA_CFID(status); cvid = PN8_STA_CVID(status); @@ -222,7 +222,7 @@ k8_powernow_setperf(int level) val = cvid - (1 << cstate->mvs); WRITE_FIDVID(cfid, (val > 0) ? val : 0, 1ULL); if (k8pnow_read_pending_wait(&status)) - return 1; + return 0; cvid = PN8_STA_CVID(status); COUNT_OFF_VST(cstate->vst); } @@ -234,7 +234,7 @@ k8_powernow_setperf(int level) * under Linux */ WRITE_FIDVID(cfid, cvid - 1, 1ULL); if (k8pnow_read_pending_wait(&status)) - return 1; + return 0; cvid = PN8_STA_CVID(status); COUNT_OFF_VST(cstate->vst); } @@ -257,7 +257,7 @@ k8_powernow_setperf(int level) WRITE_FIDVID(val, cvid, (uint64_t)cstate->pll * 1000 / 5); if (k8pnow_read_pending_wait(&status)) - return 1; + return 0; cfid = PN8_STA_CFID(status); COUNT_OFF_IRT(cstate->irt); @@ -266,7 +266,7 @@ k8_powernow_setperf(int level) WRITE_FIDVID(fid, cvid, (uint64_t) cstate->pll * 1000 / 5); if (k8pnow_read_pending_wait(&status)) - return 1; + return 0; cfid = PN8_STA_CFID(status); COUNT_OFF_IRT(cstate->irt); } @@ -275,7 +275,7 @@ k8_powernow_setperf(int level) if (cvid != vid) { WRITE_FIDVID(cfid, vid, 1ULL); if (k8pnow_read_pending_wait(&status)) - return 1; + return 0; cvid = PN8_STA_CVID(status); COUNT_OFF_VST(cstate->vst); } -- cgit v1.2.3