diff options
author | Gordon Willem Klok <gwk@cvs.openbsd.org> | 2006-08-24 20:52:22 +0000 |
---|---|---|
committer | Gordon Willem Klok <gwk@cvs.openbsd.org> | 2006-08-24 20:52:22 +0000 |
commit | f1761580d76c1d1ad8e891419493edc8324acc1b (patch) | |
tree | cf6c43bdc53440f8d9507c2ea8f040fac893032d /sys/arch | |
parent | 61cf6f981ab6e8b46a7dd3a1216a4e25178acf49 (diff) |
Fix a few more cases where we propogate low level errors to userland.
found by niallo.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/powernow-k8.c | 14 |
1 files changed, 7 insertions, 7 deletions
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); } |