summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-03-25 23:40:36 +0000
committer <ralf@linux-mips.org>1997-03-25 23:40:36 +0000
commit7206675c40394c78a90e74812bbdbf8cf3cca1be (patch)
tree251895cf5a0008e2b4ce438cb01ad4d55fb5b97b /kernel
parentbeb116954b9b7f3bb56412b2494b562f02b864b1 (diff)
Import of Linux/MIPS 2.1.14.2
Diffstat (limited to 'kernel')
-rw-r--r--kernel/.cvsignore1
-rw-r--r--kernel/exit.c12
-rw-r--r--kernel/fork.c3
-rw-r--r--kernel/ksyms.c2
-rw-r--r--kernel/panic.c20
-rw-r--r--kernel/sched.c11
-rw-r--r--kernel/sys.c1
7 files changed, 26 insertions, 24 deletions
diff --git a/kernel/.cvsignore b/kernel/.cvsignore
new file mode 100644
index 000000000..4671378ae
--- /dev/null
+++ b/kernel/.cvsignore
@@ -0,0 +1 @@
+.depend
diff --git a/kernel/exit.c b/kernel/exit.c
index d2fdbdc4a..d4c54209d 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -475,6 +475,9 @@ static inline void __exit_mm(struct task_struct * tsk)
if (mm != &init_mm) {
flush_cache_mm(mm);
flush_tlb_mm(mm);
+#ifdef __mips__
+ mm->context = 0;
+#endif
tsk->mm = &init_mm;
tsk->swappable = 0;
SET_PAGE_DIR(tsk, swapper_pg_dir);
@@ -712,12 +715,3 @@ asmlinkage int sys_waitpid(pid_t pid,unsigned int * stat_addr, int options)
}
#endif
-
-/*
- * sys_wait() has been added for compatibility. wait() should be
- * implemented by calling sys_wait4() from libc.a.
- */
-asmlinkage int sys_wait(unsigned int * stat_addr)
-{
- return sys_wait4(-1, stat_addr, 0, NULL);
-}
diff --git a/kernel/fork.c b/kernel/fork.c
index 864bc52e8..b81d98e77 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -118,6 +118,9 @@ static inline int copy_mm(unsigned long clone_flags, struct task_struct * tsk)
if (!mm)
return -1;
*mm = *current->mm;
+#ifdef __mips__
+ mm->context = 0;
+#endif
mm->count = 1;
mm->def_flags = 0;
tsk->mm = mm;
diff --git a/kernel/ksyms.c b/kernel/ksyms.c
index a612201c0..b694cd6d2 100644
--- a/kernel/ksyms.c
+++ b/kernel/ksyms.c
@@ -81,6 +81,8 @@ extern int sys_tz;
extern int request_dma(unsigned int dmanr, char * deviceID);
extern void free_dma(unsigned int dmanr);
+extern void hard_reset_now(void);
+
struct symbol_table symbol_table = {
#include <linux/symtab_begin.h>
#ifdef MODVERSIONS
diff --git a/kernel/panic.c b/kernel/panic.c
index 7e04fdc31..d42541e9f 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -7,15 +7,15 @@
/*
* This function is used through-out the kernel (including mm and fs)
* to indicate a major problem.
- * Support for machines without PC-style console hardware - <dfrick@dial.eunet.ch>, July 96
*/
#include <stdarg.h>
+#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/delay.h>
-#include <linux/config.h>
-#include <asm/system.h>
+
+#include <asm/sgialib.h>
asmlinkage void sys_sync(void); /* it's really int */
extern void do_unblank_screen(void);
@@ -33,7 +33,6 @@ NORET_TYPE void panic(const char * fmt, ...)
{
static char buf[1024];
va_list args;
- int i;
va_start(args, fmt);
vsprintf(buf, fmt, args);
@@ -44,21 +43,28 @@ NORET_TYPE void panic(const char * fmt, ...)
else
sys_sync();
-#ifndef CONFIG_SERIAL_ONLY_CONSOLE
do_unblank_screen();
-#endif
+#ifdef CONFIG_SGI
if (panic_timeout > 0)
{
+ int i;
+
/*
* Delay timeout seconds before rebooting the machine.
* We can't use the "normal" timers since we just panicked..
*/
- printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
+ prom_printf(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
for(i = 0; i < (panic_timeout*1000); i++)
udelay(1000);
hard_reset_now();
}
+#if 0
+ printk("Hit a key\n");
+ prom_getchar();
+ romvec->imode();
+#endif
+#endif
for(;;);
}
diff --git a/kernel/sched.c b/kernel/sched.c
index 8f88f88a3..98502b3fc 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -126,7 +126,8 @@ static inline void add_to_runqueue(struct task_struct * p)
init_task.prev_run = p;
#ifdef __SMP__
/* this is safe only if called with cli()*/
- while(set_bit(31,&smp_process_available))
+ while(set_bit(31,&smp_process_available));
+#if 0
{
while(test_bit(31,&smp_process_available))
{
@@ -137,6 +138,7 @@ static inline void add_to_runqueue(struct task_struct * p)
}
}
}
+#endif
smp_process_available++;
clear_bit(31,&smp_process_available);
if ((0!=p->pid) && smp_threads_ready)
@@ -410,11 +412,6 @@ asmlinkage void schedule(void)
scheduling_in_interrupt:
printk("Aiee: scheduling in interrupt %p\n",
return_address());
-/*
- * System is probably fucked up anyway beyond a save landing; prevent
- * messages on the screen from scrolling away.
- */
-while(1);
}
#ifndef __alpha__
@@ -488,7 +485,7 @@ void wake_up_interruptible(struct wait_queue **q)
return;
bad:
printk("wait_queue is bad (eip = %p)\n",
- __builtin_return_address(0));
+ return_address());
printk(" q = %p\n",q);
printk(" *q = %p\n",*q);
}
diff --git a/kernel/sys.c b/kernel/sys.c
index b2cc8f154..8fcaba2de 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -27,7 +27,6 @@
#include <asm/uaccess.h>
#include <asm/io.h>
-#include <asm/system.h>
/*
* this indicates whether you can reboot with ctrl-alt-del: the default is yes