Remove iBCS2, part2: general kernel

Reviewed by:	kib (previous version)
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Mateusz Guzik 2018-12-19 21:57:58 +00:00
parent 405c3050f1
commit 628888f0e0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342243
36 changed files with 8 additions and 84 deletions

View File

@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
struct sysentvec elf64_freebsd_sysvec = {
.sv_size = SYS_MAXSYSCALL,
.sv_table = sysent,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,

View File

@ -991,8 +991,6 @@ cpu_fetch_syscall_args_fallback(struct thread *td, struct syscall_args *sa)
reg++;
regcnt--;
}
if (p->p_sysent->sv_mask)
sa->code &= p->p_sysent->sv_mask;
if (sa->code >= p->p_sysent->sv_size)
sa->callp = &p->p_sysent->sv_table[0];
@ -1040,9 +1038,6 @@ cpu_fetch_syscall_args(struct thread *td)
sa->narg = sa->callp->sy_narg;
KASSERT(sa->narg <= nitems(sa->args), ("Too many syscall arguments!"));
if (p->p_sysent->sv_mask)
sa->code &= p->p_sysent->sv_mask;
if (__predict_false(sa->narg > NARGREGS))
return (cpu_fetch_syscall_args_fallback(td, sa));

View File

@ -612,9 +612,6 @@ options EFIRT
# Enable 32-bit runtime support for FreeBSD/i386 binaries.
options COMPAT_FREEBSD32
# Enable iBCS2 runtime support for SCO and ISC binaries
#XXX#options IBCS2
# Emulate spx device for client side of SVR3 local X interface
#XXX#options SPX_HACK

View File

@ -177,8 +177,6 @@ ia32_fetch_syscall_args(struct thread *td)
sa->code = tmp;
params += sizeof(quad_t);
}
if (p->p_sysent->sv_mask)
sa->code &= p->p_sysent->sv_mask;
if (sa->code >= p->p_sysent->sv_size)
sa->callp = &p->p_sysent->sv_table[0];
else

View File

@ -711,7 +711,6 @@ linux_vsyscall(struct thread *td)
struct sysentvec elf_linux_sysvec = {
.sv_size = LINUX_SYS_MAXSYSCALL,
.sv_table = linux_sysent,
.sv_mask = 0,
.sv_errsize = ELAST + 1,
.sv_errtbl = linux_errtbl,
.sv_transtrap = linux_translate_traps,

View File

@ -909,7 +909,6 @@ linux32_fixlimit(struct rlimit *rl, int which)
struct sysentvec elf_linux_sysvec = {
.sv_size = LINUX32_SYS_MAXSYSCALL,
.sv_table = linux32_sysent,
.sv_mask = 0,
.sv_errsize = ELAST + 1,
.sv_errtbl = linux_errtbl,
.sv_transtrap = linux_translate_traps,

View File

@ -59,7 +59,6 @@ u_long elf_hwcap2;
struct sysentvec elf32_freebsd_sysvec = {
.sv_size = SYS_MAXSYSCALL,
.sv_table = sysent,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,

View File

@ -118,8 +118,6 @@ cpu_fetch_syscall_args(struct thread *td)
ap += 2;
}
p = td->td_proc;
if (p->p_sysent->sv_mask)
sa->code &= p->p_sysent->sv_mask;
if (sa->code >= p->p_sysent->sv_size)
sa->callp = &p->p_sysent->sv_table[0];
else

View File

@ -190,8 +190,6 @@ cpu_set_syscall_retval(struct thread *td, int error)
if (call == SYS___syscall) {
register_t *ap = &frame->tf_r0;
register_t code = ap[_QUAD_LOWWORD];
if (td->td_proc->p_sysent->sv_mask)
code &= td->td_proc->p_sysent->sv_mask;
fixup = (code != SYS_lseek);
}
#endif

View File

@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
static struct sysentvec elf64_freebsd_sysvec = {
.sv_size = SYS_MAXSYSCALL,
.sv_table = sysent,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,

View File

@ -115,8 +115,6 @@ cpu_fetch_syscall_args(struct thread *td)
nap--;
}
if (p->p_sysent->sv_mask)
sa->code &= p->p_sysent->sv_mask;
if (sa->code >= p->p_sysent->sv_size)
sa->callp = &p->p_sysent->sv_table[0];
else

View File

@ -124,8 +124,6 @@ linux_fetch_syscall_args(struct thread *td)
sa->code = td->td_frame->tf_x[8];
/* LINUXTODO: generic syscall? */
if (p->p_sysent->sv_mask)
sa->code &= p->p_sysent->sv_mask;
if (sa->code >= p->p_sysent->sv_size)
sa->callp = &p->p_sysent->sv_table[0];
else
@ -364,7 +362,6 @@ linux_vsyscall(struct thread *td)
struct sysentvec elf_linux_sysvec = {
.sv_size = LINUX_SYS_MAXSYSCALL,
.sv_table = linux_sysent,
.sv_mask = 0,
.sv_errsize = ELAST + 1,
.sv_errtbl = linux_errtbl,
.sv_transtrap = linux_translate_traps,

View File

@ -98,7 +98,6 @@ SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxvmem, CTLFLAG_RWTUN, &ia32_maxvmem, 0, "
struct sysentvec ia32_freebsd_sysvec = {
.sv_size = FREEBSD32_SYS_MAXSYSCALL,
.sv_table = freebsd32_sysent,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,

View File

@ -508,25 +508,6 @@ i386/i386/trap.c standard
i386/i386/uio_machdep.c standard
i386/i386/vm86.c standard
i386/i386/vm_machdep.c standard
i386/ibcs2/ibcs2_errno.c optional ibcs2
i386/ibcs2/ibcs2_fcntl.c optional ibcs2
i386/ibcs2/ibcs2_ioctl.c optional ibcs2
i386/ibcs2/ibcs2_ipc.c optional ibcs2
i386/ibcs2/ibcs2_isc.c optional ibcs2
i386/ibcs2/ibcs2_isc_sysent.c optional ibcs2
i386/ibcs2/ibcs2_misc.c optional ibcs2
i386/ibcs2/ibcs2_msg.c optional ibcs2
i386/ibcs2/ibcs2_other.c optional ibcs2
i386/ibcs2/ibcs2_signal.c optional ibcs2
i386/ibcs2/ibcs2_socksys.c optional ibcs2
i386/ibcs2/ibcs2_stat.c optional ibcs2
i386/ibcs2/ibcs2_sysent.c optional ibcs2
i386/ibcs2/ibcs2_sysi86.c optional ibcs2
i386/ibcs2/ibcs2_sysvec.c optional ibcs2
i386/ibcs2/ibcs2_util.c optional ibcs2
i386/ibcs2/ibcs2_xenix.c optional ibcs2
i386/ibcs2/ibcs2_xenix_sysent.c optional ibcs2
i386/ibcs2/imgact_coff.c optional ibcs2
i386/linux/imgact_linux.c optional compat_linux
i386/linux/linux_copyout.c optional compat_linux
i386/linux/linux_dummy.c optional compat_linux

View File

@ -16,7 +16,6 @@ PV_STATS opt_pmap.h
# (see src/sys/conf/options), except for broken debugging options.
COMPAT_AOUT opt_dontuse.h
COMPAT_FREEBSD32 opt_global.h
#IBCS2 opt_dontuse.h
#COMPAT_LINUX opt_dontuse.h
COMPAT_LINUX32 opt_compat.h
LINPROCFS opt_dontuse.h

View File

@ -22,7 +22,6 @@ PV_STATS opt_pmap.h
# they are handled like options for static filesystems
# (see src/sys/conf/options), except for broken debugging options.
COMPAT_AOUT opt_dontuse.h
IBCS2 opt_dontuse.h
COMPAT_LINUX opt_dontuse.h
LINPROCFS opt_dontuse.h
LINSYSFS opt_dontuse.h

View File

@ -14,7 +14,7 @@ all:
@echo "make links or tags only"
# Directories in which to place i386 tags links
DI386= apm i386 ibcs2 include isa linux
DI386= apm i386 include isa linux
links::
-for i in ${COMMDIR1}; do \
@ -25,9 +25,9 @@ links::
(cd $$i && { rm -f tags; ln -s ../tags tags; }) done
SI386= ${SYS}/i386/acpica/*.[ch] ${SYS}/i386/bios/*.[ch] \
${SYS}/i386/i386/*.[ch] ${SYS}/i386/ibcs2/*.[ch] \
${SYS}/i386/include/*.[ch] ${SYS}/i386/isa/*.[ch] \
${SYS}/i386/linux/*.[ch] ${SYS}/i386/pci/*.[ch]
${SYS}/i386/i386/*.[ch] ${SYS}/i386/include/*.[ch] \
${SYS}/i386/isa/*.[ch] ${SYS}/i386/linux/*.[ch] \
${SYS}/i386/pci/*.[ch]
AI386= ${SYS}/i386/i386/*.s
tags::

View File

@ -885,9 +885,6 @@ options NKPT=31
#####################################################################
# ABI Emulation
# Enable iBCS2 runtime support for SCO and ISC binaries
#options IBCS2
# Emulate spx device for client side of SVR3 local X interface
options SPX_HACK

View File

@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$");
struct sysentvec elf32_freebsd_sysvec = {
.sv_size = SYS_MAXSYSCALL,
.sv_table = sysent,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,

View File

@ -1095,8 +1095,6 @@ cpu_fetch_syscall_args(struct thread *td)
params += sizeof(quad_t);
}
if (p->p_sysent->sv_mask)
sa->code &= p->p_sysent->sv_mask;
if (sa->code >= p->p_sysent->sv_size)
sa->callp = &p->p_sysent->sv_table[0];
else

View File

@ -850,7 +850,6 @@ linux_get_machine(const char **dst)
struct sysentvec linux_sysvec = {
.sv_size = LINUX_SYS_MAXSYSCALL,
.sv_table = linux_sysent,
.sv_mask = 0,
.sv_errsize = ELAST + 1,
.sv_errtbl = linux_errtbl,
.sv_transtrap = linux_translate_traps,
@ -887,7 +886,6 @@ INIT_SYSENTVEC(aout_sysvec, &linux_sysvec);
struct sysentvec elf_linux_sysvec = {
.sv_size = LINUX_SYS_MAXSYSCALL,
.sv_table = linux_sysent,
.sv_mask = 0,
.sv_errsize = ELAST + 1,
.sv_errtbl = linux_errtbl,
.sv_transtrap = linux_translate_traps,

View File

@ -76,7 +76,6 @@ static int aout_fixup(register_t **stack_base, struct image_params *imgp);
struct sysentvec aout_sysvec = {
.sv_size = SYS_MAXSYSCALL,
.sv_table = sysent,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,
@ -119,7 +118,6 @@ extern u_long ia32_maxssiz;
struct sysentvec aout_sysvec = {
.sv_size = FREEBSD32_SYS_MAXSYSCALL,
.sv_table = freebsd32_sysent,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,

View File

@ -401,7 +401,6 @@ null_set_syscall_retval(struct thread *td __unused, int error __unused)
struct sysentvec null_sysvec = {
.sv_size = 0,
.sv_table = NULL,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,

View File

@ -526,8 +526,8 @@ sed -e '
if (!flag("NOPROTO") && !flag("NODEF")) {
if (funcname == "nosys" || funcname == "lkmnosys" ||
funcname == "sysarch" || funcname ~ /^freebsd/ ||
funcname ~ /^linux/ || funcname ~ /^ibcs2/ ||
funcname ~ /^xenix/ || funcname ~ /^cloudabi/) {
funcname ~ /^linux/ || funcname ~ /^xenix/ ||
funcname ~ /^cloudabi/) {
printf("%s\t%s(struct thread *, struct %s *)",
rettype, funcname, argalias) > sysdcl
} else {
@ -546,8 +546,8 @@ sed -e '
} else {
if (funcname == "nosys" || funcname == "sysarch" ||
funcname == "lkmnosys" || funcname ~ /^freebsd/ ||
funcname ~ /^linux/ || funcname ~ /^ibcs2/ ||
funcname ~ /^xenix/ || funcname ~ /^cloudabi/) {
funcname ~ /^linux/ || funcname ~ /^xenix/ ||
funcname ~ /^cloudabi/) {
printf("%s, %s, NULL, 0, 0, %s, %s },", funcname, auditev, flags, thr_flag) > sysent
column = column + length(funcname) + length(auditev) + length(flags) + 3
} else {

View File

@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
struct sysentvec elf64_freebsd_sysvec = {
.sv_size = SYS_MAXSYSCALL,
.sv_table = sysent,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,
@ -111,7 +110,6 @@ elf64_dump_thread(struct thread *td __unused, void *dst __unused,
struct sysentvec elf32_freebsd_sysvec = {
.sv_size = SYS_MAXSYSCALL,
.sv_table = sysent,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,

View File

@ -77,7 +77,6 @@ extern const char *freebsd32_syscallnames[];
struct sysentvec elf32_freebsd_sysvec = {
.sv_size = SYS_MAXSYSCALL,
.sv_table = freebsd32_sysent,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,

View File

@ -442,8 +442,6 @@ cpu_fetch_syscall_args(struct thread *td)
* XXX
* Shouldn't this go before switching on the code?
*/
if (se->sv_mask)
sa->code &= se->sv_mask;
if (sa->code >= se->sv_size)
sa->callp = &se->sv_table[0];

View File

@ -83,7 +83,6 @@ struct sysentvec elf32_freebsd_sysvec = {
#else
.sv_table = sysent,
#endif
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,

View File

@ -58,7 +58,6 @@ static void exec_setregs_funcdesc(struct thread *td, struct image_params *imgp,
struct sysentvec elf64_freebsd_sysvec_v1 = {
.sv_size = SYS_MAXSYSCALL,
.sv_table = sysent,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,
@ -97,7 +96,6 @@ INIT_SYSENTVEC(elf64_sysvec_v1, &elf64_freebsd_sysvec_v1);
struct sysentvec elf64_freebsd_sysvec_v2 = {
.sv_size = SYS_MAXSYSCALL,
.sv_table = sysent,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,

View File

@ -867,8 +867,6 @@ cpu_set_syscall_retval(struct thread *td, int error)
if (tf->fixreg[0] == SYS___syscall &&
(SV_PROC_FLAG(p, SV_ILP32))) {
int code = tf->fixreg[FIRSTARG + 1];
if (p->p_sysent->sv_mask)
code &= p->p_sysent->sv_mask;
fixup = (
#if defined(COMPAT_FREEBSD6) && defined(SYS_freebsd6_lseek)
code != SYS_freebsd6_lseek &&

View File

@ -622,8 +622,6 @@ cpu_fetch_syscall_args(struct thread *td)
}
}
if (p->p_sysent->sv_mask)
sa->code &= p->p_sysent->sv_mask;
if (sa->code >= p->p_sysent->sv_size)
sa->callp = &p->p_sysent->sv_table[0];
else

View File

@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$");
struct sysentvec elf64_freebsd_sysvec = {
.sv_size = SYS_MAXSYSCALL,
.sv_table = sysent,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,

View File

@ -111,8 +111,6 @@ cpu_fetch_syscall_args(struct thread *td)
nap--;
}
if (p->p_sysent->sv_mask)
sa->code &= p->p_sysent->sv_mask;
if (sa->code >= p->p_sysent->sv_size)
sa->callp = &p->p_sysent->sv_table[0];
else

View File

@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
static struct sysentvec elf64_freebsd_sysvec = {
.sv_size = SYS_MAXSYSCALL,
.sv_table = sysent,
.sv_mask = 0,
.sv_errsize = 0,
.sv_errtbl = NULL,
.sv_transtrap = NULL,

View File

@ -558,8 +558,6 @@ cpu_fetch_syscall_args(struct thread *td)
regcnt--;
}
if (p->p_sysent->sv_mask)
sa->code &= p->p_sysent->sv_mask;
if (sa->code >= p->p_sysent->sv_size)
sa->callp = &p->p_sysent->sv_table[0];
else

View File

@ -95,7 +95,6 @@ struct vnode;
struct sysentvec {
int sv_size; /* number of entries */
struct sysent *sv_table; /* pointer to sysent */
u_int sv_mask; /* optional mask to index */
int sv_errsize; /* size of errno translation table */
const int *sv_errtbl; /* errno translation table */
int (*sv_transtrap)(int, int);