summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-03-11 21:52:24 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-03-11 21:52:24 +0000
commit34b560ff2837a78a20af84d332d59ea8a68f277e (patch)
treef6f438e7d29711555e773c6db0200f5d11bc25ad /arch/mips/kernel
parentdd422013dc7f307f70a893fcf18b95c47b144823 (diff)
Replace set_cp0_status / set_cp0_config by three functions, clear_cp0_*,
set_cp0_* and change_cp0_* which makes the kernel code somewhat more readable. Going through the kernel code I notices some stupid abuse of the old function like set_cp0_status(ST0_BEV, 1) - this clear ST0_BEV but actually looks like attempting to set it and other abuses, so will people please look over their code again.
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/process.c6
-rw-r--r--arch/mips/kernel/signal.c2
-rw-r--r--arch/mips/kernel/traps.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index dd2810109..6cda842fd 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -56,7 +56,7 @@ void exit_thread(void)
{
/* Forget lazy fpu state */
if (last_task_used_math == current) {
- set_cp0_status(ST0_CU1, ST0_CU1);
+ set_cp0_status(ST0_CU1);
__asm__ __volatile__("cfc1\t$0,$31");
last_task_used_math = NULL;
}
@@ -66,7 +66,7 @@ void flush_thread(void)
{
/* Forget lazy fpu state */
if (last_task_used_math == current) {
- set_cp0_status(ST0_CU1, ST0_CU1);
+ set_cp0_status(ST0_CU1);
__asm__ __volatile__("cfc1\t$0,$31");
last_task_used_math = NULL;
}
@@ -87,7 +87,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
if (mips_cpu.options & MIPS_CPU_FPU)
#endif
{
- set_cp0_status(ST0_CU1, ST0_CU1);
+ set_cp0_status(ST0_CU1);
save_fp(p);
}
/* set up new TSS. */
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index ff7c8d5a8..b91e8a0b9 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -354,7 +354,7 @@ setup_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
err |= __put_user(owned_fp, &sc->sc_ownedfp);
if (current->used_math) { /* fp is active. */
- set_cp0_status(ST0_CU1, ST0_CU1);
+ set_cp0_status(ST0_CU1);
err |= save_fp_context(sc);
last_task_used_math = NULL;
regs->cp0_status &= ~ST0_CU1;
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 402975288..363dfd778 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -702,7 +702,7 @@ static inline void setup_dedicated_int(void)
if(mips_cpu.options & MIPS_CPU_DIVEC) {
memcpy((void *)(KSEG0 + 0x200), except_vec4, 8);
- set_cp0_cause(CAUSEF_IV, CAUSEF_IV);
+ set_cp0_cause(CAUSEF_IV);
dedicated_iv_available = 1;
}
}
@@ -785,7 +785,7 @@ void __init trap_init(void)
EISA_bus = 1;
/* Some firmware leaves the BEV flag set, clear it. */
- set_cp0_status(ST0_BEV, 0);
+ clear_cp0_status(ST0_BEV);
/* Copy the generic exception handler code to it's final destination. */
memcpy((void *)(KSEG0 + 0x80), &except_vec1_generic, 0x80);
@@ -878,7 +878,7 @@ void __init trap_init(void)
* should get some special optimizations.
*/
write_32bit_cp0_register(CP0_FRAMEMASK, 0);
- set_cp0_status(ST0_XX, ST0_XX);
+ set_cp0_status(ST0_XX);
/*
* The R10k might even work for Linux/MIPS - but we're paranoid
* and refuse to run until this is tested on real silicon