Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102083009
D19830.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
27 KB
Referenced Files
None
Subscribers
None
D19830.diff
View Options
diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c
--- a/sys/amd64/amd64/db_trace.c
+++ b/sys/amd64/amd64/db_trace.c
@@ -31,6 +31,7 @@
#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 @@
#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
--- a/sys/amd64/amd64/gdb_machdep.c
+++ b/sys/amd64/amd64/gdb_machdep.c
@@ -34,6 +34,7 @@
#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 @@
#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
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -83,6 +83,7 @@
#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 @@
#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
--- a/sys/amd64/ia32/ia32_reg.c
+++ b/sys/amd64/ia32/ia32_reg.c
@@ -43,6 +43,7 @@
#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
--- 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
--- a/sys/amd64/linux/linux_ptrace.c
+++ b/sys/amd64/linux/linux_ptrace.c
@@ -40,7 +40,6 @@
#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
--- a/sys/amd64/linux32/linux32_machdep.c
+++ b/sys/amd64/linux32/linux32_machdep.c
@@ -49,6 +49,7 @@
#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 @@
#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
--- a/sys/amd64/vmm/amd/svm.c
+++ b/sys/amd64/vmm/amd/svm.c
@@ -38,6 +38,7 @@
#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 @@
#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
--- a/sys/amd64/vmm/intel/vmx.c
+++ b/sys/amd64/vmm/intel/vmx.c
@@ -41,6 +41,7 @@
#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 @@
#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
--- a/sys/arm/arm/debug_monitor.c
+++ b/sys/arm/arm/debug_monitor.c
@@ -35,6 +35,7 @@
#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 @@
#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
--- a/sys/arm/arm/machdep_kdb.c
+++ b/sys/arm/arm/machdep_kdb.c
@@ -35,10 +35,10 @@
#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
--- a/sys/arm/include/reg.h
+++ b/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 */
diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -54,6 +54,7 @@
#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 @@
#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
--- a/sys/arm64/include/reg.h
+++ b/sys/arm64/include/reg.h
@@ -83,24 +83,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_ */
diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c
--- a/sys/arm64/linux/linux_machdep.c
+++ b/sys/arm64/linux/linux_machdep.c
@@ -36,12 +36,11 @@
#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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- a/sys/compat/linux/linux_elf.c
+++ b/sys/compat/linux/linux_elf.c
@@ -49,6 +49,7 @@
#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
--- a/sys/ddb/db_run.c
+++ b/sys/ddb/db_run.c
@@ -40,6 +40,7 @@
#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
--- 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
--- 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
--- 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
--- a/sys/i386/i386/db_trace.c
+++ b/sys/i386/i386/db_trace.c
@@ -31,13 +31,13 @@
#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
--- a/sys/i386/i386/gdb_machdep.c
+++ b/sys/i386/i386/gdb_machdep.c
@@ -34,13 +34,13 @@
#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
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -82,6 +82,7 @@
#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 @@
#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
--- 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
--- a/sys/i386/linux/linux_ptrace.c
+++ b/sys/i386/linux/linux_ptrace.c
@@ -41,7 +41,6 @@
#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
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -54,6 +54,7 @@
#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
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -56,6 +56,7 @@
#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 @@
#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
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -40,6 +40,7 @@
#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 @@
#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
--- 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
--- a/sys/mips/include/reg.h
+++ b/sys/mips/include/reg.h
@@ -85,23 +85,7 @@
#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
--- 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
--- 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
--- a/sys/mips/mips/machdep.c
+++ b/sys/mips/mips/machdep.c
@@ -60,6 +60,7 @@
#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
--- a/sys/mips/mips/pm_machdep.c
+++ b/sys/mips/mips/pm_machdep.c
@@ -44,6 +44,7 @@
#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 @@
#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
--- a/sys/mips/nlm/cms.c
+++ b/sys/mips/nlm/cms.c
@@ -51,7 +51,6 @@
#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
--- a/sys/mips/nlm/dev/net/xlpge.c
+++ b/sys/mips/nlm/dev/net/xlpge.c
@@ -69,7 +69,6 @@
#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
--- a/sys/powerpc/aim/aim_machdep.c
+++ b/sys/powerpc/aim/aim_machdep.c
@@ -118,7 +118,6 @@
#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
--- a/sys/powerpc/booke/booke_machdep.c
+++ b/sys/powerpc/booke/booke_machdep.c
@@ -122,7 +122,6 @@
#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
--- a/sys/powerpc/fpu/fpu_add.c
+++ b/sys/powerpc/fpu/fpu_add.c
@@ -56,7 +56,6 @@
#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
--- a/sys/powerpc/fpu/fpu_compare.c
+++ b/sys/powerpc/fpu/fpu_compare.c
@@ -56,7 +56,6 @@
#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
--- a/sys/powerpc/fpu/fpu_div.c
+++ b/sys/powerpc/fpu/fpu_div.c
@@ -53,7 +53,6 @@
#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
--- a/sys/powerpc/fpu/fpu_emu.c
+++ b/sys/powerpc/fpu/fpu_emu.c
@@ -93,7 +93,6 @@
#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
--- a/sys/powerpc/fpu/fpu_implode.c
+++ b/sys/powerpc/fpu/fpu_implode.c
@@ -56,7 +56,6 @@
#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
--- a/sys/powerpc/fpu/fpu_mul.c
+++ b/sys/powerpc/fpu/fpu_mul.c
@@ -53,7 +53,6 @@
#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
--- a/sys/powerpc/fpu/fpu_sqrt.c
+++ b/sys/powerpc/fpu/fpu_sqrt.c
@@ -53,7 +53,6 @@
#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
--- a/sys/powerpc/fpu/fpu_subr.c
+++ b/sys/powerpc/fpu/fpu_subr.c
@@ -53,7 +53,6 @@
#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
--- 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
--- a/sys/powerpc/powerpc/exec_machdep.c
+++ b/sys/powerpc/powerpc/exec_machdep.c
@@ -76,6 +76,7 @@
#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 @@
#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
--- a/sys/powerpc/powerpc/gdb_machdep.c
+++ b/sys/powerpc/powerpc/gdb_machdep.c
@@ -38,7 +38,6 @@
#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
--- a/sys/powerpc/powerpc/machdep.c
+++ b/sys/powerpc/powerpc/machdep.c
@@ -83,6 +83,7 @@
#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 @@
#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
--- a/sys/riscv/include/reg.h
+++ b/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_ */
diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c
--- a/sys/riscv/riscv/machdep.c
+++ b/sys/riscv/riscv/machdep.c
@@ -59,6 +59,7 @@
#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>
@@ -86,7 +87,6 @@
#include <machine/metadata.h>
#include <machine/pcb.h>
#include <machine/pte.h>
-#include <machine/reg.h>
#include <machine/riscvreg.h>
#include <machine/sbi.h>
#include <machine/trap.h>
diff --git a/sys/arm64/include/reg.h b/sys/sys/reg.h
copy from sys/arm64/include/reg.h
copy to sys/sys/reg.h
--- a/sys/arm64/include/reg.h
+++ b/sys/sys/reg.h
@@ -1,11 +1,16 @@
/*-
- * Copyright (c) 2014 Andrew Turner
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (C) 2014,2019 Andrew Turner
* Copyright (c) 2014-2015 The FreeBSD Foundation
- * All rights reserved.
*
* This software was developed by Andrew Turner under
* sponsorship from the FreeBSD Foundation.
*
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
+ * ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -30,63 +35,12 @@
* $FreeBSD$
*/
-#ifndef _MACHINE_REG_H_
-#define _MACHINE_REG_H_
-
-struct reg {
- uint64_t x[30];
- uint64_t lr;
- uint64_t sp;
- uint64_t elr;
- uint32_t spsr;
-};
-
-struct reg32 {
- unsigned int r[13];
- unsigned int r_sp;
- unsigned int r_lr;
- unsigned int r_pc;
- unsigned int r_cpsr;
-};
-
-struct fpreg {
- __uint128_t fp_q[32];
- uint32_t fp_sr;
- uint32_t fp_cr;
-};
-
-struct fpreg32 {
- int dummy;
-};
-
-struct dbreg {
- uint8_t db_debug_ver;
- uint8_t db_nbkpts;
- uint8_t db_nwtpts;
- uint8_t db_pad[5];
-
- struct {
- uint64_t dbr_addr;
- uint32_t dbr_ctrl;
- uint32_t dbr_pad;
- } db_breakregs[16];
- struct {
- uint64_t dbw_addr;
- uint32_t dbw_ctrl;
- uint32_t dbw_pad;
- } db_watchregs[16];
-};
+#ifndef _SYS_REG_H_
+#define _SYS_REG_H_
-struct dbreg32 {
- int dummy;
-};
-
-#define __HAVE_REG32
+#include <machine/reg.h>
#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 *);
@@ -96,11 +50,19 @@
#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 /* !_MACHINE_REG_H_ */
+#endif
diff --git a/sys/x86/include/reg.h b/sys/x86/include/reg.h
--- a/sys/x86/include/reg.h
+++ b/sys/x86/include/reg.h
@@ -244,26 +244,10 @@
#undef __dbreg64
#ifdef _KERNEL
-struct thread;
-
/*
* 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_ */
diff --git a/sys/x86/x86/dbreg.c b/sys/x86/x86/dbreg.c
--- a/sys/x86/x86/dbreg.c
+++ b/sys/x86/x86/dbreg.c
@@ -29,6 +29,7 @@
#include <sys/types.h>
#include <sys/kdb.h>
#include <sys/pcpu.h>
+#include <sys/reg.h>
#include <sys/smp.h>
#include <sys/systm.h>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 8, 10:09 AM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14532974
Default Alt Text
D19830.diff (27 KB)
Attached To
Mode
D19830: Create sys/reg.h for the common code previously in machine/reg.h
Attached
Detach File
Event Timeline
Log In to Comment