diff options
author | phk <phk@FreeBSD.org> | 1996-09-19 08:28:16 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-09-19 08:28:16 +0000 |
commit | b0cf7bf4f22429984524df30a6432b4fc1be9ca7 (patch) | |
tree | 5d02d08bad201628248e055c0427e2ebef705af5 /sys | |
parent | f9bd907a44f1cde3b84ebb5d8383cfbe8f954842 (diff) | |
download | FreeBSD-src-b0cf7bf4f22429984524df30a6432b4fc1be9ca7.zip FreeBSD-src-b0cf7bf4f22429984524df30a6432b4fc1be9ca7.tar.gz |
Add APM_IDLE_CPU option, that is off by default.
I maintain that it saves more power to simply "hlt" the CPU than to
spend tons of time trying to tell the APM bios to do the same.
In particular if you do it 100 times a second...
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/cpu_switch.S | 4 | ||||
-rw-r--r-- | sys/amd64/amd64/swtch.s | 4 | ||||
-rw-r--r-- | sys/conf/NOTES | 4 | ||||
-rw-r--r-- | sys/i386/conf/LINT | 4 | ||||
-rw-r--r-- | sys/i386/conf/NOTES | 4 | ||||
-rw-r--r-- | sys/i386/i386/swtch.s | 4 |
6 files changed, 15 insertions, 9 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S index daedb20..3e98862 100644 --- a/sys/amd64/amd64/cpu_switch.S +++ b/sys/amd64/amd64/cpu_switch.S @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: swtch.s,v 1.38 1996/07/31 09:25:53 davidg Exp $ + * $Id: swtch.s,v 1.39 1996/07/31 12:36:11 bde Exp $ */ #include "apm.h" @@ -263,7 +263,7 @@ idle_loop: testl %eax, %eax jnz idle_loop sti -#if NAPM > 0 +#if NAPM > 0 && defined(APM_IDLE_CPU) call _apm_cpu_idle call _apm_cpu_busy #else diff --git a/sys/amd64/amd64/swtch.s b/sys/amd64/amd64/swtch.s index daedb20..3e98862 100644 --- a/sys/amd64/amd64/swtch.s +++ b/sys/amd64/amd64/swtch.s @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: swtch.s,v 1.38 1996/07/31 09:25:53 davidg Exp $ + * $Id: swtch.s,v 1.39 1996/07/31 12:36:11 bde Exp $ */ #include "apm.h" @@ -263,7 +263,7 @@ idle_loop: testl %eax, %eax jnz idle_loop sti -#if NAPM > 0 +#if NAPM > 0 && defined(APM_IDLE_CPU) call _apm_cpu_idle call _apm_cpu_busy #else diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 433ae23..0897021 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.278 1996/09/11 19:53:29 phk Exp $ +# $Id: LINT,v 1.279 1996/09/13 05:54:39 bde Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -803,6 +803,8 @@ device pca0 at isa? port IO_TIMER1 tty # APM_BROKEN_STATCLOCK and see if suspend/resume work # +options APM_IDLE_CPU # Tell APM to idle rather than halt'ing the cpu + # # Notes on the spigot: # The video spigot is at 0xad6. This port address can not be changed. diff --git a/sys/i386/conf/LINT b/sys/i386/conf/LINT index 433ae23..0897021 100644 --- a/sys/i386/conf/LINT +++ b/sys/i386/conf/LINT @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.278 1996/09/11 19:53:29 phk Exp $ +# $Id: LINT,v 1.279 1996/09/13 05:54:39 bde Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -803,6 +803,8 @@ device pca0 at isa? port IO_TIMER1 tty # APM_BROKEN_STATCLOCK and see if suspend/resume work # +options APM_IDLE_CPU # Tell APM to idle rather than halt'ing the cpu + # # Notes on the spigot: # The video spigot is at 0xad6. This port address can not be changed. diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index 433ae23..0897021 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.278 1996/09/11 19:53:29 phk Exp $ +# $Id: LINT,v 1.279 1996/09/13 05:54:39 bde Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -803,6 +803,8 @@ device pca0 at isa? port IO_TIMER1 tty # APM_BROKEN_STATCLOCK and see if suspend/resume work # +options APM_IDLE_CPU # Tell APM to idle rather than halt'ing the cpu + # # Notes on the spigot: # The video spigot is at 0xad6. This port address can not be changed. diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s index daedb20..3e98862 100644 --- a/sys/i386/i386/swtch.s +++ b/sys/i386/i386/swtch.s @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: swtch.s,v 1.38 1996/07/31 09:25:53 davidg Exp $ + * $Id: swtch.s,v 1.39 1996/07/31 12:36:11 bde Exp $ */ #include "apm.h" @@ -263,7 +263,7 @@ idle_loop: testl %eax, %eax jnz idle_loop sti -#if NAPM > 0 +#if NAPM > 0 && defined(APM_IDLE_CPU) call _apm_cpu_idle call _apm_cpu_busy #else |