diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
commit | 0ae8dceaebe3659ee0c3352c08125f403e77ebca (patch) | |
tree | 5085c389f09da78182b899d19fe1068b619a69dd /include/asm-mips64 | |
parent | 273767781288c35c9d679e908672b9996cda4c34 (diff) |
Merge with 2.3.10.
Diffstat (limited to 'include/asm-mips64')
-rw-r--r-- | include/asm-mips64/current.h | 2 | ||||
-rw-r--r-- | include/asm-mips64/errno.h | 18 | ||||
-rw-r--r-- | include/asm-mips64/offset.h | 25 | ||||
-rw-r--r-- | include/asm-mips64/processor.h | 10 | ||||
-rw-r--r-- | include/asm-mips64/ptrace.h | 2 | ||||
-rw-r--r-- | include/asm-mips64/sigcontext.h | 22 | ||||
-rw-r--r-- | include/asm-mips64/signal.h | 35 | ||||
-rw-r--r-- | include/asm-mips64/ucontext.h | 22 | ||||
-rw-r--r-- | include/asm-mips64/unistd.h | 5 | ||||
-rw-r--r-- | include/asm-mips64/watch.h | 38 |
10 files changed, 116 insertions, 63 deletions
diff --git a/include/asm-mips64/current.h b/include/asm-mips64/current.h index 75d282059..0293e6ad8 100644 --- a/include/asm-mips64/current.h +++ b/include/asm-mips64/current.h @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: current.h,v 1.1 1999/08/18 21:46:54 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive diff --git a/include/asm-mips64/errno.h b/include/asm-mips64/errno.h index c4f47ee4a..b2f507f4f 100644 --- a/include/asm-mips64/errno.h +++ b/include/asm-mips64/errno.h @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: errno.h,v 1.1 1999/08/18 23:37:51 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -143,19 +143,13 @@ #define ENOMEDIUM 159 /* No medium found */ #define EMEDIUMTYPE 160 /* Wrong medium type */ -/* - * IRIX 5 error number start from 1000. - * Stupid enough; ECANCELED gets redefined with a different value ... -#define ECANCELED 1000 - */ +#define EDQUOT 1133 /* Quota exceeded */ -/* - * IRIX 4 compatibility error numbers. - */ -#define EDQUOT 1133 /* Quota exceeded */ -#define ENFSREMOTE 1134 /* ??? */ +#ifdef __KERNEL__ /* The biggest error number defined here or in <linux/errno.h>. */ -#define EMAXERRNO 1134 +#define EMAXERRNO 1133 + +#endif /* __KERNEL__ */ #endif /* _ASM_ERRNO_H */ diff --git a/include/asm-mips64/offset.h b/include/asm-mips64/offset.h index 488206f1d..e37b353aa 100644 --- a/include/asm-mips64/offset.h +++ b/include/asm-mips64/offset.h @@ -84,19 +84,16 @@ #define MM_CONTEXT 88 /* Linux sigcontext offsets. */ -#define SC_REGMASK 0 -#define SC_STATUS 4 -#define SC_PC 8 -#define SC_REGS 16 -#define SC_FPREGS 272 -#define SC_OWNEDFP 528 -#define SC_FPC_CSR 532 -#define SC_FPC_EIR 536 -#define SC_SSFLAGS 540 -#define SC_MDHI 544 -#define SC_MDLO 552 -#define SC_CAUSE 560 -#define SC_BADVADDR 564 -#define SC_SIGSET 568 +#define SC_REGS 0 +#define SC_FPREGS 256 +#define SC_MDHI 512 +#define SC_MDLO 520 +#define SC_PC 528 +#define SC_STATUS 536 +#define SC_OWNEDFP 540 +#define SC_FPC_CSR 544 +#define SC_FPC_EIR 548 +#define SC_CAUSE 552 +#define SC_BADVADDR 556 #endif /* !(_MIPS_OFFSET_H) */ diff --git a/include/asm-mips64/processor.h b/include/asm-mips64/processor.h index 989f37de6..d4251affc 100644 --- a/include/asm-mips64/processor.h +++ b/include/asm-mips64/processor.h @@ -1,4 +1,4 @@ -/* $Id: processor.h,v 1.1 1999/08/18 23:37:51 ralf Exp $ +/* $Id: processor.h,v 1.3 1999/09/27 20:56:47 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -209,7 +209,13 @@ extern int (*user_mode)(struct pt_regs *); /* * Do necessary setup to start up a newly executed thread. */ -extern void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp); +#define start_thread(regs, new_pc, new_sp) do { \ + /* New thread looses kernel privileges. */ \ + regs->cp0_status = (regs->cp0_status & ~(ST0_CU0|ST0_KSU)) | KSU_USER;\ + regs->cp0_epc = new_pc; \ + regs->regs[29] = new_sp; \ + current->tss.current_ds = USER_DS; \ +} while (0) /* Allocation and freeing of basic task resources. */ /* diff --git a/include/asm-mips64/ptrace.h b/include/asm-mips64/ptrace.h index 22d3f909e..23c76b6b3 100644 --- a/include/asm-mips64/ptrace.h +++ b/include/asm-mips64/ptrace.h @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: ptrace.h,v 1.1 1999/08/18 21:46:55 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive diff --git a/include/asm-mips64/sigcontext.h b/include/asm-mips64/sigcontext.h index 23cdb5cd6..215d56124 100644 --- a/include/asm-mips64/sigcontext.h +++ b/include/asm-mips64/sigcontext.h @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: sigcontext.h,v 1.2 1999/09/27 16:01:40 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -15,22 +15,18 @@ * in arch/mips/tools/offset.c */ struct sigcontext { - unsigned int sc_regmask; /* Unused */ - unsigned int sc_status; - unsigned long long sc_pc; unsigned long long sc_regs[32]; - unsigned long long sc_fpregs[32]; /* Unused */ - unsigned int sc_ownedfp; - unsigned int sc_fpc_csr; /* Unused */ - unsigned int sc_fpc_eir; /* Unused */ - unsigned int sc_ssflags; /* Unused */ + unsigned long long sc_fpregs[32]; unsigned long long sc_mdhi; unsigned long long sc_mdlo; + unsigned long long sc_pc; + unsigned int sc_status; + unsigned int sc_ownedfp; + unsigned int sc_fpc_csr; + unsigned int sc_fpc_eir; - unsigned int sc_cause; /* Unused */ - unsigned int sc_badvaddr; /* Unused */ - - unsigned int sc_sigset[4]; /* kernel's sigset_t */ + unsigned int sc_cause; + unsigned int sc_badvaddr; }; #endif /* _ASM_SIGCONTEXT_H */ diff --git a/include/asm-mips64/signal.h b/include/asm-mips64/signal.h index 1f9291794..a5fa8ce6b 100644 --- a/include/asm-mips64/signal.h +++ b/include/asm-mips64/signal.h @@ -1,10 +1,11 @@ -/* $Id$ +/* $Id: signal.h,v 1.2 1999/09/27 16:01:40 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 1995 - 1999 by Ralf Baechle + * Copyright (C) 1999 Silicon Graphics, Inc. */ #ifndef _ASM_SIGNAL_H #define _ASM_SIGNAL_H @@ -12,11 +13,11 @@ #include <linux/types.h> #define _NSIG 128 -#define _NSIG_BPW 32 +#define _NSIG_BPW 64 #define _NSIG_WORDS (_NSIG / _NSIG_BPW) typedef struct { - __u32 sig[_NSIG_WORDS]; + long sig[_NSIG_WORDS]; } sigset_t; typedef unsigned long old_sigset_t; /* at least 32 bits */ @@ -74,16 +75,19 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */ * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single * Unix names RESETHAND and NODEFER respectively. */ -#define SA_STACK 0x00000001 -#define SA_RESETHAND 0x00000002 -#define SA_RESTART 0x00000004 +#define SA_ONSTACK 0x08000000 +#define SA_RESETHAND 0x80000000 +#define SA_RESTART 0x10000000 #define SA_SIGINFO 0x00000008 -#define SA_NODEFER 0x00000010 +#define SA_NODEFER 0x40000000 #define SA_NOCLDWAIT 0x00010000 /* Not supported yet */ -#define SA_NOCLDSTOP 0x00020000 +#define SA_NOCLDSTOP 0x00000001 #define SA_NOMASK SA_NODEFER #define SA_ONESHOT SA_RESETHAND +#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ + +#define SA_RESTORER 0x04000000 /* * sigaltstack controls @@ -95,18 +99,18 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */ #define SIGSTKSZ 8192 #ifdef __KERNEL__ + /* * These values of sa_flags are used only by the kernel as part of the * irq handling routines. * - * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the - * SA_RESTART flag to get restarting signals (which were the default long ago) + * SA_INTERRUPT is also used by the irq handling routines. * SA_SHIRQ flag is for shared interrupt support on PCI and EISA. */ -#define SA_INTERRUPT 0x01000000 /* interrupt handling */ -#define SA_SHIRQ 0x08000000 #define SA_PROBE SA_ONESHOT #define SA_SAMPLE_RANDOM SA_RESTART +#define SA_SHIRQ 0x02000000 + #endif /* __KERNEL__ */ #define SIG_BLOCK 1 /* for blocking signals */ @@ -127,13 +131,12 @@ struct sigaction { unsigned int sa_flags; __sighandler_t sa_handler; sigset_t sa_mask; - int sa_resv[2]; /* reserved */ + void (*sa_restorer)(void); + int sa_resv[1]; /* reserved */ }; -/* XXX use sa_rev for storing ka_restorer */ struct k_sigaction { struct sigaction sa; - void (*ka_restorer)(void); }; /* IRIX compatible stack_t */ @@ -145,9 +148,7 @@ typedef struct sigaltstack { #ifdef __KERNEL__ #include <asm/sigcontext.h> -#endif -#if defined (__KERNEL__) || defined (__USE_MISC) /* * The following break codes are or were in use for specific purposes in * other MIPS operating systems. Linux/MIPS doesn't use all of them. The diff --git a/include/asm-mips64/ucontext.h b/include/asm-mips64/ucontext.h new file mode 100644 index 000000000..3667acde1 --- /dev/null +++ b/include/asm-mips64/ucontext.h @@ -0,0 +1,22 @@ +/* $Id: ucontext.h,v 1.1 1999/09/27 16:01:40 ralf Exp $ + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Low level exception handling + * + * Copyright (C) 1998, 1999 by Ralf Baechle + */ +#ifndef _ASM_UCONTEXT_H +#define _ASM_UCONTEXT_H + +struct ucontext { + unsigned long uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + struct sigcontext uc_mcontext; + sigset_t uc_sigmask; /* mask last for extensibility */ +}; + +#endif /* _ASM_UCONTEXT_H */ diff --git a/include/asm-mips64/unistd.h b/include/asm-mips64/unistd.h index 7e906b1ba..0441ffc51 100644 --- a/include/asm-mips64/unistd.h +++ b/include/asm-mips64/unistd.h @@ -1,4 +1,4 @@ -/* $Id: unistd.h,v 1.1 1999/08/18 23:37:53 ralf Exp $ +/* $Id: unistd.h,v 1.3 1999/09/27 16:01:41 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -1016,7 +1016,7 @@ #define __NR_ptrace (__NR_Linux + 26) #define __NR_alarm (__NR_Linux + 27) #define __NR_oldfstat (__NR_Linux + 28) -#define __NR_pause (__NR_Linux + 29) +#define __NR_unused29 (__NR_Linux + 29) #define __NR_utime (__NR_Linux + 30) #define __NR_stty (__NR_Linux + 31) #define __NR_gtty (__NR_Linux + 32) @@ -1515,7 +1515,6 @@ return -1; \ */ #define __NR__exit __NR_exit static inline _syscall0(int,idle) -static inline _syscall0(int,pause) static inline _syscall0(int,sync) static inline _syscall0(pid_t,setsid) static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) diff --git a/include/asm-mips64/watch.h b/include/asm-mips64/watch.h new file mode 100644 index 000000000..b9c744ce8 --- /dev/null +++ b/include/asm-mips64/watch.h @@ -0,0 +1,38 @@ +/* $Id: watch.h,v 1.1 1999/09/27 16:01:41 ralf Exp $ + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1996, 1997, 1998, 1999 by Ralf Baechle + */ +#ifndef _ASM_WATCH_H +#define _ASM_WATCH_H + +#include <linux/linkage.h> + +/* + * Types of reference for watch_set() + */ +enum wref_type { + wr_save = 1, + wr_load = 2 +}; + +extern char watch_available; + +extern asmlinkage void __watch_set(unsigned long addr, enum wref_type ref); +extern asmlinkage void __watch_clear(void); +extern asmlinkage void __watch_reenable(void); + +#define watch_set(addr, ref) \ + if (watch_available) \ + __watch_set(addr, ref) +#define watch_clear() \ + if (watch_available) \ + __watch_clear() +#define watch_reenable() \ + if (watch_available) \ + __watch_reenable() + +#endif _ASM_WATCH_H |