Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

sysirix.c File Reference

#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/pagemap.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <linux/malloc.h>
#include <linux/swap.h>
#include <linux/errno.h>
#include <linux/timex.h>
#include <linux/times.h>
#include <linux/elf.h>
#include <linux/msg.h>
#include <linux/shm.h>
#include <linux/smp.h>
#include <linux/smp_lock.h>
#include <linux/utsname.h>
#include <linux/file.h>
#include <asm/ptrace.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
#include <asm/sgialib.h>
#include <asm/inventory.h>

Include dependency graph for sysirix.c:

Go to the source code of this file.

Defines

#define MP_NPROCS   1
#define MP_NAPROCS   2
#define MP_PGSIZE   14
#define PR_MAXPROCS   1
#define PR_ISBLOCKED   2
#define PR_SETSTACKSIZE   3
#define PR_GETSTACKSIZE   4
#define PR_MAXPPROCS   5
#define PR_UNBLKONEXEC   6
#define PR_SETEXITSIG   8
#define PR_RESIDENT   9
#define PR_ATTACHADDR   10
#define PR_DETACHADDR   11
#define PR_TERMCHILD   12
#define PR_GETSHMASK   13
#define PR_GETNSHARE   14
#define PR_COREPID   15
#define PR_ATTACHADDRPERM   16
#define PR_PTHREADEXIT   17
#define SGI_SYSID   1
#define SGI_INVENT   5
#define SGI_INV_SIZEOF   1
#define SGI_INV_READ   2
#define SGI_RDNAME   6
#define SGI_SETNVRAM   8
#define SGI_GETNVRAM   9
#define SGI_SETPGID   21
#define SGI_SYSCONF   22
#define SGI_PATHCONF   24
#define SGI_SETGROUPS   40
#define SGI_GETGROUPS   41
#define SGI_RUSAGE   56
#define SGI_SSYNC   62
#define SGI_GETSID   65
#define SGI_ELFMAP   68
#define SGI_TOSSTSAVE   108
#define SGI_FP_BCOPY   129
#define SGI_PHYSP   1011
#define IRIX_MAP_AUTOGROW   0x40
#define NAME_OFFSET32(de)   ((int) ((de)->d_name - (char *) (de)))
#define ROUND_UP32(x)   (((x)+sizeof(u32)-1) & ~(sizeof(u32)-1))
#define NAME_OFFSET64(de)   ((int) ((de)->d_name - (char *) (de)))
#define ROUND_UP64(x)   (((x)+sizeof(u64)-1) & ~(sizeof(u64)-1))
#define IRIX_F_ALLOCSP   10

Functions

asmlinkage int irix_sysmp (struct pt_regs *regs)
asmlinkage int irix_prctl (struct pt_regs *regs)
unsigned long irix_mapelf (int fd, struct elf_phdr *user_phdrp, int cnt)
asmlinkage int sys_setpgid (pid_t pid, pid_t pgid)
void sys_sync (void)
asmlinkage int sys_getsid (pid_t pid)
asmlinkage long sys_write (unsigned int fd, const char *buf, unsigned long count)
asmlinkage long sys_lseek (unsigned int fd, off_t offset, unsigned int origin)
asmlinkage int sys_getgroups (int gidsetsize, gid_t *grouplist)
asmlinkage int sys_setgroups (int gidsetsize, gid_t *grouplist)
int getrusage (struct task_struct *p, int who, struct rusage *ru)
char * prom_getenv (char *name)
long prom_setenv (char *name, char *value)
asmlinkage int irix_syssgi (struct pt_regs *regs)
asmlinkage int irix_gtime (struct pt_regs *regs)
int vm_enough_memory (long pages)
asmlinkage int irix_brk (unsigned long brk)
asmlinkage int irix_getpid (struct pt_regs *regs)
asmlinkage int irix_getuid (struct pt_regs *regs)
asmlinkage int irix_getgid (struct pt_regs *regs)
asmlinkage int irix_stime (int value)
int do_setitimer (int which, struct itimerval *value, struct itimerval *ovalue)
static void jiffiestotv (unsigned long jiffies, struct timeval *value)
static void getitimer_real (struct itimerval *value)
asmlinkage unsigned int irix_alarm (unsigned int seconds)
asmlinkage int irix_pause (void)
asmlinkage int sys_mount (char *dev_name, char *dir_name, char *type, unsigned long new_flags, void *data)
asmlinkage int irix_mount (char *dev_name, char *dir_name, unsigned long flags, char *type, void *data, int datalen)
asmlinkage int irix_statfs (const char *path, struct irix_statfs *buf, int len, int fs_type)
asmlinkage int irix_fstatfs (unsigned int fd, struct irix_statfs *buf)
asmlinkage int sys_setsid (void)
asmlinkage int irix_setpgrp (int flags)
asmlinkage int irix_times (struct tms *tbuf)
asmlinkage int irix_exec (struct pt_regs *regs)
asmlinkage int irix_exece (struct pt_regs *regs)
asmlinkage unsigned long irix_gethostid (void)
asmlinkage unsigned long irix_sethostid (unsigned long val)
asmlinkage int sys_socket (int family, int type, int protocol)
asmlinkage int irix_socket (int family, int type, int protocol)
asmlinkage int irix_getdomainname (char *name, int len)
asmlinkage unsigned long irix_getpagesize (void)
asmlinkage int irix_msgsys (int opcode, unsigned long arg0, unsigned long arg1, unsigned long arg2, unsigned long arg3, unsigned long arg4)
asmlinkage int irix_shmsys (int opcode, unsigned long arg0, unsigned long arg1, unsigned long arg2, unsigned long arg3)
asmlinkage int irix_semsys (int opcode, unsigned long arg0, unsigned long arg1, unsigned long arg2, int arg3)
asmlinkage int sys_llseek (unsigned int fd, unsigned long offset_high, unsigned long offset_low, loff_t *result, unsigned int origin)
asmlinkage int irix_lseek64 (int fd, int _unused, int offhi, int offlow, int base)
asmlinkage int irix_sginap (int ticks)
asmlinkage int irix_sgikopt (char *istring, char *ostring, int len)
asmlinkage int irix_gettimeofday (struct timeval *tv)
asmlinkage unsigned long irix_mmap32 (unsigned long addr, size_t len, int prot, int flags, int fd, off_t offset)
asmlinkage int irix_madvise (unsigned long addr, int len, int behavior)
asmlinkage int irix_pagelock (char *addr, int len, int op)
asmlinkage int irix_quotactl (struct pt_regs *regs)
asmlinkage int irix_BSDsetpgrp (int pid, int pgrp)
asmlinkage int irix_systeminfo (int cmd, char *buf, int cnt)
asmlinkage int irix_uname (struct iuname *buf)
static u32 linux_to_irix_dev_t (dev_t t)
static int irix_xstat32_xlate (struct stat *kb, void *ubuf)
static void irix_xstat64_xlate (struct stat *sb)
asmlinkage int sys_newstat (char *filename, struct stat *statbuf)
asmlinkage int irix_xstat (int version, char *filename, struct stat *statbuf)
asmlinkage int sys_newlstat (char *filename, struct stat *statbuf)
asmlinkage int irix_lxstat (int version, char *filename, struct stat *statbuf)
asmlinkage int sys_newfstat (unsigned int fd, struct stat *statbuf)
asmlinkage int irix_fxstat (int version, int fd, struct stat *statbuf)
asmlinkage int sys_mknod (const char *filename, int mode, dev_t dev)
asmlinkage int irix_xmknod (int ver, char *filename, int mode, dev_t dev)
asmlinkage int irix_swapctl (int cmd, char *arg)
asmlinkage int irix_statvfs (char *fname, struct irix_statvfs *buf)
asmlinkage int irix_fstatvfs (int fd, struct irix_statvfs *buf)
asmlinkage int irix_priocntl (struct pt_regs *regs)
asmlinkage int irix_sigqueue (int pid, int sig, int code, int val)
asmlinkage int sys_truncate (const char *path, unsigned long length)
asmlinkage int sys_ftruncate (unsigned int fd, unsigned long length)
asmlinkage int irix_truncate64 (char *name, int pad, int size1, int size2)
asmlinkage int irix_ftruncate64 (int fd, int pad, int size1, int size2)
asmlinkage unsigned long sys_mmap (unsigned long addr, size_t len, int prot, int flags, int fd, off_t offset)
asmlinkage int irix_mmap64 (struct pt_regs *regs)
asmlinkage int irix_dmi (struct pt_regs *regs)
asmlinkage int irix_pread (int fd, char *buf, int cnt, int off64, int off1, int off2)
asmlinkage int irix_pwrite (int fd, char *buf, int cnt, int off64, int off1, int off2)
asmlinkage int irix_sgifastpath (int cmd, unsigned long arg0, unsigned long arg1, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5)
asmlinkage int irix_statvfs64 (char *fname, struct irix_statvfs64 *buf)
asmlinkage int irix_fstatvfs64 (int fd, struct irix_statvfs *buf)
asmlinkage int irix_getmountid (char *fname, unsigned long *midbuf)
asmlinkage int irix_nsproc (unsigned long entry, unsigned long mask, unsigned long arg, unsigned long sp, int slen)
static int irix_filldir32 (void *__buf, const char *name, int namlen, off_t offset, ino_t ino)
asmlinkage int irix_ngetdents (unsigned int fd, void *dirent, unsigned int count, int *eob)
static int irix_filldir64 (void *__buf, const char *name, int namlen, off_t offset, ino_t ino)
asmlinkage int irix_getdents64 (int fd, void *dirent, int cnt)
asmlinkage int irix_ngetdents64 (int fd, void *dirent, int cnt, int *eob)
asmlinkage int irix_uadmin (unsigned long op, unsigned long func, unsigned long arg)
asmlinkage int irix_utssys (char *inbuf, int arg, int type, char *outbuf)
asmlinkage long sys_fcntl (unsigned int fd, unsigned int cmd, unsigned long arg)
asmlinkage int irix_fcntl (int fd, int cmd, int arg)
asmlinkage int irix_ulimit (int cmd, int arg)
asmlinkage int irix_unimp (struct pt_regs *regs)


Define Documentation

#define IRIX_F_ALLOCSP   10
 

Definition at line 2343 of file sysirix.c.

Referenced by irix_fcntl().

#define IRIX_MAP_AUTOGROW   0x40
 

Definition at line 1102 of file sysirix.c.

Referenced by irix_mmap32(), and irix_mmap64().

#define MP_NAPROCS   2
 

Definition at line 39 of file sysirix.c.

Referenced by irix_sysmp().

#define MP_NPROCS   1
 

Definition at line 38 of file sysirix.c.

Referenced by irix_sysmp().

#define MP_PGSIZE   14
 

Definition at line 40 of file sysirix.c.

Referenced by irix_sysmp().

#define NAME_OFFSET32 de   )     ((int) ((de)->d_name - (char *) (de)))
 

Definition at line 1983 of file sysirix.c.

Referenced by irix_filldir32().

#define NAME_OFFSET64 de   )     ((int) ((de)->d_name - (char *) (de)))
 

Definition at line 2096 of file sysirix.c.

Referenced by irix_filldir64().

#define PR_ATTACHADDR   10
 

Definition at line 81 of file sysirix.c.

Referenced by irix_prctl().

#define PR_ATTACHADDRPERM   16
 

Definition at line 87 of file sysirix.c.

Referenced by irix_prctl().

#define PR_COREPID   15
 

Definition at line 86 of file sysirix.c.

Referenced by irix_prctl().

#define PR_DETACHADDR   11
 

Definition at line 82 of file sysirix.c.

Referenced by irix_prctl().

#define PR_GETNSHARE   14
 

Definition at line 85 of file sysirix.c.

Referenced by irix_prctl().

#define PR_GETSHMASK   13
 

Definition at line 84 of file sysirix.c.

Referenced by irix_prctl().

#define PR_GETSTACKSIZE   4
 

Definition at line 76 of file sysirix.c.

Referenced by irix_prctl().

#define PR_ISBLOCKED   2
 

Definition at line 74 of file sysirix.c.

Referenced by irix_prctl().

#define PR_MAXPPROCS   5
 

Definition at line 77 of file sysirix.c.

Referenced by irix_prctl().

#define PR_MAXPROCS   1
 

Definition at line 73 of file sysirix.c.

Referenced by irix_prctl().

#define PR_PTHREADEXIT   17
 

Definition at line 88 of file sysirix.c.

Referenced by irix_prctl().

#define PR_RESIDENT   9
 

Definition at line 80 of file sysirix.c.

Referenced by irix_prctl().

#define PR_SETEXITSIG   8
 

Definition at line 79 of file sysirix.c.

Referenced by irix_prctl().

#define PR_SETSTACKSIZE   3
 

Definition at line 75 of file sysirix.c.

Referenced by irix_prctl().

#define PR_TERMCHILD   12
 

Definition at line 83 of file sysirix.c.

Referenced by irix_prctl().

#define PR_UNBLKONEXEC   6
 

Definition at line 78 of file sysirix.c.

Referenced by irix_prctl().

#define ROUND_UP32 x   )     (((x)+sizeof(u32)-1) & ~(sizeof(u32)-1))
 

Definition at line 1984 of file sysirix.c.

Referenced by irix_filldir32().

#define ROUND_UP64 x   )     (((x)+sizeof(u64)-1) & ~(sizeof(u64)-1))
 

Definition at line 2097 of file sysirix.c.

Referenced by irix_filldir64().

#define SGI_ELFMAP   68
 

Definition at line 264 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_FP_BCOPY   129
 

Definition at line 266 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_GETGROUPS   41
 

Definition at line 260 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_GETNVRAM   9
 

Definition at line 255 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_GETSID   65
 

Definition at line 263 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_INV_READ   2
 

Definition at line 252 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_INV_SIZEOF   1
 

Definition at line 251 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_INVENT   5
 

Definition at line 250 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_PATHCONF   24
 

Definition at line 258 of file sysirix.c.

#define SGI_PHYSP   1011
 

Definition at line 267 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_RDNAME   6
 

Definition at line 253 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_RUSAGE   56
 

Definition at line 261 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_SETGROUPS   40
 

Definition at line 259 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_SETNVRAM   8
 

Definition at line 254 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_SETPGID   21
 

Definition at line 256 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_SSYNC   62
 

Definition at line 262 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_SYSCONF   22
 

Definition at line 257 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_SYSID   1
 

Definition at line 249 of file sysirix.c.

Referenced by irix_syssgi().

#define SGI_TOSSTSAVE   108
 

Definition at line 265 of file sysirix.c.

Referenced by irix_syssgi().


Function Documentation

int do_setitimer int  which,
struct itimerval value,
struct itimerval ovalue
 

Definition at line 107 of file itimer.c.

static void getitimer_real struct itimerval value  )  [inline, static]
 

Definition at line 651 of file sysirix.c.

References add_timer(), current, del_timer(), itimerval::it_interval, itimerval::it_value, jiffies, jiffiestotv(), now, and val.

Referenced by irix_alarm().

Here is the call graph for this function:

int getrusage struct task_struct *  p,
int  who,
struct rusage ru
 

Definition at line 987 of file sys.c.

asmlinkage unsigned int irix_alarm unsigned int  seconds  ) 
 

Definition at line 670 of file sysirix.c.

References current, del_timer(), do_setitimer(), getitimer_real(), itimerval::it_interval, itimerval::it_value, ITIMER_REAL, lock_kernel, timeval::tv_sec, timeval::tv_usec, and unlock_kernel.

Here is the call graph for this function:

asmlinkage int irix_brk unsigned long  brk  ) 
 

Definition at line 529 of file sysirix.c.

References current, do_mmap(), do_munmap(), ENOMEM, lock_kernel, MAP_FIXED, MAP_PRIVATE, NULL, out, PAGE_ALIGN, PAGE_SHIFT, PAGE_SIZE, PROT_EXEC, PROT_READ, PROT_WRITE, ret, RLIM_INFINITY, RLIMIT_DATA, unlock_kernel, and vm_enough_memory().

Here is the call graph for this function:

asmlinkage int irix_BSDsetpgrp int  pid,
int  pgrp
 

Definition at line 1167 of file sysirix.c.

References current, error, lock_kernel, printk, sys_setpgid, sys_setsid, and unlock_kernel.

asmlinkage int irix_dmi struct pt_regs regs  ) 
 

Definition at line 1752 of file sysirix.c.

References current, EINVAL, lock_kernel, printk, and unlock_kernel.

asmlinkage int irix_exec struct pt_regs regs  ) 
 

Definition at line 880 of file sysirix.c.

References do_execve(), error, filename, getname(), lock_kernel, out, pt_regs::regs, and unlock_kernel.

Here is the call graph for this function:

asmlinkage int irix_exece struct pt_regs regs  ) 
 

Definition at line 901 of file sysirix.c.

References do_execve(), error, filename, getname(), lock_kernel, out, pt_regs::regs, and unlock_kernel.

Here is the call graph for this function:

asmlinkage int irix_fcntl int  fd,
int  cmd,
int  arg
 

Definition at line 2345 of file sysirix.c.

References current, IRIX_F_ALLOCSP, lock_kernel, printk, sys_fcntl, and unlock_kernel.

static int irix_filldir32 void *  __buf,
const char *  name,
int  namlen,
off_t  offset,
ino_t  ino
[static]
 

Definition at line 1986 of file sysirix.c.

References __put_user, buf, copy_to_user, irix_dirent32_callback::count, irix_dirent32_callback::current_dir, irix_dirent32::d_ino, irix_dirent32::d_name, irix_dirent32::d_off, irix_dirent32::d_reclen, EINVAL, irix_dirent32_callback::error, NAME_OFFSET32, irix_dirent32_callback::previous, printk, and ROUND_UP32.

Referenced by irix_ngetdents().

static int irix_filldir64 void *  __buf,
const char *  name,
int  namlen,
off_t  offset,
ino_t  ino
[static]
 

Definition at line 2099 of file sysirix.c.

References __copy_to_user, __put_user, buf, irix_dirent64_callback::count, irix_dirent64_callback::curr, irix_dirent64::d_ino, irix_dirent64::d_name, irix_dirent64::d_off, irix_dirent64::d_reclen, EINVAL, irix_dirent64_callback::error, NAME_OFFSET64, irix_dirent64_callback::previous, and ROUND_UP64.

Referenced by irix_getdents64(), and irix_ngetdents64().

asmlinkage int irix_fstatfs unsigned int  fd,
struct irix_statfs buf
 

Definition at line 780 of file sysirix.c.

References __put_user, EBADF, ENODEV, ENOENT, ENOSYS, error, irix_statfs::f_bfree, statfs::f_bfree, irix_statfs::f_blocks, statfs::f_blocks, irix_statfs::f_bsize, statfs::f_bsize, irix_statfs::f_ffree, statfs::f_ffree, irix_statfs::f_files, statfs::f_files, irix_statfs::f_fname, irix_statfs::f_fpack, irix_statfs::f_frsize, statfs::f_frsize, irix_statfs::f_type, statfs::f_type, fget(), file, fput(), get_ds, get_fs, i, lock_kernel, out, set_fs, unlock_kernel, verify_area(), and VERIFY_WRITE.

Here is the call graph for this function:

asmlinkage int irix_fstatvfs int  fd,
struct irix_statvfs buf
 

Definition at line 1570 of file sysirix.c.

References __clear_user, __put_user, current, EBADF, ENODEV, ENOENT, ENOSYS, error, irix_statvfs::f_basetype, irix_statvfs::f_bavail, irix_statvfs::f_bfree, statfs::f_bfree, irix_statvfs::f_blocks, statfs::f_blocks, irix_statvfs::f_bsize, statfs::f_bsize, irix_statvfs::f_favail, irix_statvfs::f_ffree, statfs::f_ffree, irix_statvfs::f_files, statfs::f_files, irix_statvfs::f_flag, irix_statvfs::f_frsize, statfs::f_frsize, irix_statvfs::f_fsid, statfs::f_fsid, irix_statvfs::f_fstr, statfs::f_namelen, irix_statvfs::f_namemax, fget(), file, fput(), get_ds, get_fs, i, lock_kernel, out, printk, set_fs, unlock_kernel, __kernel_fsid_t::val, verify_area(), and VERIFY_WRITE.

Here is the call graph for this function:

asmlinkage int irix_fstatvfs64 int  fd,
struct irix_statvfs buf
 

Definition at line 1864 of file sysirix.c.

References __clear_user, __put_user, current, EBADF, ENODEV, ENOENT, ENOSYS, error, irix_statvfs::f_basetype, irix_statvfs::f_bavail, irix_statvfs::f_bfree, statfs::f_bfree, irix_statvfs::f_blocks, statfs::f_blocks, irix_statvfs::f_bsize, statfs::f_bsize, irix_statvfs::f_favail, irix_statvfs::f_ffree, statfs::f_ffree, irix_statvfs::f_files, statfs::f_files, irix_statvfs::f_flag, irix_statvfs::f_frsize, statfs::f_frsize, irix_statvfs::f_fsid, statfs::f_fsid, irix_statvfs::f_fstr, statfs::f_namelen, irix_statvfs::f_namemax, fget(), file, fput(), get_ds, get_fs, i, lock_kernel, out, printk, set_fs, unlock_kernel, __kernel_fsid_t::val, verify_area(), and VERIFY_WRITE.

Here is the call graph for this function: