patch-2.3.99-pre4 linux/include/asm-arm/arch-rpc/system.h
Next file: linux/include/asm-arm/arch-rpc/vmalloc.h
Previous file: linux/include/asm-arm/arch-rpc/hardware.h
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Mon Mar 27 10:46:29 2000
- Orig file:
v2.3.99-pre3/linux/include/asm-arm/arch-rpc/system.h
- Orig date:
Sun Mar 19 18:35:31 2000
diff -u --recursive --new-file v2.3.99-pre3/linux/include/asm-arm/arch-rpc/system.h linux/include/asm-arm/arch-rpc/system.h
@@ -7,7 +7,28 @@
#include <asm/iomd.h>
#include <asm/io.h>
-#define arch_do_idle() cpu_do_idle()
+extern __inline__ void arch_idle(void)
+{
+ unsigned long start_idle;
+
+ start_idle = jiffies;
+
+ do {
+ if (current->need_resched || hlt_counter)
+ goto slow_out;
+ cpu_do_idle(IDLE_WAIT_FAST);
+ } while (time_before(start_idle, jiffies + HZ/3));
+
+ cpu_do_idle(IDLE_CLOCK_SLOW);
+
+ while (!current->need_resched && !hlt_counter) {
+ cpu_do_idle(IDLE_WAIT_SLOW);
+ }
+
+ cpu_do_idle(IDLE_CLOCK_FAST);
+slow_out:
+}
+
#define arch_power_off() do { } while (0)
extern __inline__ void arch_reset(char mode)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)