diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2002-05-23 01:54:57 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2002-05-23 01:54:57 +0000 |
commit | c669ea1b0523f383cdf2a76dec9f16c7d32947a6 (patch) | |
tree | 78ca56ea8557324a492928f798da1c989bf76f6c | |
parent | 0524a2ce15a95c81d0dec153f10211b5e59481cd (diff) |
2002-05-23 Marcus Brinkmann <marcus@gnu.org>
* i386/i386at/model_dep.c: Include <kern/cpu_number.h> and
<kern/assert.h>.
(machine_idle): New function.
* bogus/power_save.h (POWER_SAVE): Define to 1.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | bogus/power_save.h | 2 | ||||
-rw-r--r-- | i386/i386at/model_dep.c | 9 |
3 files changed, 17 insertions, 1 deletions
@@ -1,3 +1,10 @@ +2002-05-23 Marcus Brinkmann <marcus@gnu.org> + + * i386/i386at/model_dep.c: Include <kern/cpu_number.h> and + <kern/assert.h>. + (machine_idle): New function. + * bogus/power_save.h (POWER_SAVE): Define to 1. + 2002-05-22 Roland McGrath <roland@frob.com> * configure.in (VERSION): New substituted variable: set to 1.3 now. diff --git a/bogus/power_save.h b/bogus/power_save.h index 5591def..ee9a520 100644 --- a/bogus/power_save.h +++ b/bogus/power_save.h @@ -1 +1 @@ -#define POWER_SAVE 0 +#define POWER_SAVE 1 diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index b3fca62..02e5b2e 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -42,6 +42,8 @@ #include "vm_param.h" #include <kern/time_out.h> +#include <kern/assert.h> +#include <kern/cpu_number.h> #include <sys/time.h> #include <vm/vm_page.h> #include <i386/machspl.h> @@ -156,6 +158,13 @@ void machine_init() pmap_unmap_page_zero(); } +/* Conserve power on processor CPU. */ +void machine_idle (int cpu) +{ + assert (cpu == cpu_number ()); + asm volatile ("hlt" : : : "memory"); +} + /* * Halt a cpu. */ |