summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Willem Klok <gwk@cvs.openbsd.org>2006-06-13 00:32:36 +0000
committerGordon Willem Klok <gwk@cvs.openbsd.org>2006-06-13 00:32:36 +0000
commit5ba3b5d5112c923baddb3cac038b88e5f4dd74c7 (patch)
treeaee5bbc3cb1b7865b127143f4eacd8a540500b7a
parent61417353838d49fe5ad668231cf368d2dfdc57bd (diff)
Change the value returned if the CPU fails to honor a request to
adjust frequency from 1 (EPERM) to EIO. Suggested by and ok tedu@
-rw-r--r--sys/arch/amd64/amd64/powernow-k8.c4
-rw-r--r--sys/arch/i386/i386/powernow-k7.c6
-rw-r--r--sys/arch/i386/i386/powernow-k8.c4
3 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 0399a3b145e..9f1020aaa1b 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.6 2006/05/27 04:46:12 gwk Exp $ */
+/* $OpenBSD: powernow-k8.c,v 1.7 2006/06/13 00:32:35 gwk Exp $ */
/*
* Copyright (c) 2004 Martin Végiard.
* All rights reserved.
@@ -284,7 +284,7 @@ k8_powernow_setperf(int level)
if (cfid != fid || cvid != vid) {
printf("%s transition to fid: %d vid: %d failed.", __func__,
fid, vid);
- return (0);
+ return (EIO);
}
cpuspeed = cstate->state_table[i].freq;
diff --git a/sys/arch/i386/i386/powernow-k7.c b/sys/arch/i386/i386/powernow-k7.c
index 896b018191e..0773a3fbf3f 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.22 2006/05/27 04:46:12 gwk Exp $ */
+/* $OpenBSD: powernow-k7.c,v 1.23 2006/06/13 00:32:35 gwk Exp $ */
/*
* Copyright (c) 2004 Martin Végiard.
@@ -221,12 +221,12 @@ k7_powernow_setperf(int level)
if (cfid != fid || cvid != vid) {
printf("%s transition to fid: %d vid: %d failed.", __func__,
fid, vid);
- return 0;
+ return (EIO);
}
pentium_mhz = cstate->state_table[i].freq;
- return 0;
+ return (0);
}
/*
diff --git a/sys/arch/i386/i386/powernow-k8.c b/sys/arch/i386/i386/powernow-k8.c
index 47454927d7a..ff1dd934ecc 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.11 2006/05/27 04:46:12 gwk Exp $ */
+/* $OpenBSD: powernow-k8.c,v 1.12 2006/06/13 00:32:35 gwk Exp $ */
/*
* Copyright (c) 2004 Martin Végiard.
@@ -286,7 +286,7 @@ k8_powernow_setperf(int level)
if (cfid != fid || cvid != vid) {
printf("%s transition to fid: %d vid: %d failed.", __func__,
fid, vid);
- return (0);
+ return (EIO);
}
pentium_mhz = cstate->state_table[i].freq;