diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c index 9fb1525a6930..bfe5bfff7017 100644 --- a/sys/amd64/amd64/mem.c +++ b/sys/amd64/amd64/mem.c @@ -38,7 +38,7 @@ * * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 - * $Id: mem.c,v 1.41 1997/02/22 09:32:33 peter Exp $ + * $Id: mem.c,v 1.42 1997/04/14 15:54:26 bde Exp $ */ /* @@ -145,16 +145,13 @@ mmclose(dev, flags, fmt, p) int fmt; struct proc *p; { - struct trapframe *fp; - switch (minor(dev)) { #ifdef PERFMON case 32: return perfmon_close(dev, flags, fmt, p); #endif case 14: - fp = (struct trapframe *)curproc->p_md.md_regs; - fp->tf_eflags &= ~PSL_IOPL; + curproc->p_md.md_regs->tf_eflags &= ~PSL_IOPL; break; default: break; @@ -170,7 +167,6 @@ mmopen(dev, flags, fmt, p) struct proc *p; { int error; - struct trapframe *fp; switch (minor(dev)) { case 32: @@ -185,8 +181,7 @@ mmopen(dev, flags, fmt, p) return (error); if (securelevel > 0) return (EPERM); - fp = (struct trapframe *)curproc->p_md.md_regs; - fp->tf_eflags |= PSL_IOPL; + curproc->p_md.md_regs->tf_eflags |= PSL_IOPL; break; default: break; diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 641da111d6d5..ae7b43282852 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.213 1997/04/30 15:31:22 ache Exp $ + * $Id: syscons.c,v 1.214 1997/05/07 10:42:06 yokota Exp $ */ #include "sc.h" @@ -718,7 +718,6 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) int error; u_int i; struct tty *tp; - struct trapframe *fp; scr_stat *scp; tp = scdevtotty(dev); @@ -1138,13 +1137,11 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) return error; if (securelevel > 0) return EPERM; - fp = (struct trapframe *)p->p_md.md_regs; - fp->tf_eflags |= PSL_IOPL; + p->p_md.md_regs->tf_eflags |= PSL_IOPL; return 0; case KDDISABIO: /* disallow io operations (default) */ - fp = (struct trapframe *)p->p_md.md_regs; - fp->tf_eflags &= ~PSL_IOPL; + p->p_md.md_regs->tf_eflags &= ~PSL_IOPL; return 0; case KDSETMODE: /* set current mode of this (virtual) console */ diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c index 9fb1525a6930..bfe5bfff7017 100644 --- a/sys/i386/i386/mem.c +++ b/sys/i386/i386/mem.c @@ -38,7 +38,7 @@ * * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 - * $Id: mem.c,v 1.41 1997/02/22 09:32:33 peter Exp $ + * $Id: mem.c,v 1.42 1997/04/14 15:54:26 bde Exp $ */ /* @@ -145,16 +145,13 @@ mmclose(dev, flags, fmt, p) int fmt; struct proc *p; { - struct trapframe *fp; - switch (minor(dev)) { #ifdef PERFMON case 32: return perfmon_close(dev, flags, fmt, p); #endif case 14: - fp = (struct trapframe *)curproc->p_md.md_regs; - fp->tf_eflags &= ~PSL_IOPL; + curproc->p_md.md_regs->tf_eflags &= ~PSL_IOPL; break; default: break; @@ -170,7 +167,6 @@ mmopen(dev, flags, fmt, p) struct proc *p; { int error; - struct trapframe *fp; switch (minor(dev)) { case 32: @@ -185,8 +181,7 @@ mmopen(dev, flags, fmt, p) return (error); if (securelevel > 0) return (EPERM); - fp = (struct trapframe *)curproc->p_md.md_regs; - fp->tf_eflags |= PSL_IOPL; + curproc->p_md.md_regs->tf_eflags |= PSL_IOPL; break; default: break; diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c index c149895dd68c..9c76e8101f36 100644 --- a/sys/i386/isa/spigot.c +++ b/sys/i386/isa/spigot.c @@ -211,7 +211,6 @@ spigot_ioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) { int error; struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)]; -struct trapframe *fp; struct spigot_info *info; if(!data) return(EINVAL); @@ -228,12 +227,10 @@ struct spigot_info *info; if (securelevel > 0) return EPERM; #endif - fp=(struct trapframe *)p->p_md.md_regs; - fp->tf_eflags |= PSL_IOPL; + p->p_md.md_regs->tf_eflags |= PSL_IOPL; break; case SPIGOT_IOPL_OFF: /* deny access to the IO PAGE */ - fp=(struct trapframe *)p->p_md.md_regs; - fp->tf_eflags &= ~PSL_IOPL; + p->p_md.md_regs->tf_eflags &= ~PSL_IOPL; break; case SPIGOT_GET_INFO: info = (struct spigot_info *)data; diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c index 641da111d6d5..ae7b43282852 100644 --- a/sys/i386/isa/syscons.c +++ b/sys/i386/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.213 1997/04/30 15:31:22 ache Exp $ + * $Id: syscons.c,v 1.214 1997/05/07 10:42:06 yokota Exp $ */ #include "sc.h" @@ -718,7 +718,6 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) int error; u_int i; struct tty *tp; - struct trapframe *fp; scr_stat *scp; tp = scdevtotty(dev); @@ -1138,13 +1137,11 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) return error; if (securelevel > 0) return EPERM; - fp = (struct trapframe *)p->p_md.md_regs; - fp->tf_eflags |= PSL_IOPL; + p->p_md.md_regs->tf_eflags |= PSL_IOPL; return 0; case KDDISABIO: /* disallow io operations (default) */ - fp = (struct trapframe *)p->p_md.md_regs; - fp->tf_eflags &= ~PSL_IOPL; + p->p_md.md_regs->tf_eflags &= ~PSL_IOPL; return 0; case KDSETMODE: /* set current mode of this (virtual) console */ diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c index 641da111d6d5..ae7b43282852 100644 --- a/sys/isa/syscons.c +++ b/sys/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.213 1997/04/30 15:31:22 ache Exp $ + * $Id: syscons.c,v 1.214 1997/05/07 10:42:06 yokota Exp $ */ #include "sc.h" @@ -718,7 +718,6 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) int error; u_int i; struct tty *tp; - struct trapframe *fp; scr_stat *scp; tp = scdevtotty(dev); @@ -1138,13 +1137,11 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) return error; if (securelevel > 0) return EPERM; - fp = (struct trapframe *)p->p_md.md_regs; - fp->tf_eflags |= PSL_IOPL; + p->p_md.md_regs->tf_eflags |= PSL_IOPL; return 0; case KDDISABIO: /* disallow io operations (default) */ - fp = (struct trapframe *)p->p_md.md_regs; - fp->tf_eflags &= ~PSL_IOPL; + p->p_md.md_regs->tf_eflags &= ~PSL_IOPL; return 0; case KDSETMODE: /* set current mode of this (virtual) console */