diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2013-05-05 19:25:58 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2013-05-05 19:25:58 +0000 |
commit | 537886df4c0221451b6a580d72f745851584ec18 (patch) | |
tree | d49b03269ab0cd936f1a4562c9aafdd0ebf81f39 /sys | |
parent | 32848e10be29b62f8780467f5cd8b63d3ccb490f (diff) |
remove never used get/set ioperm sysarch functions. ok guenther
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/sys_machdep.c | 52 | ||||
-rw-r--r-- | sys/arch/amd64/include/sysarch.h | 12 |
2 files changed, 2 insertions, 62 deletions
diff --git a/sys/arch/amd64/amd64/sys_machdep.c b/sys/arch/amd64/amd64/sys_machdep.c index 38b1364bfc7..ef27da16596 100644 --- a/sys/arch/amd64/amd64/sys_machdep.c +++ b/sys/arch/amd64/amd64/sys_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_machdep.c,v 1.12 2011/04/13 02:49:12 guenther Exp $ */ +/* $OpenBSD: sys_machdep.c,v 1.13 2013/05/05 19:25:57 tedu Exp $ */ /* $NetBSD: sys_machdep.c,v 1.1 2003/04/26 18:39:32 fvdl Exp $ */ /*- @@ -60,10 +60,6 @@ extern struct vm_map *kernel_map; -#if 0 -int amd64_get_ioperm(struct proc *, void *, register_t *); -int amd64_set_ioperm(struct proc *, void *, register_t *); -#endif int amd64_iopl(struct proc *, void *, register_t *); #ifdef APERTURE @@ -99,42 +95,6 @@ amd64_iopl(struct proc *p, void *args, register_t *retval) return 0; } -#if 0 - -int -amd64_get_ioperm(struct proc *p, void *args, register_t *retval) -{ - int error; - struct pcb *pcb = &p->p_addr->u_pcb; - struct amd64_get_ioperm_args ua; - - if ((error = copyin(args, &ua, sizeof(ua))) != 0) - return (error); - - return copyout(pcb->pcb_iomap, ua.iomap, sizeof(pcb->pcb_iomap)); -} - -int -amd64_set_ioperm(struct proc *p, void *args, register_t *retval) -{ - int error; - struct pcb *pcb = &p->p_addr->u_pcb; - struct amd64_set_ioperm_args ua; - - if (securelevel > 1) - return EPERM; - - if ((error = suser(p, 0)) != 0) - return error; - - if ((error = copyin(args, &ua, sizeof(ua))) != 0) - return (error); - - return copyin(ua.iomap, pcb->pcb_iomap, sizeof(pcb->pcb_iomap)); -} - -#endif - int amd64_get_fsbase(struct proc *p, void *args) { @@ -172,16 +132,6 @@ sys_sysarch(struct proc *p, void *v, register_t *retval) error = amd64_iopl(p, SCARG(uap, parms), retval); break; -#if 0 - case AMD64_GET_IOPERM: - error = amd64_get_ioperm(p, SCARG(uap, parms), retval); - break; - - case AMD64_SET_IOPERM: - error = amd64_set_ioperm(p, SCARG(uap, parms), retval); - break; -#endif - #if defined(PERFCTRS) && 0 case AMD64_PMC_INFO: error = pmc_info(p, SCARG(uap, parms), retval); diff --git a/sys/arch/amd64/include/sysarch.h b/sys/arch/amd64/include/sysarch.h index 185a0837af9..e139fc763b4 100644 --- a/sys/arch/amd64/include/sysarch.h +++ b/sys/arch/amd64/include/sysarch.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sysarch.h,v 1.12 2012/12/05 23:20:10 deraadt Exp $ */ +/* $OpenBSD: sysarch.h,v 1.13 2013/05/05 19:25:57 tedu Exp $ */ /* $NetBSD: sysarch.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $ */ #ifndef _MACHINE_SYSARCH_H_ @@ -21,14 +21,6 @@ struct amd64_iopl_args { int iopl; }; -struct amd64_get_ioperm_args { - u_long *iomap; -}; - -struct amd64_set_ioperm_args { - u_long *iomap; -}; - struct amd64_pmc_info_args { int type; int flags; @@ -73,8 +65,6 @@ int amd64_get_fsbase(struct proc *, void *); __BEGIN_DECLS int amd64_iopl(int); -int amd64_get_ioperm(u_long *); -int amd64_set_ioperm(u_long *); int amd64_pmc_info(struct amd64_pmc_info_args *); int amd64_pmc_startstop(struct amd64_pmc_startstop_args *); int amd64_pmc_read(struct amd64_pmc_read_args *); |