diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 15:20:36 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 15:20:36 -0700 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/parisc/hpux |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/parisc/hpux')
-rw-r--r-- | arch/parisc/hpux/Makefile | 5 | ||||
-rw-r--r-- | arch/parisc/hpux/entry_hpux.S | 547 | ||||
-rw-r--r-- | arch/parisc/hpux/fs.c | 199 | ||||
-rw-r--r-- | arch/parisc/hpux/gate.S | 116 | ||||
-rw-r--r-- | arch/parisc/hpux/ioctl.c | 73 | ||||
-rw-r--r-- | arch/parisc/hpux/sys_hpux.c | 985 | ||||
-rw-r--r-- | arch/parisc/hpux/wrappers.S | 257 |
7 files changed, 2182 insertions, 0 deletions
diff --git a/arch/parisc/hpux/Makefile b/arch/parisc/hpux/Makefile new file mode 100644 index 00000000000..1048fb69f06 --- /dev/null +++ b/arch/parisc/hpux/Makefile @@ -0,0 +1,5 @@ +# +# Makefile for HPUX emulation +# + +obj-y := entry_hpux.o gate.o wrappers.o fs.o ioctl.o sys_hpux.o diff --git a/arch/parisc/hpux/entry_hpux.S b/arch/parisc/hpux/entry_hpux.S new file mode 100644 index 00000000000..fa9bf38787e --- /dev/null +++ b/arch/parisc/hpux/entry_hpux.S @@ -0,0 +1,547 @@ +/* syscall table for HPUX specific syscalls + * + * Linux/PA-RISC Project (http://www.parisc-linux.org/) + * Copyright (C) 1999 Matthew Wilcox <willy at debian . org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <linux/sys.h> +#include <linux/linkage.h> +#include <asm/unistd.h> + + .text + +#define ENTRY_NAME(_name_) .word _name_ + + .align 4 + .export hpux_call_table + .import hpux_unimplemented_wrapper +hpux_call_table: + ENTRY_NAME(sys_ni_syscall) /* 0 */ + ENTRY_NAME(sys_exit) + ENTRY_NAME(hpux_fork_wrapper) + ENTRY_NAME(sys_read) + ENTRY_NAME(sys_write) + ENTRY_NAME(sys_open) /* 5 */ + ENTRY_NAME(sys_close) + ENTRY_NAME(hpux_wait) + ENTRY_NAME(sys_creat) + ENTRY_NAME(sys_link) + ENTRY_NAME(sys_unlink) /* 10 */ + ENTRY_NAME(hpux_execv_wrapper) + ENTRY_NAME(sys_chdir) + ENTRY_NAME(sys_time) + ENTRY_NAME(sys_mknod) + ENTRY_NAME(sys_chmod) /* 15 */ + ENTRY_NAME(sys_chown) + ENTRY_NAME(hpux_brk) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_lseek) + ENTRY_NAME(sys_getpid) /* 20 */ + ENTRY_NAME(hpux_mount) + ENTRY_NAME(sys_oldumount) + ENTRY_NAME(sys_setuid) + ENTRY_NAME(sys_getuid) + ENTRY_NAME(sys_stime) /* 25 */ + ENTRY_NAME(hpux_ptrace) + ENTRY_NAME(sys_alarm) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_pause) + ENTRY_NAME(sys_utime) /* 30 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_access) + ENTRY_NAME(hpux_nice) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 35 */ + ENTRY_NAME(sys_sync) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_newstat) + ENTRY_NAME(hpux_setpgrp3) + ENTRY_NAME(sys_newlstat) /* 40 */ + ENTRY_NAME(sys_dup) + ENTRY_NAME(hpux_pipe_wrapper) + ENTRY_NAME(sys_times) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 45 */ + ENTRY_NAME(sys_setgid) + ENTRY_NAME(sys_getgid) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 50 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_ioctl) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 55 */ + ENTRY_NAME(sys_symlink) + ENTRY_NAME(hpux_utssys) + ENTRY_NAME(sys_readlink) + ENTRY_NAME(hpux_execve_wrapper) + ENTRY_NAME(sys_umask) /* 60 */ + ENTRY_NAME(sys_chroot) + ENTRY_NAME(sys_fcntl) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 65 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_sbrk) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 70 */ + ENTRY_NAME(sys_mmap) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 75 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 80 */ + ENTRY_NAME(sys_getpgid) + ENTRY_NAME(sys_setpgid) + ENTRY_NAME(sys_setitimer) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 85 */ + ENTRY_NAME(sys_getitimer) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_dup2) /* 90 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_newfstat) + ENTRY_NAME(sys_select) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 95 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 100 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 105 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 110 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 115 */ + ENTRY_NAME(sys_gettimeofday) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 120 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_fchown) + ENTRY_NAME(sys_fchmod) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 125 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_rename) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 130 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_sysconf) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 135 */ + ENTRY_NAME(sys_mkdir) + ENTRY_NAME(sys_rmdir) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 140 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_getrlimit) + ENTRY_NAME(sys_setrlimit) /* 145 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 150 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_lockf) /* 155 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 160 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 165 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 170 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 175 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 180 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_sigprocmask) /* 185 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 190 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_getdomainname) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 195 */ + ENTRY_NAME(hpux_statfs) + ENTRY_NAME(hpux_fstatfs) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_waitpid) /* 200 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 205 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 210 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 215 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 220 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 225 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 230 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 235 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 240 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 245 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 250 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 255 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 260 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 265 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 270 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_fchdir) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_accept) /* 275 */ + ENTRY_NAME(sys_bind) + ENTRY_NAME(sys_connect) + ENTRY_NAME(sys_getpeername) + ENTRY_NAME(sys_getsockname) + ENTRY_NAME(sys_getsockopt) /* 280 */ + ENTRY_NAME(sys_listen) + ENTRY_NAME(sys_recv) + ENTRY_NAME(sys_recvfrom) + ENTRY_NAME(sys_recvmsg) + ENTRY_NAME(sys_send) /* 285 */ + ENTRY_NAME(sys_sendmsg) + ENTRY_NAME(sys_sendto) + ENTRY_NAME(sys_setsockopt) + ENTRY_NAME(sys_shutdown) + ENTRY_NAME(sys_socket) /* 290 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 295 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 300 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 305 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 310 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 315 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 320 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 325 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 330 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_lchown) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_sysfs) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 335 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 340 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 345 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 350 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(sys_nanosleep) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 355 */ + ENTRY_NAME(hpux_getdents) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 360 */ + ENTRY_NAME(hpux_fstat64) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 365 */ + ENTRY_NAME(hpux_lstat64) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_stat64) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 370 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 375 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 380 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_setpgrp) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 385 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 390 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 395 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 400 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 405 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 410 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 415 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 420 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 425 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 430 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 435 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 440 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 445 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 450 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 455 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 460 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 465 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 470 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 475 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 480 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 485 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 490 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 495 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 500 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 505 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) /* 510 */ + ENTRY_NAME(hpux_unimplemented_wrapper) + ENTRY_NAME(hpux_unimplemented_wrapper) +.end + diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c new file mode 100644 index 00000000000..d7c80edf448 --- /dev/null +++ b/arch/parisc/hpux/fs.c @@ -0,0 +1,199 @@ +/* + * Implements HPUX syscalls. + * + * Copyright (C) 1999 Matthew Wilcox <willy with parisc-linux.org> + * Copyright (C) 2000 Michael Ang <mang with subcarrier.org> + * Copyright (C) 2000 John Marvin <jsm with parisc-linux.org> + * Copyright (C) 2000 Philipp Rumpf + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <linux/mm.h> +#include <linux/sched.h> +#include <linux/file.h> +#include <linux/smp_lock.h> +#include <linux/slab.h> +#include <linux/ptrace.h> +#include <asm/errno.h> +#include <asm/uaccess.h> + +int hpux_execve(struct pt_regs *regs) +{ + int error; + char *filename; + + filename = getname((char *) regs->gr[26]); + error = PTR_ERR(filename); + if (IS_ERR(filename)) + goto out; + + error = do_execve(filename, (char **) regs->gr[25], + (char **)regs->gr[24], regs); + + if (error == 0) { + task_lock(current); + current->ptrace &= ~PT_DTRACE; + task_unlock(current); + } + putname(filename); + +out: + return error; +} + +struct hpux_dirent { + loff_t d_off; + ino_t d_ino; + short d_reclen; + short d_namlen; + char d_name[1]; +}; + +struct getdents_callback { + struct hpux_dirent *current_dir; + struct hpux_dirent *previous; + int count; + int error; +}; + +#define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) +#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1)) + +static int filldir(void * __buf, const char * name, int namlen, loff_t offset, + ino_t ino, unsigned d_type) +{ + struct hpux_dirent * dirent; + struct getdents_callback * buf = (struct getdents_callback *) __buf; + int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); + + buf->error = -EINVAL; /* only used if we fail.. */ + if (reclen > buf->count) + return -EINVAL; + dirent = buf->previous; + if (dirent) + put_user(offset, &dirent->d_off); + dirent = buf->current_dir; + buf->previous = dirent; + put_user(ino, &dirent->d_ino); + put_user(reclen, &dirent->d_reclen); + put_user(namlen, &dirent->d_namlen); + copy_to_user(dirent->d_name, name, namlen); + put_user(0, dirent->d_name + namlen); + ((char *) dirent) += reclen; + buf->current_dir = dirent; + buf->count -= reclen; + return 0; +} + +#undef NAME_OFFSET +#undef ROUND_UP + +int hpux_getdents(unsigned int fd, struct hpux_dirent *dirent, unsigned int count) +{ + struct file * file; + struct hpux_dirent * lastdirent; + struct getdents_callback buf; + int error = -EBADF; + + file = fget(fd); + if (!file) + goto out; + + buf.current_dir = dirent; + buf.previous = NULL; + buf.count = count; + buf.error = 0; + + error = vfs_readdir(file, filldir, &buf); + if (error < 0) + goto out_putf; + error = buf.error; + lastdirent = buf.previous; + if (lastdirent) { + put_user(file->f_pos, &lastdirent->d_off); + error = count - buf.count; + } + +out_putf: + fput(file); +out: + return error; +} + +int hpux_mount(const char *fs, const char *path, int mflag, + const char *fstype, const char *dataptr, int datalen) +{ + return -ENOSYS; +} + +static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf) +{ + struct hpux_stat64 tmp; + + /* we probably want a different split here - is hpux 12:20? */ + + if (!new_valid_dev(stat->dev) || !new_valid_dev(stat->rdev)) + return -EOVERFLOW; + + memset(&tmp, 0, sizeof(tmp)); + tmp.st_dev = new_encode_dev(stat->dev); + tmp.st_ino = stat->ino; + tmp.st_mode = stat->mode; + tmp.st_nlink = stat->nlink; + tmp.st_uid = stat->uid; + tmp.st_gid = stat->gid; + tmp.st_rdev = new_encode_dev(stat->rdev); + tmp.st_size = stat->size; + tmp.st_atime = stat->atime.tv_sec; + tmp.st_mtime = stat->mtime.tv_sec; + tmp.st_ctime = stat->ctime.tv_sec; + tmp.st_blocks = stat->blocks; + tmp.st_blksize = stat->blksize; + return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; +} + +long hpux_stat64(char *filename, struct hpux_stat64 *statbuf) +{ + struct kstat stat; + int error = vfs_stat(filename, &stat); + + if (!error) + error = cp_hpux_stat(&stat, statbuf); + + return error; +} + +long hpux_fstat64(unsigned int fd, struct hpux_stat64 *statbuf) +{ + struct kstat stat; + int error = vfs_fstat(fd, &stat); + + if (!error) + error = cp_hpux_stat(&stat, statbuf); + + return error; +} + +long hpux_lstat64(char *filename, struct hpux_stat64 *statbuf) +{ + struct kstat stat; + int error = vfs_lstat(filename, &stat); + + if (!error) + error = cp_hpux_stat(&stat, statbuf); + + return error; +} diff --git a/arch/parisc/hpux/gate.S b/arch/parisc/hpux/gate.S new file mode 100644 index 00000000000..2680a1c0fa7 --- /dev/null +++ b/arch/parisc/hpux/gate.S @@ -0,0 +1,116 @@ +/* + * + * Linux/PARISC Project (http://www.parisc-linux.org/) + * + * System call entry code Copyright (c) Matthew Wilcox 1999 <willy@bofh.ai> + * Licensed under the GNU GPL. + * thanks to Philipp Rumpf, Mike Shaver and various others + * sorry about the wall, puffin.. + */ + +#include <asm/assembly.h> +#include <asm/offsets.h> +#include <asm/unistd.h> +#include <asm/errno.h> + +#ifdef __LP64__ + .level 2.0w +#else + .level 1.1 +#endif + .text + +#ifdef __LP64__ +#define FRAME_SIZE 128 +#else +#define FRAME_SIZE 64 +#endif + .import hpux_call_table + .import hpux_syscall_exit,code + .export hpux_gateway_page + + .align 4096 +hpux_gateway_page: + nop +#ifdef __LP64__ +#warning NEEDS WORK for 64-bit +#endif + ldw -64(%r30), %r29 ;! 8th argument + ldw -60(%r30), %r19 ;! 7th argument + ldw -56(%r30), %r20 ;! 6th argument + ldw -52(%r30), %r21 ;! 5th argument + gate .+8, %r0 /* become privileged */ + mtsp %r0,%sr4 /* get kernel space into sr4 */ + mtsp %r0,%sr5 /* get kernel space into sr5 */ + mtsp %r0,%sr6 /* get kernel space into sr6 */ + mfsp %sr7,%r1 /* save user sr7 */ + mtsp %r1,%sr3 /* and store it in sr3 */ + + mtctl %r30,%cr28 + mfctl %cr30,%r1 + xor %r1,%r30,%r30 /* ye olde xor trick */ + xor %r1,%r30,%r1 + xor %r1,%r30,%r30 + ldo TASK_SZ_ALGN+FRAME_SIZE(%r30),%r30 /* set up kernel stack */ + + /* N.B.: It is critical that we don't set sr7 to 0 until r30 + * contains a valid kernel stack pointer. It is also + * critical that we don't start using the kernel stack + * until after sr7 has been set to 0. + */ + + mtsp %r0,%sr7 /* get kernel space into sr7 */ + STREG %r1,TASK_PT_GR30-TASK_SZ_ALGN-FRAME_SIZE(%r30) /* save usp */ + ldo -TASK_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr in %r1 */ + + /* Save some registers for sigcontext and potential task + switch (see entry.S for the details of which ones are + saved/restored). TASK_PT_PSW is zeroed so we can see whether + a process is on a syscall or not. For an interrupt the real + PSW value is stored. This is needed for gdb and sys_ptrace. */ + STREG %r0, TASK_PT_PSW(%r1) + STREG %r2, TASK_PT_GR2(%r1) /* preserve rp */ + STREG %r19, TASK_PT_GR19(%r1) /* 7th argument */ + STREG %r20, TASK_PT_GR20(%r1) /* 6th argument */ + STREG %r21, TASK_PT_GR21(%r1) /* 5th argument */ + STREG %r22, TASK_PT_GR22(%r1) /* syscall # */ + STREG %r23, TASK_PT_GR23(%r1) /* 4th argument */ + STREG %r24, TASK_PT_GR24(%r1) /* 3rd argument */ + STREG %r25, TASK_PT_GR25(%r1) /* 2nd argument */ + STREG %r26, TASK_PT_GR26(%r1) /* 1st argument */ + STREG %r27, TASK_PT_GR27(%r1) /* user dp */ + STREG %r28, TASK_PT_GR28(%r1) /* return value 0 */ + STREG %r28, TASK_PT_ORIG_R28(%r1) /* return value 0 (saved for signals) */ + STREG %r29, TASK_PT_GR29(%r1) /* 8th argument */ + STREG %r31, TASK_PT_GR31(%r1) /* preserve syscall return ptr */ + + ldo TASK_PT_FR0(%r1), %r27 /* save fpregs from the kernel */ + save_fp %r27 /* or potential task switch */ + + mfctl %cr11, %r27 /* i.e. SAR */ + STREG %r27, TASK_PT_SAR(%r1) + + loadgp + + stw %r21, -52(%r30) ;! 5th argument + stw %r20, -56(%r30) ;! 6th argument + stw %r19, -60(%r30) ;! 7th argument + stw %r29, -64(%r30) ;! 8th argument + + ldil L%hpux_call_table, %r21 + ldo R%hpux_call_table(%r21), %r21 + comiclr,>>= __NR_HPUX_syscalls, %r22, %r0 + b,n syscall_nosys + ldwx,s %r22(%r21), %r21 + ldil L%hpux_syscall_exit,%r2 + be 0(%sr7,%r21) + ldo R%hpux_syscall_exit(%r2),%r2 + +syscall_nosys: + ldil L%hpux_syscall_exit,%r1 + be R%hpux_syscall_exit(%sr7,%r1) + ldo -ENOSYS(%r0),%r28 + + .align 4096 + .export end_hpux_gateway_page +end_hpux_gateway_page: diff --git a/arch/parisc/hpux/ioctl.c b/arch/parisc/hpux/ioctl.c new file mode 100644 index 00000000000..b34b4f3c60e --- /dev/null +++ b/arch/parisc/hpux/ioctl.c @@ -0,0 +1,73 @@ +/* + * Implements some necessary HPUX ioctls. + * + * Copyright (C) 1999-2002 Matthew Wilcox <willy with parisc-linux.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* + * Supported ioctls: + * TCGETA + * TCSETA + * TCSETAW + * TCSETAF + * TCSBRK + * TCXONC + * TCFLSH + * TIOCGWINSZ + * TIOCSWINSZ + * TIOCGPGRP + * TIOCSPGRP + */ + +#include <linux/sched.h> +#include <linux/smp_lock.h> +#include <linux/syscalls.h> +#include <asm/errno.h> +#include <asm/ioctl.h> +#include <asm/termios.h> +#include <asm/uaccess.h> + +static int hpux_ioctl_t(int fd, unsigned long cmd, unsigned long arg) +{ + int result = -EOPNOTSUPP; + int nr = _IOC_NR(cmd); + switch (nr) { + case 106: + result = sys_ioctl(fd, TIOCSWINSZ, arg); + break; + case 107: + result = sys_ioctl(fd, TIOCGWINSZ, arg); + break; + } + return result; +} + +int hpux_ioctl(int fd, unsigned long cmd, unsigned long arg) +{ + int result = -EOPNOTSUPP; + int type = _IOC_TYPE(cmd); + switch (type) { + case 'T': + /* Our structures are now compatible with HPUX's */ + result = sys_ioctl(fd, cmd, arg); + break; + case 't': + result = hpux_ioctl_t(fd, cmd, arg); + break; + } + return result; +} diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c new file mode 100644 index 00000000000..a64fd48fbfb --- /dev/null +++ b/arch/parisc/hpux |