summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/m88k/include/pcb.h4
-rw-r--r--sys/arch/m88k/m88k/genassym.cf5
-rw-r--r--sys/arch/m88k/m88k/process.S38
3 files changed, 15 insertions, 32 deletions
diff --git a/sys/arch/m88k/include/pcb.h b/sys/arch/m88k/include/pcb.h
index 2ebb31accf0..e12b14cea62 100644
--- a/sys/arch/m88k/include/pcb.h
+++ b/sys/arch/m88k/include/pcb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcb.h,v 1.2 2005/12/03 14:30:05 miod Exp $ */
+/* $OpenBSD: pcb.h,v 1.3 2006/11/18 22:49:40 miod Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
* Mach Operating System
@@ -49,7 +49,7 @@
struct m88100_pcb {
unsigned pcb_pc; /* address to return */
- unsigned pcb_ipl;
+ unsigned :32;
unsigned pcb_r14;
unsigned pcb_r15;
unsigned pcb_r16;
diff --git a/sys/arch/m88k/m88k/genassym.cf b/sys/arch/m88k/m88k/genassym.cf
index 98ce27b802a..3da51a297c8 100644
--- a/sys/arch/m88k/m88k/genassym.cf
+++ b/sys/arch/m88k/m88k/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.6 2006/04/17 16:08:01 miod Exp $
+# $OpenBSD: genassym.cf,v 1.7 2006/11/18 22:49:43 miod Exp $
#
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
@@ -28,7 +28,7 @@
# SUCH DAMAGE.
#
# @(#)genassym.c 7.8 (Berkeley) 5/7/91
-# $Id: genassym.cf,v 1.6 2006/04/17 16:08:01 miod Exp $
+# $Id: genassym.cf,v 1.7 2006/11/18 22:49:43 miod Exp $
#
include <sys/param.h>
@@ -140,7 +140,6 @@ define SIZEOF_EF sizeof(struct trapframe)
# more (machine-dependent) pcb fields
struct m88100_pcb
member pcb_pc
-member pcb_ipl
member pcb_r14
member pcb_r15
member pcb_r16
diff --git a/sys/arch/m88k/m88k/process.S b/sys/arch/m88k/m88k/process.S
index 7773baf15d2..fac510c3dd5 100644
--- a/sys/arch/m88k/m88k/process.S
+++ b/sys/arch/m88k/m88k/process.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: process.S,v 1.13 2005/12/11 21:45:30 miod Exp $ */
+/* $OpenBSD: process.S,v 1.14 2006/11/18 22:49:43 miod Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
* All rights reserved.
@@ -87,7 +87,7 @@ ENTRY(switch_exit)
* cpu_switch(), after the context save since we do not need
* to save anything.
*/
- bsr _ASM_LABEL(cpu_switch_search)
+ br _ASM_LABEL(cpu_switch_search)
/*
* void cpu_switch(struct proc *p)
@@ -256,18 +256,16 @@ ASLOCAL(cpu_switch_found)
ld r27, r10, PCB_R27
ld r28, r10, PCB_R28
ld r29, r10, PCB_R29
- or r14, r10, r0 /* preserve curpcb in a register... */
- bsr.n _C_LABEL(setipl)
- ld r2, r10, PCB_IPL /* restore interrupt mask */
- ld r1, r14, PCB_PC
- ld r30, r14, PCB_R30 /* restore frame pointer & stack */
- ld r31, r14, PCB_SP
+ ld r1, r10, PCB_PC
+ ld r30, r10, PCB_R30 /* restore frame pointer & stack */
+ ld r31, r10, PCB_SP
#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)
br.n _C_LABEL(sched_unlock_idle)
+ ld r14, r10, PCB_R14
#else
jmp.n r1
+ ld r14, r10, PCB_R14
#endif
- ld r14, r14, PCB_R14
/*
* savectx(pcb)
@@ -299,24 +297,10 @@ ASLOCAL(__savectx)
st r31, r2, PCB_SP
/*
- * Get the current spl.
- * We need to save r1 on the stack because we don't know if we were
- * called as savectx or __savectx.
- */
- subu r31, r31, 16 /* allocate stack for r1 and args */
- st r1, r31, 0
- bsr.n _C_LABEL(getipl) /* get the current interrupt mask */
- or r14, r0, r2
- st r2, r14, PCB_IPL /* save interrupt mask */
- ld r1, r31, 0 /* recover return address */
- addu r31, r31, 16 /* put stack pointer back */
-
- /*
* Save FP state.
*/
- fldcr r2, fcr62
- fldcr r3, fcr63
- st r2, r14, PCB_FCR62
- st r3, r14, PCB_FCR63
+ fldcr r4, fcr62
+ fldcr r5, fcr63
+ st r4, r2, PCB_FCR62
jmp.n r1
- ld r14, r14, PCB_R14 /* preserve r14 */
+ st r5, r2, PCB_FCR63