Date: Mon, 30 Aug 2021 12:15:13 GMT From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: b792434150d6 - main - Create sys/reg.h for the common code previously in machine/reg.h Message-ID: <202108301215.17UCFDC7095432@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b792434150d66b9b2356fb9a7548f4c7f0a0f16c commit b792434150d66b9b2356fb9a7548f4c7f0a0f16c Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2021-08-27 09:38:40 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2021-08-30 11:50:53 +0000 Create sys/reg.h for the common code previously in machine/reg.h Move the common kernel function signatures from machine/reg.h to a new sys/reg.h. This is in preperation for adding PT_GETREGSET to ptrace(2). Reviewed by: imp, markj Sponsored by: DARPA, AFRL (original work) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19830 --- sys/amd64/amd64/db_trace.c | 2 +- sys/amd64/amd64/gdb_machdep.c | 2 +- sys/amd64/amd64/machdep.c | 2 +- sys/amd64/ia32/ia32_reg.c | 1 + sys/amd64/include/db_machdep.h | 1 - sys/amd64/linux/linux_ptrace.c | 1 - sys/amd64/linux32/linux32_machdep.c | 2 +- sys/amd64/vmm/amd/svm.c | 2 +- sys/amd64/vmm/intel/vmx.c | 2 +- sys/arm/arm/debug_monitor.c | 2 +- sys/arm/arm/machdep_kdb.c | 2 +- sys/arm/include/reg.h | 9 --- sys/arm64/arm64/machdep.c | 2 +- sys/arm64/include/reg.h | 20 ------- sys/arm64/linux/linux_machdep.c | 3 +- .../opensolaris/uts/intel/dtrace/fasttrap_isa.c | 2 +- sys/cddl/dev/dtrace/aarch64/dtrace_isa.c | 1 - sys/cddl/dev/dtrace/amd64/dtrace_isa.c | 1 - sys/cddl/dev/dtrace/arm/dtrace_isa.c | 1 - sys/cddl/dev/dtrace/mips/dtrace_isa.c | 1 - sys/cddl/dev/dtrace/powerpc/dtrace_isa.c | 1 - sys/cddl/dev/dtrace/riscv/dtrace_isa.c | 1 - sys/compat/linux/linux_elf.c | 1 + sys/ddb/db_run.c | 1 + sys/fs/procfs/procfs_dbregs.c | 2 - sys/fs/procfs/procfs_fpregs.c | 2 - sys/fs/procfs/procfs_regs.c | 2 - sys/i386/i386/db_trace.c | 2 +- sys/i386/i386/gdb_machdep.c | 2 +- sys/i386/i386/machdep.c | 2 +- sys/i386/include/db_machdep.h | 1 - sys/i386/linux/linux_ptrace.c | 1 - sys/kern/imgact_elf.c | 1 + sys/kern/kern_exec.c | 3 +- sys/kern/sys_process.c | 3 +- sys/mips/include/md_var.h | 2 +- sys/mips/include/reg.h | 16 ----- sys/mips/mips/freebsd32_machdep.c | 2 +- sys/mips/mips/gdb_machdep.c | 1 - sys/mips/mips/machdep.c | 1 + sys/mips/mips/pm_machdep.c | 2 +- sys/mips/nlm/cms.c | 1 - sys/mips/nlm/dev/net/xlpge.c | 1 - sys/powerpc/aim/aim_machdep.c | 1 - sys/powerpc/booke/booke_machdep.c | 1 - sys/powerpc/fpu/fpu_add.c | 1 - sys/powerpc/fpu/fpu_compare.c | 1 - sys/powerpc/fpu/fpu_div.c | 1 - sys/powerpc/fpu/fpu_emu.c | 1 - sys/powerpc/fpu/fpu_implode.c | 1 - sys/powerpc/fpu/fpu_mul.c | 1 - sys/powerpc/fpu/fpu_sqrt.c | 1 - sys/powerpc/fpu/fpu_subr.c | 1 - sys/powerpc/powerpc/elf32_machdep.c | 2 +- sys/powerpc/powerpc/exec_machdep.c | 2 +- sys/powerpc/powerpc/gdb_machdep.c | 1 - sys/powerpc/powerpc/machdep.c | 2 +- sys/riscv/include/reg.h | 12 ---- sys/riscv/riscv/machdep.c | 2 +- sys/sys/reg.h | 68 ++++++++++++++++++++++ sys/x86/include/reg.h | 16 ----- sys/x86/x86/dbreg.c | 1 + 62 files changed, 97 insertions(+), 129 deletions(-) diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c index d2682afec8b0..90fcce5732d1 100644 --- a/sys/amd64/amd64/db_trace.c +++ b/sys/amd64/amd64/db_trace.c @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/kdb.h> #include <sys/proc.h> +#include <sys/reg.h> #include <sys/smp.h> #include <sys/stack.h> #include <sys/sysent.h> @@ -38,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include <machine/cpu.h> #include <machine/md_var.h> #include <machine/pcb.h> -#include <machine/reg.h> #include <machine/stack.h> #include <vm/vm.h> diff --git a/sys/amd64/amd64/gdb_machdep.c b/sys/amd64/amd64/gdb_machdep.c index 176c770a3731..b5acce216fe6 100644 --- a/sys/amd64/amd64/gdb_machdep.c +++ b/sys/amd64/amd64/gdb_machdep.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include <sys/kdb.h> #include <sys/kernel.h> #include <sys/proc.h> +#include <sys/reg.h> #include <sys/signal.h> #include <machine/cpufunc.h> @@ -42,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include <machine/md_var.h> #include <machine/pcb.h> #include <machine/psl.h> -#include <machine/reg.h> #include <machine/specialreg.h> #include <machine/trap.h> #include <machine/frame.h> diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index e49dcaa576e8..eaf592c9b947 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); #include <sys/pcpu.h> #include <sys/ptrace.h> #include <sys/reboot.h> +#include <sys/reg.h> #include <sys/rwlock.h> #include <sys/sched.h> #include <sys/signalvar.h> @@ -129,7 +130,6 @@ __FBSDID("$FreeBSD$"); #include <machine/pc/bios.h> #include <machine/pcb.h> #include <machine/proc.h> -#include <machine/reg.h> #include <machine/sigframe.h> #include <machine/specialreg.h> #include <machine/trap.h> diff --git a/sys/amd64/ia32/ia32_reg.c b/sys/amd64/ia32/ia32_reg.c index 0725936cf84d..ae041a325cba 100644 --- a/sys/amd64/ia32/ia32_reg.c +++ b/sys/amd64/ia32/ia32_reg.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include <sys/namei.h> #include <sys/proc.h> #include <sys/procfs.h> +#include <sys/reg.h> #include <sys/resourcevar.h> #include <sys/systm.h> #include <sys/signalvar.h> diff --git a/sys/amd64/include/db_machdep.h b/sys/amd64/include/db_machdep.h index c88c281ff9a6..102475f660a4 100644 --- a/sys/amd64/include/db_machdep.h +++ b/sys/amd64/include/db_machdep.h @@ -30,7 +30,6 @@ #define _MACHINE_DB_MACHDEP_H_ #include <machine/frame.h> -#include <machine/reg.h> #include <machine/trap.h> typedef vm_offset_t db_addr_t; /* address - unsigned */ diff --git a/sys/amd64/linux/linux_ptrace.c b/sys/amd64/linux/linux_ptrace.c index 9386ba1e6ae3..3afaded3a203 100644 --- a/sys/amd64/linux/linux_ptrace.c +++ b/sys/amd64/linux/linux_ptrace.c @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include <sys/syscallsubr.h> #include <machine/pcb.h> -#include <machine/reg.h> #include <amd64/linux/linux.h> #include <amd64/linux/linux_proto.h> diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index 3a32d1eadb37..5801fac7f126 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mutex.h> #include <sys/priv.h> #include <sys/proc.h> +#include <sys/reg.h> #include <sys/resource.h> #include <sys/resourcevar.h> #include <sys/syscallsubr.h> @@ -61,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include <machine/md_var.h> #include <machine/pcb.h> #include <machine/psl.h> -#include <machine/reg.h> #include <machine/segments.h> #include <machine/specialreg.h> #include <x86/ifunc.h> diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c index 0348c3335409..fbf11ec84084 100644 --- a/sys/amd64/vmm/amd/svm.c +++ b/sys/amd64/vmm/amd/svm.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <sys/pcpu.h> #include <sys/proc.h> +#include <sys/reg.h> #include <sys/smr.h> #include <sys/sysctl.h> @@ -47,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include <machine/cpufunc.h> #include <machine/psl.h> #include <machine/md_var.h> -#include <machine/reg.h> #include <machine/specialreg.h> #include <machine/smp.h> #include <machine/vmm.h> diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index 7017e4b9077c..e7ced1b2c3fa 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <sys/pcpu.h> #include <sys/proc.h> +#include <sys/reg.h> #include <sys/smr.h> #include <sys/sysctl.h> @@ -50,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include <machine/psl.h> #include <machine/cpufunc.h> #include <machine/md_var.h> -#include <machine/reg.h> #include <machine/segments.h> #include <machine/smp.h> #include <machine/specialreg.h> diff --git a/sys/arm/arm/debug_monitor.c b/sys/arm/arm/debug_monitor.c index 55b5f70b2397..b73249bedcf1 100644 --- a/sys/arm/arm/debug_monitor.c +++ b/sys/arm/arm/debug_monitor.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include <sys/types.h> #include <sys/kdb.h> #include <sys/pcpu.h> +#include <sys/reg.h> #include <sys/smp.h> #include <sys/systm.h> @@ -44,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include <machine/debug_monitor.h> #include <machine/kdb.h> #include <machine/pcb.h> -#include <machine/reg.h> #include <ddb/ddb.h> #include <ddb/db_access.h> diff --git a/sys/arm/arm/machdep_kdb.c b/sys/arm/arm/machdep_kdb.c index 4dedb72edb22..b1f04c0832a1 100644 --- a/sys/arm/arm/machdep_kdb.c +++ b/sys/arm/arm/machdep_kdb.c @@ -35,10 +35,10 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/proc.h> +#include <sys/reg.h> #include <sys/systm.h> #include <machine/cpu.h> -#include <machine/reg.h> #ifdef DDB #include <ddb/ddb.h> diff --git a/sys/arm/include/reg.h b/sys/arm/include/reg.h index ab70ae128d39..8aee07c9b480 100644 --- a/sys/arm/include/reg.h +++ b/sys/arm/include/reg.h @@ -30,13 +30,4 @@ struct dbreg { 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 */ diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index bce3baf8e1ec..ee6f5157f5f3 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include <sys/proc.h> #include <sys/ptrace.h> #include <sys/reboot.h> +#include <sys/reg.h> #include <sys/rwlock.h> #include <sys/sched.h> #include <sys/signalvar.h> @@ -82,7 +83,6 @@ __FBSDID("$FreeBSD$"); #include <machine/metadata.h> #include <machine/md_var.h> #include <machine/pcb.h> -#include <machine/reg.h> #include <machine/undefined.h> #include <machine/vmparam.h> diff --git a/sys/arm64/include/reg.h b/sys/arm64/include/reg.h index 9cfc5ea1d437..d7c3354bfd2f 100644 --- a/sys/arm64/include/reg.h +++ b/sys/arm64/include/reg.h @@ -83,24 +83,4 @@ struct dbreg32 { #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_ */ diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c index 9ccda3c3d299..fae5bd11653b 100644 --- a/sys/arm64/linux/linux_machdep.c +++ b/sys/arm64/linux/linux_machdep.c @@ -36,12 +36,11 @@ __FBSDID("$FreeBSD$"); #include <sys/imgact.h> #include <sys/ktr.h> #include <sys/proc.h> +#include <sys/reg.h> #include <sys/sdt.h> #include <security/audit/audit.h> -#include <machine/reg.h> - #include <arm64/linux/linux.h> #include <arm64/linux/linux_proto.h> #include <compat/linux/linux_dtrace.h> diff --git a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c index 502273b73157..f92070d8088d 100644 --- a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c +++ b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c @@ -36,11 +36,11 @@ #include <sys/types.h> #include <sys/dtrace_bsd.h> #include <sys/proc.h> +#include <sys/reg.h> #include <sys/rmlock.h> #include <cddl/dev/dtrace/dtrace_cddl.h> #include <cddl/dev/dtrace/x86/regset.h> #include <machine/segments.h> -#include <machine/reg.h> #include <machine/pcb.h> #include <machine/trap.h> #include <sys/sysmacros.h> diff --git a/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c b/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c index 033258e34062..b26b15a58070 100644 --- a/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c @@ -35,7 +35,6 @@ #include <machine/frame.h> #include <machine/md_var.h> -#include <machine/reg.h> #include <vm/vm.h> #include <vm/vm_param.h> diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c index 07a4103bd716..71b448a99c1c 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c @@ -35,7 +35,6 @@ #include <machine/frame.h> #include <machine/md_var.h> -#include <machine/reg.h> #include <machine/stack.h> #include <x86/ifunc.h> diff --git a/sys/cddl/dev/dtrace/arm/dtrace_isa.c b/sys/cddl/dev/dtrace/arm/dtrace_isa.c index 9bac37669a84..ede352e6b873 100644 --- a/sys/cddl/dev/dtrace/arm/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/arm/dtrace_isa.c @@ -35,7 +35,6 @@ #include <machine/frame.h> #include <machine/md_var.h> -#include <machine/reg.h> #include <vm/vm.h> #include <vm/vm_param.h> diff --git a/sys/cddl/dev/dtrace/mips/dtrace_isa.c b/sys/cddl/dev/dtrace/mips/dtrace_isa.c index c09225c734b9..8d65012dadf0 100644 --- a/sys/cddl/dev/dtrace/mips/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/mips/dtrace_isa.c @@ -35,7 +35,6 @@ #include <machine/frame.h> #include <machine/md_var.h> -#include <machine/reg.h> #include <vm/vm.h> #include <vm/vm_param.h> diff --git a/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c b/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c index a188eafa777d..cce1c907b5d8 100644 --- a/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c @@ -39,7 +39,6 @@ #include <machine/frame.h> #include <machine/md_var.h> #include <machine/psl.h> -#include <machine/reg.h> #include <machine/stack.h> #include <vm/vm.h> diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_isa.c b/sys/cddl/dev/dtrace/riscv/dtrace_isa.c index f8663b5bfeab..d42299abcd35 100644 --- a/sys/cddl/dev/dtrace/riscv/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/riscv/dtrace_isa.c @@ -37,7 +37,6 @@ #include <machine/frame.h> #include <machine/md_var.h> -#include <machine/reg.h> #include <vm/vm.h> #include <vm/vm_param.h> diff --git a/sys/compat/linux/linux_elf.c b/sys/compat/linux/linux_elf.c index 077e0c93c884..9192388b347a 100644 --- a/sys/compat/linux/linux_elf.c +++ b/sys/compat/linux/linux_elf.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include <sys/proc.h> #include <sys/procfs.h> #include <sys/ptrace.h> +#include <sys/reg.h> #include <sys/sbuf.h> #include <sys/sysent.h> #include <sys/user.h> diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c index af99eb757609..c9ea87fca79c 100644 --- a/sys/ddb/db_run.c +++ b/sys/ddb/db_run.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/kdb.h> #include <sys/proc.h> +#include <sys/reg.h> #include <sys/systm.h> #include <machine/kdb.h> diff --git a/sys/fs/procfs/procfs_dbregs.c b/sys/fs/procfs/procfs_dbregs.c index 8d2206d2995c..acc0f7f8c5ac 100644 --- a/sys/fs/procfs/procfs_dbregs.c +++ b/sys/fs/procfs/procfs_dbregs.c @@ -54,8 +54,6 @@ #include <sys/sysent.h> #include <sys/uio.h> -#include <machine/reg.h> - #include <fs/pseudofs/pseudofs.h> #include <fs/procfs/procfs.h> diff --git a/sys/fs/procfs/procfs_fpregs.c b/sys/fs/procfs/procfs_fpregs.c index 9675030df3c0..1118eb68dcbc 100644 --- a/sys/fs/procfs/procfs_fpregs.c +++ b/sys/fs/procfs/procfs_fpregs.c @@ -48,8 +48,6 @@ #include <sys/sysent.h> #include <sys/uio.h> -#include <machine/reg.h> - #include <fs/pseudofs/pseudofs.h> #include <fs/procfs/procfs.h> diff --git a/sys/fs/procfs/procfs_regs.c b/sys/fs/procfs/procfs_regs.c index 032141a9e32e..703dad64a182 100644 --- a/sys/fs/procfs/procfs_regs.c +++ b/sys/fs/procfs/procfs_regs.c @@ -48,8 +48,6 @@ #include <sys/sysent.h> #include <sys/uio.h> -#include <machine/reg.h> - #include <fs/pseudofs/pseudofs.h> #include <fs/procfs/procfs.h> diff --git a/sys/i386/i386/db_trace.c b/sys/i386/i386/db_trace.c index 80ef0fe715d8..529b94b76cc4 100644 --- a/sys/i386/i386/db_trace.c +++ b/sys/i386/i386/db_trace.c @@ -31,13 +31,13 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/kdb.h> #include <sys/proc.h> +#include <sys/reg.h> #include <sys/sysent.h> #include <machine/cpu.h> #include <machine/frame.h> #include <machine/md_var.h> #include <machine/pcb.h> -#include <machine/reg.h> #include <machine/stack.h> #include <vm/vm.h> diff --git a/sys/i386/i386/gdb_machdep.c b/sys/i386/i386/gdb_machdep.c index 549c6de7ba1b..766f38f181f8 100644 --- a/sys/i386/i386/gdb_machdep.c +++ b/sys/i386/i386/gdb_machdep.c @@ -34,13 +34,13 @@ __FBSDID("$FreeBSD$"); #include <sys/kdb.h> #include <sys/kernel.h> #include <sys/proc.h> +#include <sys/reg.h> #include <sys/signal.h> #include <machine/endian.h> #include <machine/frame.h> #include <machine/gdb_machdep.h> #include <machine/pcb.h> -#include <machine/reg.h> #include <machine/trap.h> #include <gdb/gdb.h> diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 869ee9958d25..1366939cda6e 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$"); #include <sys/pcpu.h> #include <sys/ptrace.h> #include <sys/reboot.h> +#include <sys/reg.h> #include <sys/rwlock.h> #include <sys/sched.h> #include <sys/signalvar.h> @@ -129,7 +130,6 @@ __FBSDID("$FreeBSD$"); #include <machine/pcb.h> #include <machine/pcb_ext.h> #include <machine/proc.h> -#include <machine/reg.h> #include <machine/sigframe.h> #include <machine/specialreg.h> #include <machine/sysarch.h> diff --git a/sys/i386/include/db_machdep.h b/sys/i386/include/db_machdep.h index 42f0f19d29a9..83daab106b82 100644 --- a/sys/i386/include/db_machdep.h +++ b/sys/i386/include/db_machdep.h @@ -30,7 +30,6 @@ #define _MACHINE_DB_MACHDEP_H_ #include <machine/frame.h> -#include <machine/reg.h> #include <machine/trap.h> typedef vm_offset_t db_addr_t; /* address - unsigned */ diff --git a/sys/i386/linux/linux_ptrace.c b/sys/i386/linux/linux_ptrace.c index 0c93d0266b87..d9e0ed50c750 100644 --- a/sys/i386/linux/linux_ptrace.c +++ b/sys/i386/linux/linux_ptrace.c @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include <machine/md_var.h> #include <machine/pcb.h> -#include <machine/reg.h> #include <i386/linux/linux.h> #include <i386/linux/linux_proto.h> diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index ac0427a74818..5b888766daea 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include <sys/procfs.h> #include <sys/ptrace.h> #include <sys/racct.h> +#include <sys/reg.h> #include <sys/resourcevar.h> #include <sys/rwlock.h> #include <sys/sbuf.h> diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index e6564ae48ced..b6959dc18f50 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include <sys/priv.h> #include <sys/proc.h> #include <sys/ptrace.h> +#include <sys/reg.h> #include <sys/resourcevar.h> #include <sys/rwlock.h> #include <sys/sched.h> @@ -91,8 +92,6 @@ __FBSDID("$FreeBSD$"); #include <sys/pmckern.h> #endif -#include <machine/reg.h> - #include <security/audit/audit.h> #include <security/mac/mac_framework.h> diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index b56c33203906..1b97424c58ca 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include <sys/limits.h> #include <sys/lock.h> #include <sys/mutex.h> +#include <sys/reg.h> #include <sys/syscallsubr.h> #include <sys/sysent.h> #include <sys/sysproto.h> @@ -54,8 +55,6 @@ __FBSDID("$FreeBSD$"); #include <sys/caprights.h> #include <sys/filedesc.h> -#include <machine/reg.h> - #include <security/audit/audit.h> #include <vm/vm.h> diff --git a/sys/mips/include/md_var.h b/sys/mips/include/md_var.h index 8462b1beb22e..b322c4d6323a 100644 --- a/sys/mips/include/md_var.h +++ b/sys/mips/include/md_var.h @@ -36,7 +36,7 @@ #ifndef _MACHINE_MD_VAR_H_ #define _MACHINE_MD_VAR_H_ -#include <machine/reg.h> +#include <machine/regnum.h> /* * Miscellaneous machine-dependent declarations. diff --git a/sys/mips/include/reg.h b/sys/mips/include/reg.h index a1f5aa4da23c..440b791bffc7 100644 --- a/sys/mips/include/reg.h +++ b/sys/mips/include/reg.h @@ -85,23 +85,7 @@ struct dbreg32 { #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 diff --git a/sys/mips/mips/freebsd32_machdep.c b/sys/mips/mips/freebsd32_machdep.c index e30753e7a59c..eb5f82c572ce 100644 --- a/sys/mips/mips/freebsd32_machdep.c +++ b/sys/mips/mips/freebsd32_machdep.c @@ -48,6 +48,7 @@ #include <sys/fcntl.h> #include <sys/sysent.h> #include <sys/imgact_elf.h> +#include <sys/reg.h> #include <sys/syscall.h> #include <sys/syscallsubr.h> #include <sys/sysproto.h> @@ -60,7 +61,6 @@ #include <machine/cpuinfo.h> #include <machine/md_var.h> -#include <machine/reg.h> #include <machine/sigframe.h> #include <machine/sysarch.h> #include <machine/tls.h> diff --git a/sys/mips/mips/gdb_machdep.c b/sys/mips/mips/gdb_machdep.c index 130a78f9eb87..4b999613d7f6 100644 --- a/sys/mips/mips/gdb_machdep.c +++ b/sys/mips/mips/gdb_machdep.c @@ -101,7 +101,6 @@ #include <machine/gdb_machdep.h> #include <machine/pcb.h> -#include <machine/reg.h> #include <machine/trap.h> #include <gdb/gdb.h> diff --git a/sys/mips/mips/machdep.c b/sys/mips/mips/machdep.c index fd0f83e5df98..ec0f3f31c254 100644 --- a/sys/mips/mips/machdep.c +++ b/sys/mips/mips/machdep.c @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mbuf.h> #include <sys/msgbuf.h> #include <sys/reboot.h> +#include <sys/reg.h> #include <sys/rwlock.h> #include <sys/sched.h> #include <sys/sysctl.h> diff --git a/sys/mips/mips/pm_machdep.c b/sys/mips/mips/pm_machdep.c index 8d8cf4e1023d..7a9db29b6ff6 100644 --- a/sys/mips/mips/pm_machdep.c +++ b/sys/mips/mips/pm_machdep.c @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/sysent.h> #include <sys/proc.h> +#include <sys/reg.h> #include <sys/signalvar.h> #include <sys/exec.h> #include <sys/ktr.h> @@ -62,7 +63,6 @@ __FBSDID("$FreeBSD$"); #include <sys/uio.h> #include <machine/abi.h> #include <machine/cpuinfo.h> -#include <machine/reg.h> #include <machine/md_var.h> #include <machine/sigframe.h> #include <machine/tls.h> diff --git a/sys/mips/nlm/cms.c b/sys/mips/nlm/cms.c index 32ee6e1c9546..4b6ad7c95db4 100644 --- a/sys/mips/nlm/cms.c +++ b/sys/mips/nlm/cms.c @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include <sys/sysctl.h> #include <sys/malloc.h> -#include <machine/reg.h> #include <machine/cpu.h> #include <machine/hwfunc.h> #include <machine/mips_opcode.h> diff --git a/sys/mips/nlm/dev/net/xlpge.c b/sys/mips/nlm/dev/net/xlpge.c index e9dadf83c7eb..20fe16048212 100644 --- a/sys/mips/nlm/dev/net/xlpge.c +++ b/sys/mips/nlm/dev/net/xlpge.c @@ -69,7 +69,6 @@ __FBSDID("$FreeBSD$"); #include <vm/pmap.h> #include <vm/uma.h> -#include <machine/reg.h> #include <machine/cpu.h> #include <machine/mips_opcode.h> #include <machine/asm.h> diff --git a/sys/powerpc/aim/aim_machdep.c b/sys/powerpc/aim/aim_machdep.c index 784207e9a70d..d582489d9f7e 100644 --- a/sys/powerpc/aim/aim_machdep.c +++ b/sys/powerpc/aim/aim_machdep.c @@ -118,7 +118,6 @@ __FBSDID("$FreeBSD$"); #include <machine/metadata.h> #include <machine/mmuvar.h> #include <machine/pcb.h> -#include <machine/reg.h> #include <machine/sigframe.h> #include <machine/spr.h> #include <machine/trap.h> diff --git a/sys/powerpc/booke/booke_machdep.c b/sys/powerpc/booke/booke_machdep.c index 09396d854045..5db1a17fc243 100644 --- a/sys/powerpc/booke/booke_machdep.c +++ b/sys/powerpc/booke/booke_machdep.c @@ -122,7 +122,6 @@ __FBSDID("$FreeBSD$"); #include <machine/cpu.h> #include <machine/kdb.h> -#include <machine/reg.h> #include <machine/vmparam.h> #include <machine/spr.h> #include <machine/hid.h> diff --git a/sys/powerpc/fpu/fpu_add.c b/sys/powerpc/fpu/fpu_add.c index 6dd594ca0ec9..fdab0d8872ab 100644 --- a/sys/powerpc/fpu/fpu_add.c +++ b/sys/powerpc/fpu/fpu_add.c @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include <machine/fpu.h> #include <machine/ieeefp.h> -#include <machine/reg.h> #include <powerpc/fpu/fpu_arith.h> #include <powerpc/fpu/fpu_emu.h> diff --git a/sys/powerpc/fpu/fpu_compare.c b/sys/powerpc/fpu/fpu_compare.c index 48d7c488ce8a..633d32dcc717 100644 --- a/sys/powerpc/fpu/fpu_compare.c +++ b/sys/powerpc/fpu/fpu_compare.c @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <machine/fpu.h> -#include <machine/reg.h> #include <powerpc/fpu/fpu_arith.h> #include <powerpc/fpu/fpu_emu.h> diff --git a/sys/powerpc/fpu/fpu_div.c b/sys/powerpc/fpu/fpu_div.c index 5b625f640f13..7536d4aaa69e 100644 --- a/sys/powerpc/fpu/fpu_div.c +++ b/sys/powerpc/fpu/fpu_div.c @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <machine/fpu.h> -#include <machine/reg.h> #include <powerpc/fpu/fpu_arith.h> #include <powerpc/fpu/fpu_emu.h> diff --git a/sys/powerpc/fpu/fpu_emu.c b/sys/powerpc/fpu/fpu_emu.c index 6c1b91fb9725..c8c1f0b4b7ee 100644 --- a/sys/powerpc/fpu/fpu_emu.c +++ b/sys/powerpc/fpu/fpu_emu.c @@ -93,7 +93,6 @@ __FBSDID("$FreeBSD$"); #include <sys/signalvar.h> #include <machine/fpu.h> -#include <machine/reg.h> #include <powerpc/fpu/fpu_emu.h> #include <powerpc/fpu/fpu_extern.h> diff --git a/sys/powerpc/fpu/fpu_implode.c b/sys/powerpc/fpu/fpu_implode.c index 69a58bf79315..8ccf4b2f8243 100644 --- a/sys/powerpc/fpu/fpu_implode.c +++ b/sys/powerpc/fpu/fpu_implode.c @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include <machine/fpu.h> #include <machine/ieee.h> #include <machine/ieeefp.h> -#include <machine/reg.h> #include <powerpc/fpu/fpu_arith.h> #include <powerpc/fpu/fpu_emu.h> diff --git a/sys/powerpc/fpu/fpu_mul.c b/sys/powerpc/fpu/fpu_mul.c index 609b261492a4..336ddaee9607 100644 --- a/sys/powerpc/fpu/fpu_mul.c +++ b/sys/powerpc/fpu/fpu_mul.c @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <machine/fpu.h> -#include <machine/reg.h> #include <powerpc/fpu/fpu_arith.h> #include <powerpc/fpu/fpu_emu.h> diff --git a/sys/powerpc/fpu/fpu_sqrt.c b/sys/powerpc/fpu/fpu_sqrt.c index e1f5bec9006f..5a95d7eae115 100644 --- a/sys/powerpc/fpu/fpu_sqrt.c +++ b/sys/powerpc/fpu/fpu_sqrt.c @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <machine/fpu.h> -#include <machine/reg.h> #include <powerpc/fpu/fpu_arith.h> #include <powerpc/fpu/fpu_emu.h> diff --git a/sys/powerpc/fpu/fpu_subr.c b/sys/powerpc/fpu/fpu_subr.c index fc817a7ee587..fbe1bc70aa5a 100644 --- a/sys/powerpc/fpu/fpu_subr.c +++ b/sys/powerpc/fpu/fpu_subr.c @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <machine/fpu.h> -#include <machine/reg.h> #include <powerpc/fpu/fpu_arith.h> #include <powerpc/fpu/fpu_emu.h> diff --git a/sys/powerpc/powerpc/elf32_machdep.c b/sys/powerpc/powerpc/elf32_machdep.c index 341352fdd589..a99aeb0a7444 100644 --- a/sys/powerpc/powerpc/elf32_machdep.c +++ b/sys/powerpc/powerpc/elf32_machdep.c @@ -42,6 +42,7 @@ #include <sys/sysent.h> #include <sys/imgact_elf.h> #include <sys/jail.h> +#include <sys/reg.h> #include <sys/smp.h> #include <sys/syscall.h> #include <sys/sysctl.h> @@ -56,7 +57,6 @@ #include <machine/cpu.h> #include <machine/fpu.h> #include <machine/elf.h> -#include <machine/reg.h> #include <machine/md_var.h> #include <powerpc/powerpc/elf_common.c> diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 869fad96e2bd..d90071f13650 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include <sys/lock.h> #include <sys/malloc.h> #include <sys/mutex.h> +#include <sys/reg.h> #include <sys/signalvar.h> #include <sys/syscallsubr.h> #include <sys/syscall.h> @@ -89,7 +90,6 @@ __FBSDID("$FreeBSD$"); #include <machine/elf.h> #include <machine/fpu.h> #include <machine/pcb.h> -#include <machine/reg.h> #include <machine/sigframe.h> #include <machine/trap.h> #include <machine/vmparam.h> diff --git a/sys/powerpc/powerpc/gdb_machdep.c b/sys/powerpc/powerpc/gdb_machdep.c index a7f1de512e31..e334bd46375c 100644 --- a/sys/powerpc/powerpc/gdb_machdep.c +++ b/sys/powerpc/powerpc/gdb_machdep.c @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include <machine/gdb_machdep.h> #include <machine/pcb.h> -#include <machine/reg.h> #include <machine/hid.h> #include <machine/spr.h> diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index f35469f4051c..622af17b3305 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mutex.h> #include <sys/ptrace.h> #include <sys/reboot.h> +#include <sys/reg.h> #include <sys/rwlock.h> #include <sys/signalvar.h> #include <sys/syscallsubr.h> @@ -119,7 +120,6 @@ __FBSDID("$FreeBSD$"); #include <machine/metadata.h> #include <machine/mmuvar.h> #include <machine/pcb.h> -#include <machine/reg.h> #include <machine/sigframe.h> #include <machine/spr.h> #include <machine/trap.h> diff --git a/sys/riscv/include/reg.h b/sys/riscv/include/reg.h index 9e94b4a5768d..003e696e30e3 100644 --- a/sys/riscv/include/reg.h +++ b/sys/riscv/include/reg.h @@ -58,16 +58,4 @@ struct dbreg { 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 *); *** 141 LINES SKIPPED ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108301215.17UCFDC7095432>