Index: head/ObsoleteFiles.inc =================================================================== --- head/ObsoleteFiles.inc +++ head/ObsoleteFiles.inc @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20180417: remove fuswintr and suswintr +OLD_FILES+=usr/share/man/man9/fuswintr.9.gz +OLD_FILES+=usr/share/man/man9/suswintr.9.gz # 20180413: remove Arcnet support OLD_FILES+=usr/include/net/if_arc.h OLD_FILES+=usr/share/man/man4/cm.4.gz Index: head/share/man/man9/Makefile =================================================================== --- head/share/man/man9/Makefile +++ head/share/man/man9/Makefile @@ -960,7 +960,6 @@ fdt_pinctrl.9 fdt_pinctrl_configure_tree.9 \ fdt_pinctrl.9 fdt_pinctrl_register.9 MLINKS+=fetch.9 fubyte.9 \ - fetch.9 fuswintr.9 \ fetch.9 fuword.9 \ fetch.9 fuword16.9 \ fetch.9 fuword32.9 \ @@ -1934,7 +1933,6 @@ stack.9 stack_sbuf_print_ddb.9 \ stack.9 stack_zero.9 MLINKS+=store.9 subyte.9 \ - store.9 suswintr.9 \ store.9 suword.9 \ store.9 suword16.9 \ store.9 suword32.9 \ Index: head/share/man/man9/fetch.9 =================================================================== --- head/share/man/man9/fetch.9 +++ head/share/man/man9/fetch.9 @@ -34,13 +34,12 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2014 +.Dd April 17, 2018 .Dt FETCH 9 .Os .Sh NAME .Nm fetch , .Nm fubyte , -.Nm fuswintr , .Nm fuword , .Nm fuword16 , .Nm fuword32 , @@ -69,8 +68,6 @@ .Ft int64_t .Fn fueword64 "volatile const void *base" "int64_t *val" .In sys/resourcevar.h -.Ft int -.Fn fuswintr "void *base" .Sh DESCRIPTION The .Nm @@ -100,10 +97,6 @@ .It Fn fuword64 Fetches 64 bits of data from the user-space address .Pa base . -.It Fn fuswintr -Fetches a short word of data from the user-space address -.Pa base . -This function is safe to call during an interrupt context. .It Fn fueword Fetches a word of data (long) from the user-space address .Pa base @@ -134,9 +127,8 @@ .Fn fuword , .Fn fuword16 , .Fn fuword32 , -.Fn fuword64 , and -.Fn fuswintr +.Fn fuword64 functions return the data fetched or -1 on failure. The .Fn fueword , Index: head/share/man/man9/store.9 =================================================================== --- head/share/man/man9/store.9 +++ head/share/man/man9/store.9 @@ -34,13 +34,12 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2014 +.Dd April 17, 2018 .Dt STORE 9 .Os .Sh NAME .Nm store , .Nm subyte , -.Nm suswintr , .Nm suword .Nd store data to user-space .Sh SYNOPSIS @@ -58,8 +57,6 @@ .Ft int .Fn suword64 "volatile void *base" "int64_t word" .In sys/resourcevar.h -.Ft int -.Fn suswintr "void *base" "int word" .Sh DESCRIPTION The .Nm @@ -70,7 +67,7 @@ The .Nm routines provide the following functionality: -.Bl -tag -width "suswintr()" +.Bl -tag -width "suword64()" .It Fn subyte Stores a byte of data to the user-space address .Pa base . @@ -86,10 +83,6 @@ .It Fn suword64 Stores 64 bits of data to the user-space address .Pa base . -.It Fn suswintr -Stores a short word of data to the user-space address -.Pa base . -This function is safe to call during an interrupt context. .El .Sh RETURN VALUES The Index: head/sys/amd64/amd64/support.S =================================================================== --- head/sys/amd64/amd64/support.S +++ head/sys/amd64/amd64/support.S @@ -456,20 +456,6 @@ ret END(fueword32) -/* - * fuswintr() and suswintr() are specialized variants of fuword16() and - * suword16(), respectively. They are called from the profiling code, - * potentially at interrupt time. If they fail, that's okay; good things - * will happen later. They always fail for now, until the trap code is - * able to deal with this. - */ -ALTENTRY(suswintr) -ENTRY(fuswintr) - movq $-1,%rax - ret -END(suswintr) -END(fuswintr) - ENTRY(fuword16) PUSH_FRAME_POINTER movq PCPU(CURPCB),%rcx Index: head/sys/arm/arm/fusu.S =================================================================== --- head/sys/arm/arm/fusu.S +++ head/sys/arm/arm/fusu.S @@ -176,17 +176,6 @@ END(fusword) /* - * fuswintr(caddr_t uaddr); - * Fetch a short from the user's address space. Can be called during an - * interrupt. - */ - -ENTRY(fuswintr) - mov r0, #-1 - RET -END(fuswintr) - -/* * fubyte(caddr_t uaddr); * Fetch a byte from the user's address space. */ @@ -271,17 +260,6 @@ RET EEND(suword32) END(suword) - -/* - * suswintr(caddr_t uaddr, short x); - * Store a short in the user's address space. Can be called during an - * interrupt. - */ - -ENTRY(suswintr) - mov r0, #-1 - RET -END(suswintr) /* * susword(caddr_t uaddr, short x); Index: head/sys/arm64/arm64/support.S =================================================================== --- head/sys/arm64/arm64/support.S +++ head/sys/arm64/arm64/support.S @@ -218,51 +218,6 @@ EEND(suword64) END(suword) -/* - * fuswintr and suswintr are just like fusword and susword except that if - * the page is not in memory or would cause a trap, then we return an error. - * The important thing is to prevent sleep() and switch(). - */ - -/* - * Special handler so the trap code knows not to sleep. - */ -ENTRY(fsu_intr_fault) - SET_FAULT_HANDLER(xzr, x1) /* Reset the handler function */ - EXIT_USER_ACCESS_CHECK(w0, x1) - mov x0, #-1 - ret -END(fsu_fault) - -/* - * int fuswintr(void *) - */ -ENTRY(fuswintr) - ldr x1, =(VM_MAXUSER_ADDRESS-3) - cmp x0, x1 - b.cs fsu_fault_nopcb - adr x6, fsu_intr_fault /* Load the fault handler */ - SET_FAULT_HANDLER(x6, x1) /* And set it */ - ldtr w0, [x0] /* Try loading the data */ - SET_FAULT_HANDLER(xzr, x1) /* Reset the fault handler */ - ret /* Return */ -END(fuswintr) - -/* - * int suswintr(void *base, int word) - */ -ENTRY(suswintr) - ldr x2, =(VM_MAXUSER_ADDRESS-3) - cmp x0, x2 - b.cs fsu_fault_nopcb - adr x6, fsu_intr_fault /* Load the fault handler */ - SET_FAULT_HANDLER(x6, x2) /* And set it */ - sttr w1, [x0] /* Try storing the data */ - SET_FAULT_HANDLER(xzr, x2) /* Reset the fault handler */ - mov x0, #0 /* Success */ - ret /* Return */ -END(suswintr) - ENTRY(setjmp) /* Store the stack pointer */ mov x8, sp Index: head/sys/arm64/arm64/trap.c =================================================================== --- head/sys/arm64/arm64/trap.c +++ head/sys/arm64/arm64/trap.c @@ -172,16 +172,6 @@ #endif pcb = td->td_pcb; - - /* - * Special case for fuswintr and suswintr. These can't sleep so - * handle them early on in the trap handler. - */ - if (__predict_false(pcb->pcb_onfault == (vm_offset_t)&fsu_intr_fault)) { - frame->tf_elr = pcb->pcb_onfault; - return; - } - p = td->td_proc; if (lower) map = &p->p_vmspace->vm_map; Index: head/sys/conf/files.powerpc =================================================================== --- head/sys/conf/files.powerpc +++ head/sys/conf/files.powerpc @@ -212,7 +212,6 @@ powerpc/powerpc/elf64_machdep.c optional powerpc64 powerpc/powerpc/exec_machdep.c standard powerpc/powerpc/fpu.c standard -powerpc/powerpc/fuswintr.c standard powerpc/powerpc/gdb_machdep.c optional gdb powerpc/powerpc/in_cksum.c optional inet | inet6 powerpc/powerpc/interrupt.c standard @@ -236,7 +235,6 @@ powerpc/powerpc/swtch32.S optional powerpc | powerpcspe powerpc/powerpc/swtch64.S optional powerpc64 powerpc/powerpc/stack_machdep.c optional ddb | stack -powerpc/powerpc/suswintr.c standard powerpc/powerpc/syncicache.c standard powerpc/powerpc/sys_machdep.c standard powerpc/powerpc/trap.c standard Index: head/sys/i386/i386/support.s =================================================================== --- head/sys/i386/i386/support.s +++ head/sys/i386/i386/support.s @@ -252,20 +252,6 @@ END(memcpy) /* - * fuswintr() and suswintr() are specialized variants of fuword16() and - * suword16(), respectively. They are called from the profiling code, - * potentially at interrupt time. If they fail, that's okay; good things - * will happen later. They always fail for now, until the trap code is - * able to deal with this. - */ -ALTENTRY(suswintr) -ENTRY(fuswintr) - movl $-1,%eax - ret -END(suswintr) -END(fuswintr) - -/* * copystr(from, to, maxlen, int *lencopied) - MP SAFE */ ENTRY(copystr) Index: head/sys/mips/mips/support.S =================================================================== --- head/sys/mips/mips/support.S +++ head/sys/mips/mips/support.S @@ -417,41 +417,6 @@ END(fswberr) /* - * fuswintr and suswintr are just like fusword and susword except that if - * the page is not in memory or would cause a trap, then we return an error. - * The important thing is to prevent sleep() and switch(). - */ -LEAF(fuswintr) - PTR_LA v0, fswintrberr - blt a0, zero, fswintrberr # make sure address is in user space - nop - GET_CPU_PCPU(v1) - PTR_L v1, PC_CURPCB(v1) - PTR_S v0, U_PCB_ONFAULT(v1) - lhu v0, 0(a0) # fetch short - j ra - PTR_S zero, U_PCB_ONFAULT(v1) -END(fuswintr) - -LEAF(suswintr) - PTR_LA v0, fswintrberr - blt a0, zero, fswintrberr # make sure address is in user space - nop - GET_CPU_PCPU(v1) - PTR_L v1, PC_CURPCB(v1) - PTR_S v0, U_PCB_ONFAULT(v1) - sh a1, 0(a0) # store short - PTR_S zero, U_PCB_ONFAULT(v1) - j ra - move v0, zero -END(suswintr) - -LEAF(fswintrberr) - j ra - li v0, -1 -END(fswintrberr) - -/* * memset(void *s1, int c, int len) * NetBSD: memset.S,v 1.3 2001/10/16 15:40:53 uch Exp */ Index: head/sys/mips/mips/trap.c =================================================================== --- head/sys/mips/mips/trap.c +++ head/sys/mips/mips/trap.c @@ -684,14 +684,6 @@ if (td->td_pcb->pcb_onfault == NULL) goto err; - /* check for fuswintr() or suswintr() getting a page fault */ - /* XXX There must be a nicer way to do this. */ - if (td->td_pcb->pcb_onfault == fswintrberr) { - pc = (register_t)(intptr_t)td->td_pcb->pcb_onfault; - td->td_pcb->pcb_onfault = NULL; - return (pc); - } - goto dofault; case T_TLB_LD_MISS + T_USER: Index: head/sys/powerpc/powerpc/fuswintr.c =================================================================== --- head/sys/powerpc/powerpc/fuswintr.c +++ head/sys/powerpc/powerpc/fuswintr.c @@ -1,53 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (C) 1994 Wolfgang Solfrank. - * Copyright (C) 1994 TooLs GmbH. - * All rights reserved. - * - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by TooLs GmbH. - * 4. The name of TooLs GmbH may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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. - * - * $NetBSD: fuswintr.c,v 1.2 2000/06/08 07:29:54 kleink Exp $ - */ - -#include -__FBSDID("$FreeBSD$"); - -#include -#include -#include - -/* - * Emulate fuswintr - * - * Simply return fault for all cases - */ -int -fuswintr(void *addr) -{ - - return -1; -} Index: head/sys/powerpc/powerpc/suswintr.c =================================================================== --- head/sys/powerpc/powerpc/suswintr.c +++ head/sys/powerpc/powerpc/suswintr.c @@ -1,53 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (C) 1994 Wolfgang Solfrank. - * Copyright (C) 1994 TooLs GmbH. - * All rights reserved. - * - * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by TooLs GmbH. - * 4. The name of TooLs GmbH may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``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 TOOLS GMBH 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. - * - * $NetBSD: suswintr.c,v 1.2 2000/06/09 14:05:48 kleink Exp $ - */ - -#include -__FBSDID("$FreeBSD$"); - -#include -#include -#include - -/* - * Emulate suswintr - * - * Simply return fault for all cases - */ -int -suswintr(void *addr, int s) -{ - - return -1; -} Index: head/sys/riscv/riscv/support.S =================================================================== --- head/sys/riscv/riscv/support.S +++ head/sys/riscv/riscv/support.S @@ -202,48 +202,6 @@ EEND(suword64) END(suword) -/* - * fuswintr and suswintr are just like fusword and susword except that if - * the page is not in memory or would cause a trap, then we return an error. - * The important thing is to prevent sleep() and switch(). - */ - -/* - * Special handler so the trap code knows not to sleep. - */ -ENTRY(fsu_intr_fault) - SET_FAULT_HANDLER(x0, a1) /* Reset the handler function */ - li a0, -1 - ret -END(fsu_fault) - -/* - * int fuswintr(void *) - */ -ENTRY(fuswintr) - li a1, (VM_MAXUSER_ADDRESS-3) - bgt a0, a1, fsu_fault_nopcb - la a6, fsu_intr_fault /* Load the fault handler */ - SET_FAULT_HANDLER(a6, a1) /* And set it */ - lw a0, 0(a0) /* Try loading the data */ - SET_FAULT_HANDLER(x0, x1) /* Reset the fault handler */ - ret /* Return */ -END(fuswintr) - -/* - * int suswintr(void *base, int word) - */ -ENTRY(suswintr) - li a2, (VM_MAXUSER_ADDRESS-3) - bgt a0, a2, fsu_fault_nopcb - la a6, fsu_intr_fault /* Load the fault handler */ - SET_FAULT_HANDLER(a6, a2) /* And set it */ - sw a1, 0(a0) /* Try storing the data */ - SET_FAULT_HANDLER(x0, a2) /* Reset the fault handler */ - li a0, 0 /* Success */ - ret /* Return */ -END(suswintr) - ENTRY(setjmp) /* Store the stack pointer */ sd sp, 0(a0) Index: head/sys/riscv/riscv/trap.c =================================================================== --- head/sys/riscv/riscv/trap.c +++ head/sys/riscv/riscv/trap.c @@ -186,16 +186,6 @@ td = curthread; pcb = td->td_pcb; - - /* - * Special case for fuswintr and suswintr. These can't sleep so - * handle them early on in the trap handler. - */ - if (__predict_false(pcb->pcb_onfault == (vm_offset_t)&fsu_intr_fault)) { - frame->tf_sepc = pcb->pcb_onfault; - return; - } - sbadaddr = frame->tf_sbadaddr; p = td->td_proc; Index: head/sys/sparc64/sparc64/support.S =================================================================== --- head/sys/sparc64/sparc64/support.S +++ head/sys/sparc64/sparc64/support.S @@ -487,31 +487,6 @@ clr %o0 END(suword64) - .globl fs_nofault_intr_begin -fs_nofault_intr_begin: - nop - -/* - * int fuswintr(const void *base) - */ -ENTRY(fuswintr) - retl - lduha [%o0] ASI_AIUP, %o0 -END(fuswintr) - -/* - * int suswintr(const void *base, int word) - */ -ENTRY(suswintr) - stha %o1, [%o0] ASI_AIUP - retl - clr %o0 -END(suswintr) - - .globl fs_nofault_intr_end -fs_nofault_intr_end: - nop - .globl fs_nofault_end fs_nofault_end: nop Index: head/sys/sys/resourcevar.h =================================================================== --- head/sys/sys/resourcevar.h +++ head/sys/sys/resourcevar.h @@ -128,7 +128,6 @@ rlim_t maxval); int chgptscnt(struct uidinfo *uip, int diff, rlim_t maxval); int chgumtxcnt(struct uidinfo *uip, int diff, rlim_t maxval); -int fuswintr(void *base); int kern_proc_setrlimit(struct thread *td, struct proc *p, u_int which, struct rlimit *limp); struct plimit @@ -152,7 +151,6 @@ struct timeval *sp); void rufetchtd(struct thread *td, struct rusage *ru); void ruxagg(struct proc *p, struct thread *td); -int suswintr(void *base, int word); struct uidinfo *uifind(uid_t uid); void uifree(struct uidinfo *uip);