diff options
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r-- | sys/arch/mvme88k/include/db_machdep.h | 3 | ||||
-rw-r--r-- | sys/arch/mvme88k/include/psl.h | 35 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/trap.c | 6 |
3 files changed, 9 insertions, 35 deletions
diff --git a/sys/arch/mvme88k/include/db_machdep.h b/sys/arch/mvme88k/include/db_machdep.h index 1135d957053..166b726a6b7 100644 --- a/sys/arch/mvme88k/include/db_machdep.h +++ b/sys/arch/mvme88k/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.22 2003/09/16 20:49:05 miod Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.23 2003/09/26 19:04:28 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -41,7 +41,6 @@ #ifndef _LOCORE #include <machine/pcb.h> /* m88100_saved_state */ -#include <machine/psl.h> #include <machine/trap.h> #include <uvm/uvm_param.h> diff --git a/sys/arch/mvme88k/include/psl.h b/sys/arch/mvme88k/include/psl.h index c6ae3ee876a..b963bc44e62 100644 --- a/sys/arch/mvme88k/include/psl.h +++ b/sys/arch/mvme88k/include/psl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: psl.h,v 1.12 2001/12/20 06:33:16 smurph Exp $ */ +/* $OpenBSD: psl.h,v 1.13 2003/09/26 19:04:28 miod Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * All rights reserved. @@ -42,8 +42,9 @@ * thereof, and that both notices appear in supporting documentation. * */ -#ifndef __M88K_M88100_PSL_H__ -#define __M88K_M88100_PSL_H__ + +#ifndef __M88K_PSL_H__ +#define __M88K_PSL_H__ /* * 88100 control registers @@ -73,37 +74,11 @@ #define PSR_MXM 0x00000004U /* misaligned access enable */ #define PSR_IND 0x00000002U /* interrupt disable */ #define PSR_SFRZ 0x00000001U /* shadow freeze */ -/* - * This is used in ext_int() and hard_clock(). - */ -#define PSR_IPL 0x00001000 /* for basepri */ #define PSR_SUPERVISOR (PSR_MODE | PSR_SFD) #define PSR_USER (PSR_SFD) #define PSR_SET_BY_USER (PSR_BO | PSR_SER | PSR_C | PSR_MXM) -#ifndef _LOCORE -struct psr { - unsigned - psr_mode: 1, - psr_bo : 1, - psr_ser : 1, /* mc88110 */ - psr_c : 1, - : 1, - psr_sgn : 1, /* mc88110 */ - psr_srm : 1, /* mc88110 */ - : 1, - psr_trc : 1, /* mc88110 */ - :13, - psr_sfd : 5, - psr_sfd2: 1, /* mc88110 */ - psr_sfd1: 1, - psr_mxm : 1, - psr_ind : 1, - psr_sfrz: 1; -}; -#endif - #define FIP_V 0x00000002U /* valid */ #define FIP_E 0x00000001U /* exception */ #define FIP_ADDR 0xFFFFFFFCU /* address mask */ @@ -114,5 +89,5 @@ struct psr { #define XIP_E 0x00000001U /* exception */ #define XIP_ADDR 0xFFFFFFFCU /* address mask */ -#endif /* __M88K_M88100_PSL_H__ */ +#endif /* __M88K_PSL_H__ */ diff --git a/sys/arch/mvme88k/mvme88k/trap.c b/sys/arch/mvme88k/mvme88k/trap.c index 1439cca0950..c8c00c2de12 100644 --- a/sys/arch/mvme88k/mvme88k/trap.c +++ b/sys/arch/mvme88k/mvme88k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.51 2003/09/17 22:22:32 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.52 2003/09/26 19:04:30 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -91,8 +91,8 @@ unsigned traptrace = 0; #define DEBUG_MSG printf #endif /* DDB */ -#define USERMODE(PSR) (((struct psr*)&(PSR))->psr_mode == 0) -#define SYSTEMMODE(PSR) (((struct psr*)&(PSR))->psr_mode != 0) +#define USERMODE(PSR) (((PSR) & PSR_MODE) == 0) +#define SYSTEMMODE(PSR) (((PSR) & PSR_MODE) != 0) /* sigh */ extern int procfs_domem(struct proc *, struct proc *, void *, struct uio *); |