diff options
author | Dimitry Andric <dim@cvs.openbsd.org> | 2006-12-12 23:14:29 +0000 |
---|---|---|
committer | Dimitry Andric <dim@cvs.openbsd.org> | 2006-12-12 23:14:29 +0000 |
commit | 1c2fd965cf1531278e01bc91beaa67624286988c (patch) | |
tree | d401479d5ccf18380f5057cd0a4b6e8135bdb23b /sys/arch/amd64 | |
parent | cd866cbd96c21d51b3fa4c3d76d66a7e899f7b80 (diff) |
Complete gwk's previous patch to stop setperf methods from returning
errors to userland: make all cpu_setperf functions return void.
Tested by many, ok gwk@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/powernow-k8.c | 20 | ||||
-rw-r--r-- | sys/arch/amd64/include/cpu.h | 4 |
2 files changed, 11 insertions, 13 deletions
diff --git a/sys/arch/amd64/amd64/powernow-k8.c b/sys/arch/amd64/amd64/powernow-k8.c index 386e9f0e624..04d8cf8c123 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.13 2006/12/09 00:16:46 gwk Exp $ */ +/* $OpenBSD: powernow-k8.c,v 1.14 2006/12/12 23:14:27 dim Exp $ */ /* * Copyright (c) 2004 Martin Végiard. * Copyright (c) 2004-2005 Bruno Ducrot @@ -153,7 +153,7 @@ k8pnow_read_pending_wait(uint64_t *status) return 1; } -int +void k8_powernow_setperf(int level) { unsigned int i, low, high, freq; @@ -169,7 +169,7 @@ k8_powernow_setperf(int level) */ status = rdmsr(MSR_AMDK7_FIDVID_STATUS); if (PN8_STA_PENDING(status)) - return 0; + return; cfid = PN8_STA_CFID(status); cvid = PN8_STA_CVID(status); @@ -188,7 +188,7 @@ k8_powernow_setperf(int level) } if (fid == cfid && vid == cvid) - return (0); + return; /* * Phase 1: Raise core voltage to requested VID if frequency is @@ -198,7 +198,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 0; + return; cvid = PN8_STA_CVID(status); COUNT_OFF_VST(cstate->vst); } @@ -210,7 +210,7 @@ k8_powernow_setperf(int level) * under Linux */ WRITE_FIDVID(cfid, cvid - 1, 1ULL); if (k8pnow_read_pending_wait(&status)) - return 0; + return; cvid = PN8_STA_CVID(status); COUNT_OFF_VST(cstate->vst); } @@ -233,7 +233,7 @@ k8_powernow_setperf(int level) WRITE_FIDVID(val, cvid, (uint64_t)cstate->pll * 1000 / 5); if (k8pnow_read_pending_wait(&status)) - return 0; + return; cfid = PN8_STA_CFID(status); COUNT_OFF_IRT(cstate->irt); @@ -242,7 +242,7 @@ k8_powernow_setperf(int level) WRITE_FIDVID(fid, cvid, (uint64_t) cstate->pll * 1000 / 5); if (k8pnow_read_pending_wait(&status)) - return 0; + return; cfid = PN8_STA_CFID(status); COUNT_OFF_IRT(cstate->irt); } @@ -251,15 +251,13 @@ k8_powernow_setperf(int level) if (cvid != vid) { WRITE_FIDVID(cfid, vid, 1ULL); if (k8pnow_read_pending_wait(&status)) - return 0; + return; cvid = PN8_STA_CVID(status); COUNT_OFF_VST(cstate->vst); } if (cfid == fid || cvid == vid) cpuspeed = cstate->state_table[i].freq; - - return (0); } /* diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h index ee62a9373ba..5b23973b361 100644 --- a/sys/arch/amd64/include/cpu.h +++ b/sys/arch/amd64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.20 2006/11/25 16:59:31 niklas Exp $ */ +/* $OpenBSD: cpu.h,v 1.21 2006/12/12 23:14:27 dim Exp $ */ /* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */ /*- @@ -306,7 +306,7 @@ void x86_bus_space_mallocok(void); /* powernow-k8.c */ void k8_powernow_init(void); -int k8_powernow_setperf(int); +void k8_powernow_setperf(int); #endif /* _KERNEL */ |