diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-03-11 14:49:06 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-03-11 14:49:06 +0000 |
commit | 142a4d29938aa4f7dde8d4ae621c479cc53fda36 (patch) | |
tree | e7bb2301107c48074cb0dbfffd43ee1f7e425d97 /sys/fs/procfs | |
parent | d937b522a1d72eb6b270db5bf368d3fd1a79ebcf (diff) | |
download | FreeBSD-src-142a4d29938aa4f7dde8d4ae621c479cc53fda36.zip FreeBSD-src-142a4d29938aa4f7dde8d4ae621c479cc53fda36.tar.gz |
Provide groundwork for 32-bit binary compatibility on non-x86 platforms,
for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32
option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts
of the kernel and enhances the freebsd32 compatibility code to support
big-endian platforms.
Reviewed by: kib, jhb
Diffstat (limited to 'sys/fs/procfs')
-rw-r--r-- | sys/fs/procfs/procfs_dbregs.c | 7 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_fpregs.c | 7 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_ioctl.c | 6 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_map.c | 8 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_regs.c | 7 |
5 files changed, 16 insertions, 19 deletions
diff --git a/sys/fs/procfs/procfs_dbregs.c b/sys/fs/procfs/procfs_dbregs.c index efa4e14..68945ef 100644 --- a/sys/fs/procfs/procfs_dbregs.c +++ b/sys/fs/procfs/procfs_dbregs.c @@ -59,10 +59,9 @@ #include <fs/pseudofs/pseudofs.h> #include <fs/procfs/procfs.h> -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 #include <sys/procfs.h> #include <machine/fpu.h> -#include <compat/ia32/ia32_reg.h> /* * PROC(write, dbregs, td2, &r) becomes @@ -90,7 +89,7 @@ procfs_doprocdbregs(PFS_FILL_ARGS) int error; struct dbreg r; struct thread *td2; -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 struct dbreg32 r32; int wrap32 = 0; #endif @@ -106,7 +105,7 @@ procfs_doprocdbregs(PFS_FILL_ARGS) } td2 = FIRST_THREAD_IN_PROC(p); -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 if (SV_CURPROC_FLAG(SV_ILP32)) { if ((td2->td_proc->p_sysent->sv_flags & SV_ILP32) == 0) { PROC_UNLOCK(p); diff --git a/sys/fs/procfs/procfs_fpregs.c b/sys/fs/procfs/procfs_fpregs.c index 43af53e..c35b066 100644 --- a/sys/fs/procfs/procfs_fpregs.c +++ b/sys/fs/procfs/procfs_fpregs.c @@ -53,10 +53,9 @@ #include <fs/pseudofs/pseudofs.h> #include <fs/procfs/procfs.h> -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 #include <sys/procfs.h> #include <machine/fpu.h> -#include <compat/ia32/ia32_reg.h> /* * PROC(write, fpregs, td2, &r) becomes @@ -84,7 +83,7 @@ procfs_doprocfpregs(PFS_FILL_ARGS) int error; struct fpreg r; struct thread *td2; -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 struct fpreg32 r32; int wrap32 = 0; #endif @@ -101,7 +100,7 @@ procfs_doprocfpregs(PFS_FILL_ARGS) /* XXXKSE: */ td2 = FIRST_THREAD_IN_PROC(p); -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 if (SV_CURPROC_FLAG(SV_ILP32)) { if ((td2->td_proc->p_sysent->sv_flags & SV_ILP32) == 0) { PROC_UNLOCK(p); diff --git a/sys/fs/procfs/procfs_ioctl.c b/sys/fs/procfs/procfs_ioctl.c index ccff555..4b45af6 100644 --- a/sys/fs/procfs/procfs_ioctl.c +++ b/sys/fs/procfs/procfs_ioctl.c @@ -42,7 +42,7 @@ #include <fs/pseudofs/pseudofs.h> #include <fs/procfs/procfs.h> -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 struct procfs_status32 { int state; /* Running, stopped, something else? */ int flags; /* Any flags */ @@ -62,7 +62,7 @@ int procfs_ioctl(PFS_IOCTL_ARGS) { struct procfs_status *ps; -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 struct procfs_status32 *ps32; #endif int error, flags, sig; @@ -142,7 +142,7 @@ procfs_ioctl(PFS_IOCTL_ARGS) ps->why = p->p_step ? p->p_stype : 0; ps->val = p->p_step ? p->p_xstat : 0; break; -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 case PIOCWAIT32: while (p->p_step == 0 && (p->p_flag & P_WEXIT) == 0) { /* sleep until p stops */ diff --git a/sys/fs/procfs/procfs_map.c b/sys/fs/procfs/procfs_map.c index 878e2d5..2622d1e 100644 --- a/sys/fs/procfs/procfs_map.c +++ b/sys/fs/procfs/procfs_map.c @@ -47,7 +47,7 @@ #include <sys/proc.h> #include <sys/resourcevar.h> #include <sys/sbuf.h> -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 #include <sys/sysent.h> #endif #include <sys/uio.h> @@ -86,7 +86,7 @@ procfs_doprocmap(PFS_FILL_ARGS) struct uidinfo *uip; int error, vfslocked; unsigned int last_timestamp; -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 int wrap32 = 0; #endif @@ -99,7 +99,7 @@ procfs_doprocmap(PFS_FILL_ARGS) if (uio->uio_rw != UIO_READ) return (EOPNOTSUPP); -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 if (curproc->p_sysent->sv_flags & SV_ILP32) { if (!(p->p_sysent->sv_flags & SV_ILP32)) return (EOPNOTSUPP); @@ -209,7 +209,7 @@ procfs_doprocmap(PFS_FILL_ARGS) "0x%lx 0x%lx %d %d %p %s%s%s %d %d 0x%x %s %s %s %s %s %d\n", (u_long)e_start, (u_long)e_end, resident, privateresident, -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 wrap32 ? NULL : obj, /* Hide 64 bit value */ #else obj, diff --git a/sys/fs/procfs/procfs_regs.c b/sys/fs/procfs/procfs_regs.c index 82922fb..5bf1c0a 100644 --- a/sys/fs/procfs/procfs_regs.c +++ b/sys/fs/procfs/procfs_regs.c @@ -53,10 +53,9 @@ #include <fs/pseudofs/pseudofs.h> #include <fs/procfs/procfs.h> -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 #include <sys/procfs.h> #include <machine/fpu.h> -#include <compat/ia32/ia32_reg.h> /* * PROC(write, regs, td2, &r) becomes @@ -84,7 +83,7 @@ procfs_doprocregs(PFS_FILL_ARGS) int error; struct reg r; struct thread *td2; -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 struct reg32 r32; int wrap32 = 0; #endif @@ -101,7 +100,7 @@ procfs_doprocregs(PFS_FILL_ARGS) /* XXXKSE: */ td2 = FIRST_THREAD_IN_PROC(p); -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 if (SV_CURPROC_FLAG(SV_ILP32)) { if ((td2->td_proc->p_sysent->sv_flags & SV_ILP32) == 0) { PROC_UNLOCK(p); |