summaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1994-12-01 08:00:00 +0000
committer <ralf@linux-mips.org>1994-12-01 08:00:00 +0000
commit90ecc248e200fee448001248dde0ca540dd3ef64 (patch)
treea3fe89494ce63b4835f0f9cf5c45e74cde88252b /kernel/sys.c
parent1513ff9b7899ab588401c89db0e99903dbf5f886 (diff)
Import of Linux/MIPS 1.1.68
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index 1ce3ee387..706e3d66e 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -42,15 +42,26 @@ asmlinkage int sys_idle(void)
if (current->pid != 0)
return -EPERM;
+#ifdef __i386__
/* Map out the low memory: it's no longer needed */
for (i = 0 ; i < 768 ; i++)
swapper_pg_dir[i] = 0;
+#endif
/* endless idle loop with no priority at all */
current->counter = -100;
for (;;) {
+#if defined (__i386__)
if (hlt_works_ok && !need_resched)
__asm__("hlt");
+#elif defined (__mips__)
+ /*
+ * R4[26]00 have wait, the R4000 doesn't.
+ * Dunno about the R4400...
+ */
+ if (!need_resched)
+ __asm__("wait");
+#endif
schedule();
}
}