Index: sys/amd64/amd64/db_trace.c =================================================================== --- sys/amd64/amd64/db_trace.c +++ sys/amd64/amd64/db_trace.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -38,7 +39,6 @@ #include #include #include -#include #include #include Index: sys/amd64/amd64/machdep.c =================================================================== --- sys/amd64/amd64/machdep.c +++ sys/amd64/amd64/machdep.c @@ -80,6 +80,7 @@ #include #include #include +#include #include #include #include @@ -125,7 +126,6 @@ #include #include #include -#include #include #include #include Index: sys/amd64/ia32/ia32_reg.c =================================================================== --- sys/amd64/ia32/ia32_reg.c +++ sys/amd64/ia32/ia32_reg.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include Index: sys/arm/arm/machdep_kdb.c =================================================================== --- sys/arm/arm/machdep_kdb.c +++ sys/arm/arm/machdep_kdb.c @@ -35,10 +35,10 @@ #include #include +#include #include #include -#include #ifdef DDB #include Index: sys/arm/include/reg.h =================================================================== --- sys/arm/include/reg.h +++ sys/arm/include/reg.h @@ -30,13 +30,4 @@ unsigned int dbg_wvr[ARM_WR_MAX]; /* Watchpoint Value Registers */ }; -#ifdef _KERNEL -int fill_regs(struct thread *, struct reg *); -int set_regs(struct thread *, struct reg *); -int fill_fpregs(struct thread *, struct fpreg *); -int set_fpregs(struct thread *, struct fpreg *); -int fill_dbregs(struct thread *, struct dbreg *); -int set_dbregs(struct thread *, struct dbreg *); -#endif - #endif /* !MACHINE_REG_H */ Index: sys/arm64/arm64/machdep.c =================================================================== --- sys/arm64/arm64/machdep.c +++ sys/arm64/arm64/machdep.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -76,7 +77,6 @@ #include #include #include -#include #include #include Index: sys/arm64/include/reg.h =================================================================== --- sys/arm64/include/reg.h +++ sys/arm64/include/reg.h @@ -69,24 +69,4 @@ #define __HAVE_REG32 -#ifdef _KERNEL -/* - * XXX these interfaces are MI, so they should be declared in a MI place. - */ -int fill_regs(struct thread *, struct reg *); -int set_regs(struct thread *, struct reg *); -int fill_fpregs(struct thread *, struct fpreg *); -int set_fpregs(struct thread *, struct fpreg *); -int fill_dbregs(struct thread *, struct dbreg *); -int set_dbregs(struct thread *, struct dbreg *); -#ifdef COMPAT_FREEBSD32 -int fill_regs32(struct thread *, struct reg32 *); -int set_regs32(struct thread *, struct reg32 *); -int fill_fpregs32(struct thread *, struct fpreg32 *); -int set_fpregs32(struct thread *, struct fpreg32 *); -int fill_dbregs32(struct thread *, struct dbreg32 *); -int set_dbregs32(struct thread *, struct dbreg32 *); -#endif -#endif - #endif /* !_MACHINE_REG_H_ */ Index: sys/i386/i386/db_trace.c =================================================================== --- sys/i386/i386/db_trace.c +++ sys/i386/i386/db_trace.c @@ -31,13 +31,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include Index: sys/i386/i386/machdep.c =================================================================== --- sys/i386/i386/machdep.c +++ sys/i386/i386/machdep.c @@ -82,6 +82,7 @@ #include #include #include +#include #include #include #include @@ -128,7 +129,6 @@ #include #include #include -#include #include #include #include Index: sys/kern/kern_exec.c =================================================================== --- sys/kern/kern_exec.c +++ sys/kern/kern_exec.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -88,8 +89,6 @@ #include #endif -#include - #include #include Index: sys/kern/sys_process.c =================================================================== --- sys/kern/sys_process.c +++ sys/kern/sys_process.c @@ -50,8 +50,7 @@ #include #include #include - -#include +#include #include Index: sys/mips/include/md_var.h =================================================================== --- sys/mips/include/md_var.h +++ sys/mips/include/md_var.h @@ -36,7 +36,7 @@ #ifndef _MACHINE_MD_VAR_H_ #define _MACHINE_MD_VAR_H_ -#include +#include /* * Miscellaneous machine-dependent declarations. Index: sys/mips/include/reg.h =================================================================== --- sys/mips/include/reg.h +++ sys/mips/include/reg.h @@ -85,23 +85,9 @@ #define __HAVE_REG32 #endif -#ifdef _KERNEL -int fill_fpregs(struct thread *, struct fpreg *); -int fill_regs(struct thread *, struct reg *); -int set_fpregs(struct thread *, struct fpreg *); -int set_regs(struct thread *, struct reg *); -int fill_dbregs(struct thread *, struct dbreg *); -int set_dbregs(struct thread *, struct dbreg *); -#endif - #ifdef COMPAT_FREEBSD32 struct image_params; -int fill_regs32(struct thread *, struct reg32 *); -int set_regs32(struct thread *, struct reg32 *); -int fill_fpregs32(struct thread *, struct fpreg32 *); -int set_fpregs32(struct thread *, struct fpreg32 *); - #define fill_dbregs32(td, reg) 0 #define set_dbregs32(td, reg) 0 #endif Index: sys/mips/mips/freebsd32_machdep.c =================================================================== --- sys/mips/mips/freebsd32_machdep.c +++ sys/mips/mips/freebsd32_machdep.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -58,7 +59,6 @@ #include #include -#include #include #include #include Index: sys/mips/mips/machdep.c =================================================================== --- sys/mips/mips/machdep.c +++ sys/mips/mips/machdep.c @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include Index: sys/powerpc/include/reg.h =================================================================== --- sys/powerpc/include/reg.h +++ sys/powerpc/include/reg.h @@ -58,21 +58,10 @@ #endif #ifdef _KERNEL -/* - * XXX these interfaces are MI, so they should be declared in a MI place. - */ -int fill_regs(struct thread *, struct reg *); -int set_regs(struct thread *, struct reg *); -int fill_fpregs(struct thread *, struct fpreg *); -int set_fpregs(struct thread *, struct fpreg *); -int fill_dbregs(struct thread *, struct dbreg *); -int set_dbregs(struct thread *, struct dbreg *); #ifdef COMPAT_FREEBSD32 struct image_params; -int fill_regs32(struct thread *, struct reg32 *); -int set_regs32(struct thread *, struct reg32 *); void ppc32_setregs(struct thread *, struct image_params *, u_long); #define fill_fpregs32(td, reg) fill_fpregs(td,(struct fpreg *)reg) Index: sys/powerpc/powerpc/elf32_machdep.c =================================================================== --- sys/powerpc/powerpc/elf32_machdep.c +++ sys/powerpc/powerpc/elf32_machdep.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -54,7 +55,6 @@ #include #include #include -#include #include #ifdef __powerpc64__ Index: sys/powerpc/powerpc/exec_machdep.c =================================================================== --- sys/powerpc/powerpc/exec_machdep.c +++ sys/powerpc/powerpc/exec_machdep.c @@ -76,6 +76,7 @@ #include #include #include +#include #include #include #include @@ -89,7 +90,6 @@ #include #include #include -#include #include #include #include Index: sys/powerpc/powerpc/machdep.c =================================================================== --- sys/powerpc/powerpc/machdep.c +++ sys/powerpc/powerpc/machdep.c @@ -83,6 +83,7 @@ #include #include #include +#include #include #include #include @@ -117,7 +118,6 @@ #include #include #include -#include #include #include #include Index: sys/riscv/include/reg.h =================================================================== --- sys/riscv/include/reg.h +++ sys/riscv/include/reg.h @@ -58,16 +58,4 @@ int dummy; }; -#ifdef _KERNEL -/* - * XXX these interfaces are MI, so they should be declared in a MI place. - */ -int fill_regs(struct thread *, struct reg *); -int set_regs(struct thread *, struct reg *); -int fill_fpregs(struct thread *, struct fpreg *); -int set_fpregs(struct thread *, struct fpreg *); -int fill_dbregs(struct thread *, struct dbreg *); -int set_dbregs(struct thread *, struct dbreg *); -#endif - #endif /* !_MACHINE_REG_H_ */ Index: sys/riscv/riscv/machdep.c =================================================================== --- sys/riscv/riscv/machdep.c +++ sys/riscv/riscv/machdep.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -76,7 +77,6 @@ #include #include #include -#include #include #include #include Index: sys/sparc64/include/reg.h =================================================================== --- sys/sparc64/include/reg.h +++ sys/sparc64/include/reg.h @@ -106,16 +106,4 @@ */ #define __HAVE_REG32 -#ifdef _KERNEL -/* - * XXX these interfaces are MI, so they should be declared in a MI place. - */ -int fill_regs(struct thread *, struct reg *); -int set_regs(struct thread *, struct reg *); -int fill_fpregs(struct thread *, struct fpreg *); -int set_fpregs(struct thread *, struct fpreg *); -int fill_dbregs(struct thread *, struct dbreg *); -int set_dbregs(struct thread *, struct dbreg *); -#endif - #endif /* !_MACHINE_REG_H_ */ Index: sys/sparc64/sparc64/machdep.c =================================================================== --- sys/sparc64/sparc64/machdep.c +++ sys/sparc64/sparc64/machdep.c @@ -66,6 +66,7 @@ #include #include #include +#include #include #include #include @@ -105,7 +106,6 @@ #include #include #include -#include #include #include #include Index: sys/sys/ptrace.h =================================================================== --- sys/sys/ptrace.h +++ sys/sys/ptrace.h @@ -37,7 +37,7 @@ #include #include -#include +#include #define PT_TRACE_ME 0 /* child declares it's being traced */ #define PT_READ_I 1 /* read word in child's I space */ Index: sys/sys/reg.h =================================================================== --- /dev/null +++ sys/sys/reg.h @@ -0,0 +1,32 @@ + +#ifndef _SYS_REG_H_ +#define _SYS_REG_H_ + +#include + +#ifdef _KERNEL +int fill_regs(struct thread *, struct reg *); +int set_regs(struct thread *, struct reg *); +int fill_fpregs(struct thread *, struct fpreg *); +int set_fpregs(struct thread *, struct fpreg *); +int fill_dbregs(struct thread *, struct dbreg *); +int set_dbregs(struct thread *, struct dbreg *); +#ifdef COMPAT_FREEBSD32 +int fill_regs32(struct thread *, struct reg32 *); +int set_regs32(struct thread *, struct reg32 *); +#ifndef fill_fpregs32 +int fill_fpregs32(struct thread *, struct fpreg32 *); +#endif +#ifndef set_fpregs32 +int set_fpregs32(struct thread *, struct fpreg32 *); +#endif +#ifndef fill_dbregs32 +int fill_dbregs32(struct thread *, struct dbreg32 *); +#endif +#ifndef set_dbregs32 +int set_dbregs32(struct thread *, struct dbreg32 *); +#endif +#endif +#endif + +#endif Index: sys/x86/include/reg.h =================================================================== --- sys/x86/include/reg.h +++ sys/x86/include/reg.h @@ -249,21 +249,7 @@ /* * XXX these interfaces are MI, so they should be declared in a MI place. */ -int fill_regs(struct thread *, struct reg *); int fill_frame_regs(struct trapframe *, struct reg *); -int set_regs(struct thread *, struct reg *); -int fill_fpregs(struct thread *, struct fpreg *); -int set_fpregs(struct thread *, struct fpreg *); -int fill_dbregs(struct thread *, struct dbreg *); -int set_dbregs(struct thread *, struct dbreg *); -#ifdef COMPAT_FREEBSD32 -int fill_regs32(struct thread *, struct reg32 *); -int set_regs32(struct thread *, struct reg32 *); -int fill_fpregs32(struct thread *, struct fpreg32 *); -int set_fpregs32(struct thread *, struct fpreg32 *); -int fill_dbregs32(struct thread *, struct dbreg32 *); -int set_dbregs32(struct thread *, struct dbreg32 *); -#endif #endif #endif /* !_MACHINE_REG_H_ */