diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-05-22 20:37:55 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-05-22 20:37:55 +0000 |
commit | 1b14b5a0ab8f44cf9a7b23dc41ac7f7c7f936f5e (patch) | |
tree | 31686a5942b4a3de180cd3e1330eb2a520ea972f | |
parent | 936eacbd2167cd2794d8383ba8aaca7d7409636a (diff) |
Drop almost unused <machine/psl.h> on sgi; move USERMODE() definition from
there to trap.c which is its only user. This also cleans up multiple
inclusion of <machine/cpu.h> (because <machine/psl.h> includes it) in many
places.
-rw-r--r-- | distrib/sets/lists/base/md.sgi | 1 | ||||
-rw-r--r-- | distrib/sets/lists/comp/md.sgi | 1 | ||||
-rw-r--r-- | sys/arch/mips64/include/cpu.h | 7 | ||||
-rw-r--r-- | sys/arch/mips64/include/param.h | 6 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/cache_r10k.S | 3 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/cache_r5k.S | 3 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/context.S | 3 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/cp0access.S | 3 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/exception.S | 116 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/interrupt.c | 3 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/lcore_access.S | 3 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/lcore_ddb.S | 3 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/lcore_float.S | 3 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/process_machdep.c | 5 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/tlbhandler.S | 3 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/trap.c | 6 | ||||
-rw-r--r-- | sys/arch/sgi/include/intr.h | 3 | ||||
-rw-r--r-- | sys/arch/sgi/include/psl.h | 39 | ||||
-rw-r--r-- | sys/arch/sgi/localbus/macectrl.S | 3 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/locore.S | 3 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/machdep.c | 3 |
21 files changed, 24 insertions, 196 deletions
diff --git a/distrib/sets/lists/base/md.sgi b/distrib/sets/lists/base/md.sgi index 4af22517927..b009fd4e0bb 100644 --- a/distrib/sets/lists/base/md.sgi +++ b/distrib/sets/lists/base/md.sgi @@ -2170,7 +2170,6 @@ ./usr/libdata/perl5/site_perl/mips64-openbsd/sgi/pmap.ph ./usr/libdata/perl5/site_perl/mips64-openbsd/sgi/proc.ph ./usr/libdata/perl5/site_perl/mips64-openbsd/sgi/profile.ph -./usr/libdata/perl5/site_perl/mips64-openbsd/sgi/psl.ph ./usr/libdata/perl5/site_perl/mips64-openbsd/sgi/pte.ph ./usr/libdata/perl5/site_perl/mips64-openbsd/sgi/ptrace.ph ./usr/libdata/perl5/site_perl/mips64-openbsd/sgi/reg.ph diff --git a/distrib/sets/lists/comp/md.sgi b/distrib/sets/lists/comp/md.sgi index 90a1a42a66b..dbad457411a 100644 --- a/distrib/sets/lists/comp/md.sgi +++ b/distrib/sets/lists/comp/md.sgi @@ -222,7 +222,6 @@ ./usr/include/sgi/pmap.h ./usr/include/sgi/proc.h ./usr/include/sgi/profile.h -./usr/include/sgi/psl.h ./usr/include/sgi/pte.h ./usr/include/sgi/ptrace.h ./usr/include/sgi/reg.h diff --git a/sys/arch/mips64/include/cpu.h b/sys/arch/mips64/include/cpu.h index ae9f62855b8..a2965f4ffe5 100644 --- a/sys/arch/mips64/include/cpu.h +++ b/sys/arch/mips64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.30 2009/03/26 17:24:33 oga Exp $ */ +/* $OpenBSD: cpu.h,v 1.31 2009/05/22 20:37:53 miod Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -45,8 +45,6 @@ #ifndef _MIPS_CPU_H_ #define _MIPS_CPU_H_ -#include <machine/psl.h> - /* * MIPS32-style segment definitions. * They only cover the first 512MB of physical addresses. @@ -386,6 +384,8 @@ extern struct cpu_info cpu_info_primary; #define cpu_number() 0 #include <machine/frame.h> +#include <machine/intr.h> + /* * Arguments to hardclock and gatherstats encapsulate the previous * machine state in an opaque clockframe. @@ -563,7 +563,6 @@ void setsoftintr1(void); void clearsoftintr1(void); u_int32_t enableintr(void); u_int32_t disableintr(void); -u_int32_t updateimask(intrmask_t); void setsr(u_int32_t); u_int32_t getsr(void); diff --git a/sys/arch/mips64/include/param.h b/sys/arch/mips64/include/param.h index 5e05e5b931d..85629e6df67 100644 --- a/sys/arch/mips64/include/param.h +++ b/sys/arch/mips64/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.19 2009/05/06 20:02:44 miod Exp $ */ +/* $OpenBSD: param.h,v 1.20 2009/05/22 20:37:53 miod Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -41,12 +41,8 @@ #define _MIPS_PARAM_H_ #ifdef _KERNEL -#ifdef _LOCORE -#include <machine/psl.h> -#else #include <machine/cpu.h> #endif -#endif /* * Round p (pointer or byte index) up to a correctly-aligned value for all diff --git a/sys/arch/mips64/mips64/cache_r10k.S b/sys/arch/mips64/mips64/cache_r10k.S index 0bb6285dc07..45f13932c75 100644 --- a/sys/arch/mips64/mips64/cache_r10k.S +++ b/sys/arch/mips64/mips64/cache_r10k.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cache_r10k.S,v 1.7 2008/04/07 22:30:47 miod Exp $ */ +/* $OpenBSD: cache_r10k.S,v 1.8 2009/05/22 20:37:53 miod Exp $ */ /* * Copyright (c) 2004 Opsycon AB (www.opsycon.se) @@ -37,7 +37,6 @@ #include <sys/syscall.h> #include <machine/param.h> -#include <machine/psl.h> #include <machine/asm.h> #include <machine/cpu.h> #include <machine/regnum.h> diff --git a/sys/arch/mips64/mips64/cache_r5k.S b/sys/arch/mips64/mips64/cache_r5k.S index 67df52de0ea..ab305a29caa 100644 --- a/sys/arch/mips64/mips64/cache_r5k.S +++ b/sys/arch/mips64/mips64/cache_r5k.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cache_r5k.S,v 1.22 2008/04/07 22:30:47 miod Exp $ */ +/* $OpenBSD: cache_r5k.S,v 1.23 2009/05/22 20:37:53 miod Exp $ */ /* * Copyright (c) 1998-2004 Opsycon AB (www.opsycon.se) @@ -45,7 +45,6 @@ #include <sys/syscall.h> #include <machine/param.h> -#include <machine/psl.h> #include <machine/asm.h> #include <machine/cpu.h> #include <machine/regnum.h> diff --git a/sys/arch/mips64/mips64/context.S b/sys/arch/mips64/mips64/context.S index 502d36a7f15..0e2e1a380b9 100644 --- a/sys/arch/mips64/mips64/context.S +++ b/sys/arch/mips64/mips64/context.S @@ -1,4 +1,4 @@ -/* $OpenBSD: context.S,v 1.21 2009/05/21 16:10:38 miod Exp $ */ +/* $OpenBSD: context.S,v 1.22 2009/05/22 20:37:53 miod Exp $ */ /* * Copyright (c) 2002-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -29,7 +29,6 @@ #include <sys/syscall.h> #include <machine/param.h> -#include <machine/psl.h> #include <machine/asm.h> #include <machine/cpu.h> #include <machine/regnum.h> diff --git a/sys/arch/mips64/mips64/cp0access.S b/sys/arch/mips64/mips64/cp0access.S index d369e2557be..9495679be34 100644 --- a/sys/arch/mips64/mips64/cp0access.S +++ b/sys/arch/mips64/mips64/cp0access.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cp0access.S,v 1.8 2007/10/18 04:32:25 miod Exp $ */ +/* $OpenBSD: cp0access.S,v 1.9 2009/05/22 20:37:53 miod Exp $ */ /* * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -34,7 +34,6 @@ #include <sys/syscall.h> #include <machine/param.h> -#include <machine/psl.h> #include <machine/asm.h> #include <machine/cpu.h> #include <machine/regnum.h> diff --git a/sys/arch/mips64/mips64/exception.S b/sys/arch/mips64/mips64/exception.S index 872215dd002..fa0f6a1bca6 100644 --- a/sys/arch/mips64/mips64/exception.S +++ b/sys/arch/mips64/mips64/exception.S @@ -1,4 +1,4 @@ -/* $OpenBSD: exception.S,v 1.17 2009/05/19 16:16:43 miod Exp $ */ +/* $OpenBSD: exception.S,v 1.18 2009/05/22 20:37:53 miod Exp $ */ /* * Copyright (c) 2002-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -40,7 +40,6 @@ */ #include <machine/param.h> -#include <machine/psl.h> #include <machine/asm.h> #include <machine/cpu.h> #include <machine/regnum.h> @@ -492,119 +491,6 @@ NNON_LEAF(u_general, FRAMESZ(CF_SZ), ra) .set at END(u_general) -#ifdef notyet -/*---------------------------------------------------------------- u_syscall - * Syscall exceptions are special such that they can be - * optimized by not saving more than what is really needed. - * Syscalls are actually 'function calls' from the user - * programs point of view and thus it does not expect us to - * save away all temporary registers etc. Just save state and - * args to avoid a lot of overhead. - */ -NNON_LEAF(u_syscall, FRAMESZ(CF_SZ), ra) - .set noat - .mask 0x80000000, (CF_RA_OFFS - FRAMESZ(CF_SZ)) - - REG_S a0, UADDR+PCB_REGS+(A0 * REGSZ) - REG_S a1, UADDR+PCB_REGS+(A1 * REGSZ) - REG_S a2, UADDR+PCB_REGS+(A2 * REGSZ) - REG_S a3, UADDR+PCB_REGS+(A3 * REGSZ) - mfc0 a0, COP_0_STATUS_REG # First arg is the status reg. - mfc0 a1, COP_0_CAUSE_REG # Second arg is the cause reg. - dmfc0 a3, COP_0_EXC_PC # Fourth arg is the pc. - REG_S sp, UADDR+PCB_REGS+(SP * REGSZ) - LA sp, KERNELSTACK - FRAMESZ(CF_SZ) # switch to kernel SP - REG_S ra, UADDR+PCB_REGS+(RA * REGSZ) - REG_S a0, UADDR+PCB_REGS+(SR * REGSZ) - REG_S a1, UADDR+PCB_REGS+(CAUSE * REGSZ) - REG_S a3, UADDR+PCB_REGS+(PC * REGSZ) - REG_S a3, CF_RA_OFFS(sp) # for debugging - LA gp, _gp # switch to kernel GP - lw a3, cpl - sw a3, UADDR+PCB_REGS+(CPL * REGSZ) - .set at -# Turn off fpu and enter kernel mode - and t0, a0, ~(SR_COP_1_BIT | SR_EXL | SR_KSU_MASK | SR_INT_ENAB) - mtc0 t0, COP_0_STATUS_REG - li a0, UADDR+PCB_REGS - ITLBNOPFIX -/* - * If CPU is a RM7000 save away performance stuff. - */ -#if 0 - lw t0, cpu_is_rm7k - beqz t0, 1f # not an RM7K. Don't do perf save. - mfc0 v0, COP_0_PC_CTRL - lw t0, curproc - sw v0, P_PC_CTRL(t0) - dmfc0 v0, COP_0_WATCH_1 - dmfc0 v1, COP_0_WATCH_2 - sd v0, P_WATCH_1(t0) - sd v1, P_WATCH_2(t0) - mfc0 v0, COP_0_WATCH_M - mfc0 v1, COP_0_PC_COUNT - sw v0, P_WATCH_M(t0) - sw v1, P_PC_COUNT(t0) - mtc0 zero, COP_0_PC_CTRL - dmtc0 zero, COP_0_WATCH_1 - dmtc0 zero, COP_0_WATCH_2 -1: -#endif - - jal trap - nop - - mfc0 t0, COP_0_STATUS_REG # dis int preserve settings. - li t1, ~SR_INT_ENAB - and t0, t0, t1 - mtc0 t0, COP_0_STATUS_REG - ITLBNOPFIX - - ori t0, SR_EXL - mtc0 t0, COP_0_STATUS_REG # set exception level - ITLBNOPFIX - -#if 0 - lw t0, cpu_is_rm7k - beqz t0, 1f # not an RM7K. Don't do perf setup. - - PTR_L t0, curproc # set up rm7k. - ld v0, P_WATCH_1(t0) - dmtc0 v0, COP_0_WATCH_1 - ld v0, P_WATCH_2(t0) - dmtc0 v0, COP_0_WATCH_2 - lw v0, P_WATCH_M(t0) - mtc0 v0, COP_0_WATCH_M - lw v0, P_PC_CTRL(t0) - lw v1, P_PC_COUNT(t0) - nop;nop - mtc0 v0, COP_0_PC_CTRL - nop;nop;nop;nop - mtc0 v1, COP_0_PC_COUNT - nop;nop;nop;nop -1: -#endif - lw a3, UADDR+PCB_REGS+(CPL * REGSZ) - sw a3, cpl - - .set noat - - REG_L a0, UADDR+PCB_REGS+(SR * REGSZ) - mtc0 a0, COP_0_STATUS_REG # still exception level - REG_L a0, UADDR+PCB_REGS+(PC * REGSZ) - REG_L v0, UADDR+PCB_REGS+(V0 * REGSZ) - dmtc0 a0, COP_0_EXC_PC # set return address - REG_L v1, UADDR+PCB_REGS+(V1 * REGSZ) - REG_L gp, UADDR+PCB_REGS+(GP * REGSZ) - REG_L sp, UADDR+PCB_REGS+(SP * REGSZ) - REG_L ra, UADDR+PCB_REGS+(RA * REGSZ) - sync - eret - .set at -END(u_syscall) -#endif - - /*-------------------------------------------------------------- proc_trampoline * Setup for and return to user. */ diff --git a/sys/arch/mips64/mips64/interrupt.c b/sys/arch/mips64/mips64/interrupt.c index 20b6265809d..1ca5fda6c2f 100644 --- a/sys/arch/mips64/mips64/interrupt.c +++ b/sys/arch/mips64/mips64/interrupt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interrupt.c,v 1.37 2009/05/21 16:08:56 miod Exp $ */ +/* $OpenBSD: interrupt.c,v 1.38 2009/05/22 20:37:53 miod Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -38,7 +38,6 @@ #endif #include <machine/trap.h> -#include <machine/psl.h> #include <machine/cpu.h> #include <machine/intr.h> #include <machine/autoconf.h> diff --git a/sys/arch/mips64/mips64/lcore_access.S b/sys/arch/mips64/mips64/lcore_access.S index e2c808d723f..88644bf3aab 100644 --- a/sys/arch/mips64/mips64/lcore_access.S +++ b/sys/arch/mips64/mips64/lcore_access.S @@ -1,4 +1,4 @@ -/* $OpenBSD: lcore_access.S,v 1.16 2009/02/15 14:13:33 jsing Exp $ */ +/* $OpenBSD: lcore_access.S,v 1.17 2009/05/22 20:37:53 miod Exp $ */ /* * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -29,7 +29,6 @@ #include <sys/syscall.h> #include <machine/param.h> -#include <machine/psl.h> #include <machine/asm.h> #include <machine/cpu.h> #include <machine/regnum.h> diff --git a/sys/arch/mips64/mips64/lcore_ddb.S b/sys/arch/mips64/mips64/lcore_ddb.S index 8e72fe38bdf..bf9306d5450 100644 --- a/sys/arch/mips64/mips64/lcore_ddb.S +++ b/sys/arch/mips64/mips64/lcore_ddb.S @@ -1,4 +1,4 @@ -/* $OpenBSD: lcore_ddb.S,v 1.8 2005/12/20 07:06:26 miod Exp $ */ +/* $OpenBSD: lcore_ddb.S,v 1.9 2009/05/22 20:37:53 miod Exp $ */ /* * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -29,7 +29,6 @@ #include <sys/syscall.h> #include <machine/param.h> -#include <machine/psl.h> #include <machine/asm.h> #include <machine/cpu.h> #include <machine/regnum.h> diff --git a/sys/arch/mips64/mips64/lcore_float.S b/sys/arch/mips64/mips64/lcore_float.S index 3ca66836748..e3545676b16 100644 --- a/sys/arch/mips64/mips64/lcore_float.S +++ b/sys/arch/mips64/mips64/lcore_float.S @@ -1,4 +1,4 @@ -/* $OpenBSD: lcore_float.S,v 1.15 2007/10/18 04:32:25 miod Exp $ */ +/* $OpenBSD: lcore_float.S,v 1.16 2009/05/22 20:37:53 miod Exp $ */ /* * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -29,7 +29,6 @@ #include <sys/syscall.h> #include <machine/param.h> -#include <machine/psl.h> #include <machine/asm.h> #include <machine/cpu.h> #include <machine/regnum.h> diff --git a/sys/arch/mips64/mips64/process_machdep.c b/sys/arch/mips64/mips64/process_machdep.c index 06f48d09ac6..505ecf55e1c 100644 --- a/sys/arch/mips64/mips64/process_machdep.c +++ b/sys/arch/mips64/mips64/process_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: process_machdep.c,v 1.9 2008/07/28 18:48:25 miod Exp $ */ +/* $OpenBSD: process_machdep.c,v 1.10 2009/05/22 20:37:53 miod Exp $ */ /* * Copyright (c) 1994 Adam Glass @@ -40,7 +40,7 @@ * From: * Id: procfs_i386.c,v 4.1 1993/12/17 10:47:45 jsp Rel * - * $Id: process_machdep.c,v 1.9 2008/07/28 18:48:25 miod Exp $ + * $Id: process_machdep.c,v 1.10 2009/05/22 20:37:53 miod Exp $ */ /* @@ -73,7 +73,6 @@ #include <sys/user.h> #include <sys/vnode.h> #include <sys/ptrace.h> -#include <machine/psl.h> #include <machine/frame.h> #define REGSIZE sizeof(struct trap_frame) diff --git a/sys/arch/mips64/mips64/tlbhandler.S b/sys/arch/mips64/mips64/tlbhandler.S index 4bbd2603c64..c8141037618 100644 --- a/sys/arch/mips64/mips64/tlbhandler.S +++ b/sys/arch/mips64/mips64/tlbhandler.S @@ -1,4 +1,4 @@ -/* $OpenBSD: tlbhandler.S,v 1.16 2007/05/25 20:58:39 miod Exp $ */ +/* $OpenBSD: tlbhandler.S,v 1.17 2009/05/22 20:37:53 miod Exp $ */ /* * Copyright (c) 1995-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -31,7 +31,6 @@ */ #include <machine/param.h> -#include <machine/psl.h> #include <machine/pte.h> #include <machine/asm.h> #include <machine/cpu.h> diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c index 9fcbcc8841b..b7b0947fbbb 100644 --- a/sys/arch/mips64/mips64/trap.c +++ b/sys/arch/mips64/mips64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.41 2008/02/20 19:13:38 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.42 2009/05/22 20:37:53 miod Exp $ */ /* tracked to 1.23 */ /* @@ -68,7 +68,6 @@ #include <uvm/uvm_extern.h> #include <machine/trap.h> -#include <machine/psl.h> #include <machine/cpu.h> #include <machine/intr.h> #include <machine/autoconf.h> @@ -86,12 +85,13 @@ #include <ddb/db_sym.h> #endif -#include <sys/cdefs.h> #include <sys/syslog.h> #include "systrace.h" #include <dev/systrace.h> +#define USERMODE(ps) (((ps) & SR_KSU_MASK) == SR_KSU_USER) + int want_resched; /* resched() was called */ struct proc *machFPCurProcPtr; /* pointer to last proc to use FP */ diff --git a/sys/arch/sgi/include/intr.h b/sys/arch/sgi/include/intr.h index 1b2e9924ff7..dbb721bab9c 100644 --- a/sys/arch/sgi/include/intr.h +++ b/sys/arch/sgi/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.23 2009/05/21 16:08:05 miod Exp $ */ +/* $OpenBSD: intr.h,v 1.24 2009/05/22 20:37:53 miod Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -220,6 +220,7 @@ void hw_setintrmask(intrmask_t); extern void *hwmask_addr; #endif +u_int32_t updateimask(intrmask_t); void dosoftint(intrmask_t); #endif /* _LOCORE */ diff --git a/sys/arch/sgi/include/psl.h b/sys/arch/sgi/include/psl.h deleted file mode 100644 index d58f97d35c7..00000000000 --- a/sys/arch/sgi/include/psl.h +++ /dev/null @@ -1,39 +0,0 @@ -/* $OpenBSD: psl.h,v 1.2 2004/08/10 18:52:58 deraadt Exp $ */ - -/* - * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ -#include <machine/cpu.h> - -/* - * Macros to decode processor status word. - */ -#define USERMODE(ps) (((ps) & SR_KSU_MASK) == SR_KSU_USER) -#define BASEPRI(ps) (((ps) & (INT_MASK | SR_INT_ENA_PREV)) == \ - (INT_MASK | SR_INT_ENA_PREV)) - -#ifdef _KERNEL -#include <machine/intr.h> -#endif diff --git a/sys/arch/sgi/localbus/macectrl.S b/sys/arch/sgi/localbus/macectrl.S index 8dba3ddf70d..85110f92e02 100644 --- a/sys/arch/sgi/localbus/macectrl.S +++ b/sys/arch/sgi/localbus/macectrl.S @@ -1,4 +1,4 @@ -/* $OpenBSD: macectrl.S,v 1.5 2004/09/27 18:52:01 pefo Exp $ */ +/* $OpenBSD: macectrl.S,v 1.6 2009/05/22 20:37:54 miod Exp $ */ /* * Copyright (c) 2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -26,7 +26,6 @@ * */ #include <machine/param.h> -#include <machine/psl.h> #include <machine/asm.h> #include <machine/cpu.h> #include <machine/regnum.h> diff --git a/sys/arch/sgi/sgi/locore.S b/sys/arch/sgi/sgi/locore.S index 688d488f695..22c28b4b9b7 100644 --- a/sys/arch/sgi/sgi/locore.S +++ b/sys/arch/sgi/sgi/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.8 2008/03/30 20:14:14 miod Exp $ */ +/* $OpenBSD: locore.S,v 1.9 2009/05/22 20:37:54 miod Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -29,7 +29,6 @@ #include <sys/syscall.h> #include <machine/param.h> -#include <machine/psl.h> #include <machine/asm.h> #include <machine/cpu.h> #include <machine/regnum.h> diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c index bbf7a8ead15..c17009ce11a 100644 --- a/sys/arch/sgi/sgi/machdep.c +++ b/sys/arch/sgi/sgi/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.66 2009/05/21 16:28:12 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.67 2009/05/22 20:37:54 miod Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -63,7 +63,6 @@ #include <machine/cpu.h> #include <machine/frame.h> -#include <machine/psl.h> #include <machine/autoconf.h> #include <machine/memconf.h> #include <machine/regnum.h> |