diff options
author | Gordon Willem Klok <gwk@cvs.openbsd.org> | 2006-06-16 05:58:51 +0000 |
---|---|---|
committer | Gordon Willem Klok <gwk@cvs.openbsd.org> | 2006-06-16 05:58:51 +0000 |
commit | 35fe6bfeb3073abdd7086cd70bbd8366ffed4896 (patch) | |
tree | 4ed11249a46d3a93b37906530b6434c897efcdbe /sys | |
parent | 5cea5eca15fe46f4bab0e4dda217c299dfaaaec7 (diff) |
From k*_powernow_setperf() always return 0, i.e.
Do not return low level errors to userspace where they will not/can not be
coped with.
: ----------------------------------------------------------------------
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/powernow-k8.c | 11 | ||||
-rw-r--r-- | sys/arch/i386/i386/powernow-k7.c | 11 | ||||
-rw-r--r-- | sys/arch/i386/i386/powernow-k8.c | 13 |
3 files changed, 10 insertions, 25 deletions
diff --git a/sys/arch/amd64/amd64/powernow-k8.c b/sys/arch/amd64/amd64/powernow-k8.c index 9f1020aaa1b..65541e03fef 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.7 2006/06/13 00:32:35 gwk Exp $ */ +/* $OpenBSD: powernow-k8.c,v 1.8 2006/06/16 05:58:50 gwk Exp $ */ /* * Copyright (c) 2004 Martin Végiard. * All rights reserved. @@ -280,14 +280,9 @@ k8_powernow_setperf(int level) COUNT_OFF_VST(cstate->vst); } - /* Check if transition failed. */ - if (cfid != fid || cvid != vid) { - printf("%s transition to fid: %d vid: %d failed.", __func__, - fid, vid); - return (EIO); - } + if (cfid == fid || cvid == vid) + cpuspeed = cstate->state_table[i].freq; - cpuspeed = cstate->state_table[i].freq; return (0); } diff --git a/sys/arch/i386/i386/powernow-k7.c b/sys/arch/i386/i386/powernow-k7.c index 0773a3fbf3f..5a74daf1274 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.23 2006/06/13 00:32:35 gwk Exp $ */ +/* $OpenBSD: powernow-k7.c,v 1.24 2006/06/16 05:58:50 gwk Exp $ */ /* * Copyright (c) 2004 Martin Végiard. @@ -218,13 +218,8 @@ k7_powernow_setperf(int level) status = rdmsr(MSR_AMDK7_FIDVID_STATUS); cfid = PN7_STA_CFID(status); cvid = PN7_STA_CVID(status); - if (cfid != fid || cvid != vid) { - printf("%s transition to fid: %d vid: %d failed.", __func__, - fid, vid); - return (EIO); - } - - pentium_mhz = cstate->state_table[i].freq; + if (cfid == fid || cvid == vid) + pentium_mhz = cstate->state_table[i].freq; return (0); } diff --git a/sys/arch/i386/i386/powernow-k8.c b/sys/arch/i386/i386/powernow-k8.c index ff1dd934ecc..104fdf5125e 100644 --- a/sys/arch/i386/i386/powernow-k8.c +++ b/sys/arch/i386/i386/powernow-k8.c @@ -1,4 +1,4 @@ -/* $OpenBSD: powernow-k8.c,v 1.12 2006/06/13 00:32:35 gwk Exp $ */ +/* $OpenBSD: powernow-k8.c,v 1.13 2006/06/16 05:58:50 gwk Exp $ */ /* * Copyright (c) 2004 Martin Végiard. @@ -282,14 +282,9 @@ k8_powernow_setperf(int level) COUNT_OFF_VST(cstate->vst); } - /* Check if transition failed. */ - if (cfid != fid || cvid != vid) { - printf("%s transition to fid: %d vid: %d failed.", __func__, - fid, vid); - return (EIO); - } - - pentium_mhz = cstate->state_table[i].freq; + if (cfid == fid || cvid == vid) + pentium_mhz = cstate->state_table[i].freq; + return (0); } |