summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/ptrace.c5
-rw-r--r--arch/mips/kernel/signal.c8
-rw-r--r--arch/mips/kernel/traps.c47
3 files changed, 22 insertions, 38 deletions
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index 4112c0006..f9172b726 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -68,6 +68,7 @@ repeat:
*/
flush_cache_all();
retval = *(unsigned long *) page;
+ flush_cache_all(); /* VCED avoidance */
return retval;
}
@@ -122,10 +123,10 @@ repeat:
}
/* This is a hack for non-kernel-mapped video buffers and similar */
if (MAP_NR(page) < MAP_NR(high_memory))
- flush_cache_page(vma, addr);
+ flush_cache_all();
*(unsigned long *) (page + (addr & ~PAGE_MASK)) = data;
if (MAP_NR(page) < MAP_NR(high_memory))
- flush_page_to_ram(page);
+ flush_cache_all();
/*
* We're bypassing pagetables, so we have to set the dirty bit
* ourselves this should also re-instate whatever read-only mode
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 3457caf1b..6b9fd263e 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -4,7 +4,7 @@
* Copyright (C) 1991, 1992 Linus Torvalds
* Copyright (C) 1994, 1995, 1996 Ralf Baechle
*
- * $Id: signal.c,v 1.13 1998/07/03 23:05:37 ralf Exp $
+ * $Id: signal.c,v 1.14 1998/07/04 00:49:51 ralf Exp $
*
* XXX Handle lazy fp context switches correctly.
*/
@@ -55,7 +55,8 @@ sys_sigsuspend(struct pt_regs regs)
current->blocked = newset;
spin_unlock_irq(&current->sigmask_lock);
- regs.regs[2] = -EINTR;
+ regs.regs[2] = EINTR;
+ regs.regs[7] = 1;
while (1) {
current->state = TASK_INTERRUPTIBLE;
schedule();
@@ -80,7 +81,8 @@ sys_rt_sigsuspend(struct pt_regs regs)
current->blocked = newset;
spin_unlock_irq(&current->sigmask_lock);
- regs.regs[2] = -EINTR;
+ regs.regs[2] = EINTR;
+ regs.regs[7] = 1;
while (1) {
current->state = TASK_INTERRUPTIBLE;
schedule();
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 2d1fbcd96..7d5a703f6 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1,4 +1,4 @@
-/* $Id: traps.c,v 1.14 1998/05/28 03:17:56 ralf Exp $
+/* $Id: traps.c,v 1.12 1998/06/30 00:21:53 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -24,8 +24,6 @@
#include <asm/system.h>
#include <asm/uaccess.h>
-#undef CONF_DEBUG_EXCEPTIONS
-
static inline void console_verbose(void)
{
extern int console_loglevel;
@@ -196,9 +194,6 @@ show_regs(regs); while(1);
void do_ov(struct pt_regs *regs)
{
lock_kernel();
-#ifdef CONF_DEBUG_EXCEPTIONS
- show_regs(regs);
-#endif
if (compute_return_epc(regs))
goto out;
force_sig(SIGFPE, current);
@@ -238,9 +233,6 @@ void do_fpe(struct pt_regs *regs, unsigned long fcr31)
}
#endif
lock_kernel();
-#ifdef CONF_DEBUG_EXCEPTIONS
- show_regs(regs);
-#endif
if (fcr31 & 0x20000) {
/* Retry instruction with flush to zero ... */
if (!(fcr31 & (1<<24))) {
@@ -282,41 +274,28 @@ static inline int get_insn_opcode(struct pt_regs *regs, unsigned int *opcode)
return 0;
}
-static inline void
-do_bp_and_tr(struct pt_regs *regs, char *exc, unsigned int trapcode)
-{
- /*
- * (A short test says that IRIX 5.3 sends SIGTRAP for all break
- * insns, even for break codes that indicate arithmetic failures.
- * Wiered ...)
- */
- force_sig(SIGTRAP, current);
-#ifdef CONF_DEBUG_EXCEPTIONS
- show_regs(regs);
-#endif
-}
void do_bp(struct pt_regs *regs)
{
unsigned int opcode, bcode;
- lock_kernel();
/*
* There is the ancient bug in the MIPS assemblers that the break
* code starts left to bit 16 instead to bit 6 in the opcode.
* Gas is bug-compatible ...
*/
-#ifdef CONF_DEBUG_EXCEPTIONS
- printk("BREAKPOINT at %08lx\n", regs->cp0_epc);
-#endif
if (get_insn_opcode(regs, &opcode))
goto out;
bcode = ((opcode >> 16) & ((1 << 20) - 1));
- do_bp_and_tr(regs, "bp", bcode);
+ lock_kernel();
+ /*
+ * (A short test says that IRIX 5.3 sends SIGTRAP for all break
+ * insns, even for break codes that indicate arithmetic failures.
+ * Wiered ...)
+ */
+ force_sig(SIGTRAP, current);
- if (compute_return_epc(regs))
- goto out;
out:
unlock_kernel();
}
@@ -330,7 +309,12 @@ void do_tr(struct pt_regs *regs)
goto out;
bcode = ((opcode >> 6) & ((1 << 20) - 1));
- do_bp_and_tr(regs, "tr", bcode);
+ /*
+ * (A short test says that IRIX 5.3 sends SIGTRAP for all break
+ * insns, even for break codes that indicate arithmetic failures.
+ * Wiered ...)
+ */
+ force_sig(SIGTRAP, current);
out:
unlock_kernel();
}
@@ -338,9 +322,6 @@ out:
void do_ri(struct pt_regs *regs)
{
lock_kernel();
-#ifdef CONF_DEBUG_EXCEPTIONS
- show_regs(regs);
-#endif
printk("[%s:%ld] Illegal instruction at %08lx ra=%08lx\n",
current->comm, current->pid, regs->cp0_epc, regs->regs[31]);
if (compute_return_epc(regs))