From 237fd8ef33f1777dba9b81d9a45881dea3cb2e21 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 22 Apr 2005 02:09:15 +0000 Subject: [PATCH] Remove DEC Alpha support. --- sys/emulation/linux/linux_file.c | 14 +---------- sys/emulation/linux/linux_ioctl.c | 37 +----------------------------- sys/emulation/linux/linux_misc.c | 31 ++----------------------- sys/emulation/linux/linux_signal.c | 18 +-------------- sys/emulation/linux/linux_socket.c | 8 +------ 5 files changed, 6 insertions(+), 102 deletions(-) diff --git a/sys/emulation/linux/linux_file.c b/sys/emulation/linux/linux_file.c index 1547bb206c..1ac9e2da8f 100644 --- a/sys/emulation/linux/linux_file.c +++ b/sys/emulation/linux/linux_file.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_file.c,v 1.41.2.6 2003/01/06 09:19:43 fjoe Exp $ - * $DragonFly: src/sys/emulation/linux/linux_file.c,v 1.19 2004/11/12 00:09:18 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/linux_file.c,v 1.20 2005/04/22 02:09:15 swildner Exp $ */ #include "opt_compat.h" @@ -58,7 +58,6 @@ #include #include "linux_util.h" -#ifndef __alpha__ int linux_creat(struct linux_creat_args *args) { @@ -81,7 +80,6 @@ linux_creat(struct linux_creat_args *args) linux_free_path(&path); return(error); } -#endif /*!__alpha__*/ int linux_open(struct linux_open_args *args) @@ -172,7 +170,6 @@ linux_lseek(struct linux_lseek_args *args) return error; } -#ifndef __alpha__ int linux_llseek(struct linux_llseek_args *args) { @@ -192,9 +189,7 @@ linux_llseek(struct linux_llseek_args *args) error = copyout(&res, args->res, sizeof(res)); return (error); } -#endif /*!__alpha__*/ -#ifndef __alpha__ int linux_readdir(struct linux_readdir_args *args) { @@ -209,7 +204,6 @@ linux_readdir(struct linux_readdir_args *args) args->sysmsg_result = lda.sysmsg_result; return(error); } -#endif /*!__alpha__*/ /* * Note that linux_getdents(2) and linux_getdents64(2) have the same @@ -791,7 +785,6 @@ linux_link(struct linux_link_args *args) return(error); } -#ifndef __alpha__ int linux_fdatasync(struct linux_fdatasync_args *uap) { @@ -805,7 +798,6 @@ linux_fdatasync(struct linux_fdatasync_args *uap) uap->sysmsg_result = bsd.sysmsg_result; return(error); } -#endif /*!__alpha__*/ int linux_pread(struct linux_pread_args *uap) @@ -990,10 +982,6 @@ bsd_to_linux_flock64(struct flock *bsd_flock, struct l_flock64 *linux_flock) } #endif /* __i386__ */ -#if defined(__alpha__) -#define linux_fcntl64_args linux_fcntl_args -#endif - static int linux_fcntl_common(struct linux_fcntl64_args *args) { diff --git a/sys/emulation/linux/linux_ioctl.c b/sys/emulation/linux/linux_ioctl.c index 3c8c032e0f..58397228e3 100644 --- a/sys/emulation/linux/linux_ioctl.c +++ b/sys/emulation/linux/linux_ioctl.c @@ -27,7 +27,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.55.2.11 2003/05/01 20:16:09 anholt Exp $ - * $DragonFly: src/sys/emulation/linux/linux_ioctl.c,v 1.17 2005/03/01 00:43:02 corecode Exp $ + * $DragonFly: src/sys/emulation/linux/linux_ioctl.c,v 1.18 2005/04/22 02:09:15 swildner Exp $ */ #include @@ -98,15 +98,8 @@ struct linux_termios { unsigned int c_oflag; unsigned int c_cflag; unsigned int c_lflag; -#ifdef __alpha__ - unsigned char c_cc[LINUX_NCCS]; - unsigned char c_line; - unsigned int c_ispeed; - unsigned int c_ospeed; -#else unsigned char c_line; unsigned char c_cc[LINUX_NCCS]; -#endif }; struct linux_winsize { @@ -456,20 +449,7 @@ bsd_to_linux_termio(struct termios *bios, struct linux_termio *lio) lio->c_cflag = lios.c_cflag; lio->c_lflag = lios.c_lflag; lio->c_line = lios.c_line; -#ifdef __alpha__ - lio->c_cc[LINUX__VINTR] = lios.c_cc[LINUX_VINTR]; - lio->c_cc[LINUX__VQUIT] = lios.c_cc[LINUX_VQUIT]; - lio->c_cc[LINUX__VERASE] = lios.c_cc[LINUX_VERASE]; - lio->c_cc[LINUX__VKILL] = lios.c_cc[LINUX_VKILL]; - lio->c_cc[LINUX__VEOF] = - lios.c_cc[(lios.c_lflag & ICANON) ? LINUX_VEOF : LINUX_VMIN]; - lio->c_cc[LINUX__VEOL] = - lios.c_cc[(lios.c_lflag & ICANON) ? LINUX_VEOL : LINUX_VTIME]; - lio->c_cc[LINUX__VEOL2] = lios.c_cc[LINUX_VEOL2]; - lio->c_cc[LINUX__VSWTC] = lios.c_cc[LINUX_VSWTC]; -#else memcpy(lio->c_cc, lios.c_cc, LINUX_NCC); -#endif } static void @@ -482,24 +462,9 @@ linux_to_bsd_termio(struct linux_termio *lio, struct termios *bios) lios.c_oflag = lio->c_oflag; lios.c_cflag = lio->c_cflag; lios.c_lflag = lio->c_lflag; -#ifdef __alpha__ - for (i=0; ic_cc[LINUX__VINTR]; - lios.c_cc[LINUX_VQUIT] = lio->c_cc[LINUX__VQUIT]; - lios.c_cc[LINUX_VERASE] = lio->c_cc[LINUX__VERASE]; - lios.c_cc[LINUX_VKILL] = lio->c_cc[LINUX__VKILL]; - lios.c_cc[LINUX_VEOL2] = lio->c_cc[LINUX__VEOL2]; - lios.c_cc[LINUX_VSWTC] = lio->c_cc[LINUX__VSWTC]; - lios.c_cc[(lio->c_lflag & ICANON) ? LINUX_VEOF : LINUX_VMIN] = - lio->c_cc[LINUX__VEOF]; - lios.c_cc[(lio->c_lflag & ICANON) ? LINUX_VEOL : LINUX_VTIME] = - lio->c_cc[LINUX__VEOL]; -#else for (i=LINUX_NCC; ic_cc, LINUX_NCC); -#endif linux_to_bsd_termios(&lios, bios); } diff --git a/sys/emulation/linux/linux_misc.c b/sys/emulation/linux/linux_misc.c index 21f8434be8..1d7cba05be 100644 --- a/sys/emulation/linux/linux_misc.c +++ b/sys/emulation/linux/linux_misc.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.85.2.9 2002/09/24 08:11:41 mdodd Exp $ - * $DragonFly: src/sys/emulation/linux/linux_misc.c,v 1.22 2004/11/12 00:09:18 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/linux_misc.c,v 1.23 2005/04/22 02:09:15 swildner Exp $ */ #include "opt_compat.h" @@ -80,20 +80,14 @@ #include "linux_mib.h" #include "linux_util.h" -#ifdef __alpha__ -#define BSD_TO_LINUX_SIGNAL(sig) (sig) -#else #define BSD_TO_LINUX_SIGNAL(sig) \ (((sig) <= LINUX_SIGTBLSZ) ? bsd_to_linux_signal[_SIG_IDX(sig)] : sig) -#endif -#ifndef __alpha__ static unsigned int linux_to_bsd_resource[LINUX_RLIM_NLIMITS] = { RLIMIT_CPU, RLIMIT_FSIZE, RLIMIT_DATA, RLIMIT_STACK, RLIMIT_CORE, RLIMIT_RSS, RLIMIT_NPROC, RLIMIT_NOFILE, RLIMIT_MEMLOCK, -1 }; -#endif /*!__alpha__*/ struct l_sysinfo { l_long uptime; /* Seconds since boot */ @@ -107,7 +101,7 @@ struct l_sysinfo { l_ushort procs; /* Number of current processes */ char _f[22]; /* Pads structure to 64 bytes */ }; -#ifndef __alpha__ + int linux_sysinfo(struct linux_sysinfo_args *args) { @@ -161,9 +155,7 @@ linux_sysinfo(struct linux_sysinfo_args *args) return copyout(&sysinfo, (caddr_t)args->info, sizeof(sysinfo)); } -#endif /*!__alpha__*/ -#ifndef __alpha__ int linux_alarm(struct linux_alarm_args *args) { @@ -207,7 +199,6 @@ linux_alarm(struct linux_alarm_args *args) } return 0; } -#endif /*!__alpha__*/ int linux_brk(struct linux_brk_args *args) @@ -629,7 +620,6 @@ linux_msync(struct linux_msync_args *args) return(error); } -#ifndef __alpha__ int linux_time(struct linux_time_args *args) { @@ -649,7 +639,6 @@ linux_time(struct linux_time_args *args) args->sysmsg_lresult = tm; return 0; } -#endif /*!__alpha__*/ struct l_times_argv { l_long tms_utime; @@ -658,11 +647,7 @@ struct l_times_argv { l_long tms_cstime; }; -#ifdef __alpha__ -#define CLK_TCK 1024 /* Linux uses 1024 on alpha */ -#else #define CLK_TCK 100 /* Linux uses 100 */ -#endif #define CONVTCK(r) (r.tv_sec * CLK_TCK + r.tv_usec / (1000000 / CLK_TCK)) @@ -768,7 +753,6 @@ cleanup: #define __WCLONE 0x80000000 -#ifndef __alpha__ int linux_waitpid(struct linux_waitpid_args *args) { @@ -800,7 +784,6 @@ linux_waitpid(struct linux_waitpid_args *args) return (error); } -#endif /*!__alpha__*/ int linux_wait4(struct linux_wait4_args *args) @@ -884,10 +867,8 @@ linux_personality(struct linux_personality_args *args) if (ldebug(personality)) printf(ARGS(personality, "%d"), args->per); #endif -#ifndef __alpha__ if (args->per != 0) return EINVAL; -#endif /* Yes Jim, it's still a Linux... */ args->sysmsg_result = 0; @@ -947,7 +928,6 @@ linux_getitimer(struct linux_getitimer_args *args) return(error); } -#ifndef __alpha__ int linux_nice(struct linux_nice_args *args) { @@ -962,7 +942,6 @@ linux_nice(struct linux_nice_args *args) args->sysmsg_result = bsd_args.sysmsg_result; return(error); } -#endif /*!__alpha__*/ int linux_setgroups(struct linux_setgroups_args *args) @@ -1060,7 +1039,6 @@ linux_getgroups(struct linux_getgroups_args *args) return (0); } -#ifndef __alpha__ int linux_setrlimit(struct linux_setrlimit_args *args) { @@ -1152,7 +1130,6 @@ linux_getrlimit(struct linux_getrlimit_args *args) } return (error); } -#endif /*!__alpha__*/ int linux_sched_setscheduler(struct linux_sched_setscheduler_args *args) @@ -1305,8 +1282,6 @@ linux_reboot(struct linux_reboot_args *args) return(error); } -#ifndef __alpha__ - /* * The FreeBSD native getpid(2), getgid(2) and getuid(2) also modify * p->p_retval[1] when COMPAT_43 or COMPAT_SUNOS is defined. This @@ -1355,8 +1330,6 @@ linux_getuid(struct linux_getuid_args *args) return (0); } -#endif /*!__alpha__*/ - int linux_getsid(struct linux_getsid_args *args) { diff --git a/sys/emulation/linux/linux_signal.c b/sys/emulation/linux/linux_signal.c index 27c458f730..7a0fd9790b 100644 --- a/sys/emulation/linux/linux_signal.c +++ b/sys/emulation/linux/linux_signal.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_signal.c,v 1.23.2.3 2001/11/05 19:08:23 marcel Exp $ - * $DragonFly: src/sys/emulation/linux/linux_signal.c,v 1.9 2003/11/16 01:50:54 daver Exp $ + * $DragonFly: src/sys/emulation/linux/linux_signal.c,v 1.10 2005/04/22 02:09:15 swildner Exp $ */ #include @@ -52,11 +52,7 @@ linux_to_bsd_sigset(l_sigset_t *lss, sigset_t *bss) bss->__bits[1] = lss->__bits[1]; for (l = 1; l <= LINUX_SIGTBLSZ; l++) { if (LINUX_SIGISMEMBER(*lss, l)) { -#ifdef __alpha__ - b = _SIG_IDX(l); -#else b = linux_to_bsd_signal[_SIG_IDX(l)]; -#endif if (b) SIGADDSET(*bss, b); } @@ -73,11 +69,7 @@ bsd_to_linux_sigset(sigset_t *bss, l_sigset_t *lss) lss->__bits[1] = bss->__bits[1]; for (b = 1; b <= LINUX_SIGTBLSZ; b++) { if (SIGISMEMBER(*bss, b)) { -#if __alpha__ - l = _SIG_IDX(b); -#else l = bsd_to_linux_signal[_SIG_IDX(b)]; -#endif if (l) LINUX_SIGADDSET(*lss, l); } @@ -131,7 +123,6 @@ bsd_to_linux_sigaction(struct sigaction *bsa, l_sigaction_t *lsa) lsa->lsa_flags |= LINUX_SA_NOMASK; } -#ifndef __alpha__ int linux_signal(struct linux_signal_args *args) { @@ -160,7 +151,6 @@ linux_signal(struct linux_signal_args *args) args->sysmsg_result = (int) linux_osa.lsa_handler; return (error); } -#endif /*!__alpha__*/ int linux_rt_sigaction(struct linux_rt_sigaction_args *args) @@ -216,7 +206,6 @@ linux_to_bsd_sigprocmask(int how) } } -#ifndef __alpha__ int linux_sigprocmask(struct linux_sigprocmask_args *args) { @@ -250,7 +239,6 @@ linux_sigprocmask(struct linux_sigprocmask_args *args) } return (error); } -#endif /*!__alpha__*/ int linux_rt_sigprocmask(struct linux_rt_sigprocmask_args *args) @@ -288,7 +276,6 @@ linux_rt_sigprocmask(struct linux_rt_sigprocmask_args *args) return (error); } -#ifndef __alpha__ int linux_sgetmask(struct linux_sgetmask_args *args) { @@ -352,7 +339,6 @@ linux_sigpending(struct linux_sigpending_args *args) } return (error); } -#endif /*!__alpha__*/ int linux_kill(struct linux_kill_args *args) @@ -370,11 +356,9 @@ linux_kill(struct linux_kill_args *args) if (args->signum < 0 || args->signum > LINUX_NSIG) return EINVAL; -#ifndef __alpha__ if (args->signum > 0 && args->signum <= LINUX_SIGTBLSZ) sig = linux_to_bsd_signal[_SIG_IDX(args->signum)]; else -#endif sig = args->signum; error = kern_kill(sig, args->pid); diff --git a/sys/emulation/linux/linux_socket.c b/sys/emulation/linux/linux_socket.c index b0b0663871..c176e53274 100644 --- a/sys/emulation/linux/linux_socket.c +++ b/sys/emulation/linux/linux_socket.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.19.2.8 2001/11/07 20:33:55 marcel Exp $ - * $DragonFly: src/sys/emulation/linux/linux_socket.c,v 1.18 2004/06/02 14:42:57 eirikn Exp $ + * $DragonFly: src/sys/emulation/linux/linux_socket.c,v 1.19 2005/04/22 02:09:15 swildner Exp $ */ #include @@ -136,7 +136,6 @@ linux_copyout_sockaddr(struct sockaddr *sa, struct sockaddr *uaddr, int sa_len) return (error); } -#ifndef __alpha__ static int linux_to_bsd_domain(int domain) { @@ -341,8 +340,6 @@ struct linux_connect_args { struct sockaddr * name; int namelen; }; -int linux_connect(struct linux_connect_args *, int *res); -#endif /* !__alpha__*/ int linux_connect(struct linux_connect_args *args, int *res) @@ -389,8 +386,6 @@ linux_connect(struct linux_connect_args *args, int *res) return (error); } -#ifndef __alpha__ - struct linux_listen_args { int s; int backlog; @@ -1199,4 +1194,3 @@ linux_socketcall(struct linux_socketcall_args *args) uprintf("LINUX: 'socket' typ=%d not implemented\n", args->what); return (ENOSYS); } -#endif /*!__alpha__*/ -- 2.41.0