summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/Makefile6
-rw-r--r--arch/mips/boot/.cvsignore4
-rw-r--r--arch/mips/config.in10
-rw-r--r--arch/mips/defconfig86
-rw-r--r--arch/mips/jazz/.cvsignore1
-rw-r--r--arch/mips/jazz/setup.c4
-rw-r--r--arch/mips/kernel/.cvsignore1
-rw-r--r--arch/mips/kernel/Makefile8
-rw-r--r--arch/mips/kernel/entry.S3
-rw-r--r--arch/mips/kernel/init_task.c1
-rw-r--r--arch/mips/kernel/irixelf.c7
-rw-r--r--arch/mips/kernel/irixsig.c4
-rw-r--r--arch/mips/kernel/irq.c7
-rw-r--r--arch/mips/kernel/mips_ksyms.c3
-rw-r--r--arch/mips/kernel/r2300_scall.S84
-rw-r--r--arch/mips/kernel/r4k_scall.S72
-rw-r--r--arch/mips/kernel/scall_o32.S156
-rw-r--r--arch/mips/kernel/signal.c50
-rw-r--r--arch/mips/kernel/syscall.c186
-rw-r--r--arch/mips/kernel/syscalls.h3
-rw-r--r--arch/mips/kernel/sysirix.c6
-rw-r--r--arch/mips/kernel/traps.c11
-rw-r--r--arch/mips/lib/.cvsignore1
-rw-r--r--arch/mips/mm/.cvsignore1
-rw-r--r--arch/mips/mm/fault.c3
-rw-r--r--arch/mips/sgi/kernel/.cvsignore1
-rw-r--r--arch/mips/sgi/kernel/indy_int.c15
-rw-r--r--arch/mips/sgi/kernel/indy_timer.c6
-rw-r--r--arch/mips/sgi/prom/.cvsignore1
-rw-r--r--arch/mips/sni/.cvsignore1
-rw-r--r--arch/mips/sni/setup.c4
-rw-r--r--arch/mips/tools/.cvsignore4
32 files changed, 349 insertions, 401 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 174de5799..2b2fd5d8d 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -13,7 +13,7 @@
# Copyright (C) 1994, 1995, 1996 by Ralf Baechle
# DECStation modifications by Paul M. Antoine, 1996
#
-# $Id: Makefile,v 1.9 1997/12/02 01:48:01 ralf Exp $
+# $Id: Makefile,v 1.10 1997/12/16 05:34:32 ralf Exp $
#
#
@@ -65,7 +65,7 @@ CFLAGS := $(CFLAGS) -g
endif
#
-# CPU dependand compiler/assembler options for optimization.
+# CPU-dependent compiler/assembler options for optimization.
#
ifdef CONFIG_CPU_R3000
CFLAGS := $(CFLAGS) -mcpu=r3000 -mips1
@@ -93,7 +93,7 @@ CFLAGS := $(CFLAGS) -mcpu=r8000 -mips2
endif
#
-# Board dependand options and extra files
+# Board-dependent options and extra files
#
ifdef CONFIG_ALGOR_P4032
CORE_FILES += arch/mips/algor/algor.o
diff --git a/arch/mips/boot/.cvsignore b/arch/mips/boot/.cvsignore
index 8118f2175..d25bc985f 100644
--- a/arch/mips/boot/.cvsignore
+++ b/arch/mips/boot/.cvsignore
@@ -1 +1,3 @@
-.depend mkboot zImage
+.depend
+.*.flags
+mkboot zImage
diff --git a/arch/mips/config.in b/arch/mips/config.in
index 9bc01b875..e33db8348 100644
--- a/arch/mips/config.in
+++ b/arch/mips/config.in
@@ -32,14 +32,15 @@ if [ "$CONFIG_ALGOR_P4032" = "y" ]; then
fi
if [ "$CONFIG_MIPS_MAGNUM_4000" = "y" -o \
"$CONFIG_OLIVETTI_M700" = "y" ]; then
- define_bool CONFIG_VIDEO_G364 y
+ define_bool CONFIG_MIPS_JAZZ y
+ define_bool CONFIG_VIDEO_G364 y
+ define_bool CONFIG_VGA_CONSOLE y
fi
-if [ "$CONFIG_ACER_PICA_61" = "y" -o \
- "$CONFIG_OLIVETTI_M700" = "y" -o \
- "$CONFIG_MIPS_MAGNUM_4000" = "y" ]; then
+if [ "$CONFIG_ACER_PICA_61" = "y" ]; then
define_bool CONFIG_MIPS_JAZZ y
fi
if [ "$CONFIG_SNI_RM200_PCI" = "y" ]; then
+ define_bool CONFIG_VGA_CONSOLE y
define_bool CONFIG_PCI y
fi
endmenu
@@ -82,6 +83,7 @@ fi
bool 'Networking support' CONFIG_NET
bool 'System V IPC' CONFIG_SYSVIPC
+bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
bool 'Sysctl support' CONFIG_SYSCTL
if [ "$CONFIG_SGI" != "y" ]; then
diff --git a/arch/mips/defconfig b/arch/mips/defconfig
index 39aa7dd3e..8f4d81b1f 100644
--- a/arch/mips/defconfig
+++ b/arch/mips/defconfig
@@ -16,6 +16,7 @@ CONFIG_ACER_PICA_61=y
# CONFIG_SGI is not set
CONFIG_SNI_RM200_PCI=y
CONFIG_MIPS_JAZZ=y
+CONFIG_VGA_CONSOLE=y
CONFIG_PCI=y
#
@@ -40,6 +41,7 @@ CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
CONFIG_NET=y
CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
# CONFIG_PARPORT is not set
@@ -75,7 +77,8 @@ CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_MD is not set
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_BLK_DEV_XD is not set
-# CONFIG_BLK_DEV_EZ is not set
+CONFIG_PARIDE_PARPORT=y
+# CONFIG_PARIDE is not set
# CONFIG_BLK_DEV_HD is not set
#
@@ -85,13 +88,13 @@ CONFIG_BLK_DEV_IDECD=y
# CONFIG_NETLINK is not set
# CONFIG_FIREWALL is not set
# CONFIG_NET_ALIAS is not set
+# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_IP_ACCT is not set
-# CONFIG_IP_MASQUERADE is not set
# CONFIG_IP_ROUTER is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
@@ -114,7 +117,64 @@ CONFIG_IP_NOSR=y
#
# SCSI support
#
-# CONFIG_SCSI is not set
+CONFIG_SCSI=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_ST=y
+CONFIG_BLK_DEV_SR=y
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+# CONFIG_CHR_DEV_SG is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+CONFIG_SCSI_CONSTANTS=y
+CONFIG_SCSI_LOGGING=y
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_SCSI_7000FASST is not set
+# CONFIG_SCSI_AHA152X is not set
+# CONFIG_SCSI_AHA1542 is not set
+# CONFIG_SCSI_AHA1740 is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_AM53C974 is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_EATA_DMA is not set
+# CONFIG_SCSI_EATA_PIO is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_NCR53C7xx is not set
+CONFIG_SCSI_NCR53C8XX=y
+# CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT is not set
+# CONFIG_SCSI_NCR53C8XX_TAGGED_QUEUE is not set
+# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
+CONFIG_SCSI_NCR53C8XX_MAX_TAGS=4
+CONFIG_SCSI_NCR53C8XX_SYNC=5
+# CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PCI2000 is not set
+# CONFIG_SCSI_PCI2220I is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+# CONFIG_SCSI_QLOGIC_ISP is not set
+# CONFIG_SCSI_SEAGATE is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_ULTRASTOR is not set
+CONFIG_JAZZ_ESP=y
#
# Network device support
@@ -144,17 +204,23 @@ CONFIG_PCNET32=y
# CONFIG_DLCI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
-# CONFIG_STRIP is not set
-# CONFIG_WAVELAN is not set
+# CONFIG_NET_RADIO is not set
# CONFIG_TR is not set
# CONFIG_WAN_DRIVERS is not set
# CONFIG_LAPBETHER is not set
# CONFIG_X25_ASY is not set
#
-# Amateur Radio support
+# AX.25 network device drivers
#
-# CONFIG_HAMRADIO is not set
+# CONFIG_MKISS is not set
+# CONFIG_BPQETHER is not set
+# CONFIG_DMASCC is not set
+# CONFIG_SCC is not set
+# CONFIG_BAYCOM_SER_FDX is not set
+# CONFIG_BAYCOM_SER_HDX is not set
+# CONFIG_BAYCOM_PAR is not set
+# CONFIG_SOUNDMODEM is not set
#
# ISDN subsystem
@@ -187,17 +253,19 @@ CONFIG_LOCKD=y
# CONFIG_CODA_FS is not set
# CONFIG_SMB_FS is not set
# CONFIG_HPFS_FS is not set
+# CONFIG_NTFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_UFS_FS is not set
# CONFIG_MAC_PARTITION is not set
+CONFIG_NLS=y
#
# Native Language Support
#
-CONFIG_NLS=y
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
@@ -240,8 +308,6 @@ CONFIG_SERIAL=y
# CONFIG_WATCHDOG is not set
# CONFIG_RTC is not set
# CONFIG_VIDEO_DEV is not set
-# CONFIG_VIDEO_BT848 is not set
-# CONFIG_VIDEO_PMS is not set
# CONFIG_NVRAM is not set
# CONFIG_JOYSTICK is not set
# CONFIG_MISC_RADIO is not set
diff --git a/arch/mips/jazz/.cvsignore b/arch/mips/jazz/.cvsignore
index 4671378ae..857dd22e9 100644
--- a/arch/mips/jazz/.cvsignore
+++ b/arch/mips/jazz/.cvsignore
@@ -1 +1,2 @@
.depend
+.*.flags
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c
index d088a302c..82fbdd143 100644
--- a/arch/mips/jazz/setup.c
+++ b/arch/mips/jazz/setup.c
@@ -1,5 +1,5 @@
/*
- * Setup pointers to hardware dependand routines.
+ * Setup pointers to hardware dependant routines.
*
* 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
@@ -7,7 +7,7 @@
*
* Copyright (C) 1996, 1997 by Ralf Baechle
*
- * $Id: setup.c,v 1.7 1997/12/29 00:06:49 tsbogend Exp $
+ * $Id: setup.c,v 1.8 1998/03/04 08:29:10 ralf Exp $
*/
#include <linux/init.h>
#include <linux/ioport.h>
diff --git a/arch/mips/kernel/.cvsignore b/arch/mips/kernel/.cvsignore
index 4671378ae..857dd22e9 100644
--- a/arch/mips/kernel/.cvsignore
+++ b/arch/mips/kernel/.cvsignore
@@ -1 +1,2 @@
.depend
+.*.flags
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index e9a84e13d..224d57a4e 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -14,8 +14,8 @@ EXTRA_ASFLAGS = -mips3 -mcpu=r4000
O_TARGET := kernel.o
O_OBJS := branch.o process.o signal.o entry.o traps.o ptrace.o vm86.o \
ioport.o pci.o reset.o setup.o syscall.o sysmips.o ipc.o \
- r4k_switch.o r4k_misc.o r4k_scall.o r4k_fpu.o r2300_switch.o \
- r2300_misc.o r2300_scall.o r2300_fpu.o r6000_fpu.o unaligned.o
+ r4k_switch.o r4k_misc.o r4k_fpu.o r2300_switch.o r2300_misc.o \
+ r2300_fpu.o r6000_fpu.o scall_o32.o unaligned.o
OX_OBJS := mips_ksyms.o
ifdef CONFIG_MIPS_FPE_MODULE
@@ -68,16 +68,12 @@ head.o: head.S
#
#r4k_misc.o: r4k_misc.S
#
-#r4k_scall.o: r4k_scall.S
-#
#r4k_fpu.o: r4k_fpu.S
#
#r2300_switch.o: r2300_switch.S
#
#r2300_misc.o: r2300_misc.S
#
-#r2300_scall.o: r2300_scall.S
-#
#r2300_fpu.o: r2300_fpu.S
#
#r6000_fpu.o: r6000_fpu.S
diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
index e0e98d9b5..2ef0f56cc 100644
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -7,7 +7,7 @@
*
* Copyright (C) 1994, 1995 by Ralf Baechle
*
- * $Id: entry.S,v 1.4 1997/12/01 17:57:25 ralf Exp $
+ * $Id: entry.S,v 1.5 1997/12/16 05:34:34 ralf Exp $
*/
/*
@@ -145,7 +145,6 @@ EXPORT(exception_count_##exception); \
BUILD_HANDLER(ades,ade,ade,silent) /* #5 */
BUILD_HANDLER(ibe,ibe,none,verbose) /* #6 */
BUILD_HANDLER(dbe,dbe,none,verbose) /* #7 */
- BUILD_HANDLER(sys,sys,none,silent) /* #8 */
BUILD_HANDLER(bp,bp,none,silent) /* #9 */
BUILD_HANDLER(ri,ri,none,silent) /* #10 */
BUILD_HANDLER(cpu,cpu,none,silent) /* #11 */
diff --git a/arch/mips/kernel/init_task.c b/arch/mips/kernel/init_task.c
index cc0a19231..acc206942 100644
--- a/arch/mips/kernel/init_task.c
+++ b/arch/mips/kernel/init_task.c
@@ -1,6 +1,7 @@
#include <linux/mm.h>
#include <linux/sched.h>
+#include <asm/uaccess.h>
#include <asm/pgtable.h>
static struct vm_area_struct init_mmap = INIT_MMAP;
diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c
index b29bc0563..619aaabaa 100644
--- a/arch/mips/kernel/irixelf.c
+++ b/arch/mips/kernel/irixelf.c
@@ -584,7 +584,7 @@ static inline int map_interpreter(struct elf_phdr *epp, struct elfhdr *ihp,
* process and the system, here we map the page and fill the
* structure
*/
-void irix_map_prda_page ()
+void irix_map_prda_page (void)
{
unsigned long v;
struct prda *pp;
@@ -724,7 +724,6 @@ static inline int do_load_irix_binary(struct linux_binprm * bprm,
/* OK, This is the point of no return */
current->mm->end_data = 0;
current->mm->end_code = 0;
- current->mm->start_mmap = ELF_START_MMAP;
current->mm->mmap = NULL;
elf_entry = (unsigned int) elf_ex.e_entry;
@@ -1230,8 +1229,8 @@ static int irix_core_dump(long signr, struct pt_regs * regs)
notes[0].datasz = sizeof(prstatus);
notes[0].data = &prstatus;
prstatus.pr_info.si_signo = prstatus.pr_cursig = signr;
- prstatus.pr_sigpend = current->signal;
- prstatus.pr_sighold = current->blocked;
+ prstatus.pr_sigpend = current->signal.sig[0];
+ prstatus.pr_sighold = current->blocked.sig[0];
psinfo.pr_pid = prstatus.pr_pid = current->pid;
psinfo.pr_ppid = prstatus.pr_ppid = current->p_pptr->pid;
psinfo.pr_pgrp = prstatus.pr_pgrp = current->pgrp;
diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c
index b2f9d592b..88fca61f2 100644
--- a/arch/mips/kernel/irixsig.c
+++ b/arch/mips/kernel/irixsig.c
@@ -1,4 +1,4 @@
-/* $Id: irixsig.c,v 1.8 1997/12/15 17:38:34 ralf Exp $
+/* $Id: irixsig.c,v 1.9 1998/03/17 00:59:35 ralf Exp $
* irixsig.c: WHEEE, IRIX signals! YOW, am I compatable or what?!?!
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
@@ -179,8 +179,6 @@ asmlinkage int do_irix_signal(sigset_t *oldset, struct pt_regs *regs)
unsigned long r0 = regs->regs[0];
unsigned long r7 = regs->orig_reg7;
struct k_sigaction *ka;
- unsigned long signr;
- sigset_t _oldset;
siginfo_t info;
if (!oldset)
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
index f64510168..55e7227e0 100644
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@ -4,7 +4,7 @@
* Copyright (C) 1992 Linus Torvalds
* Copyright (C) 1994, 1995, 1996, 1997 Ralf Baechle
*
- * $Id: irq.c,v 1.6 1997/12/01 17:57:28 ralf Exp $
+ * $Id: irq.c,v 1.7 1997/12/29 11:29:33 tsbogend Exp $
*/
#include <linux/errno.h>
#include <linux/init.h>
@@ -29,6 +29,7 @@
unsigned char cache_21 = 0xff;
unsigned char cache_A1 = 0xff;
+unsigned int local_bh_count[NR_CPUS];
unsigned int local_irq_count[NR_CPUS];
unsigned long spurious_count = 0;
@@ -104,7 +105,7 @@ int get_irq_list(char *buf)
if (!action)
continue;
len += sprintf(buf+len, "%2d: %8d %c %s",
- i, kstat.interrupts[i],
+ i, kstat.irqs[0][i],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action=action->next; action; action = action->next) {
@@ -133,7 +134,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
cpu = smp_processor_id();
irq_enter(cpu, irq);
- kstat.interrupts[irq]++;
+ kstat.irqs[cpu][irq]++;
/*
* mask and ack quickly, we don't want the irq controller
diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c
index 3e8fc275d..47807c294 100644
--- a/arch/mips/kernel/mips_ksyms.c
+++ b/arch/mips/kernel/mips_ksyms.c
@@ -7,7 +7,7 @@
*
* Copyright (C) 1996, 1997 by Ralf Baechle
*
- * $Id: mips_ksyms.c,v 1.4 1997/08/11 04:17:18 ralf Exp $
+ * $Id: mips_ksyms.c,v 1.4 1997/12/01 17:57:28 ralf Exp $
*/
#include <linux/config.h>
#include <linux/module.h>
@@ -46,6 +46,7 @@ EXPORT_SYMBOL_NOVERS(strtok);
EXPORT_SYMBOL(clear_page);
EXPORT_SYMBOL(__mips_bh_counter);
+EXPORT_SYMBOL(local_bh_count);
EXPORT_SYMBOL(local_irq_count);
/*
diff --git a/arch/mips/kernel/r2300_scall.S b/arch/mips/kernel/r2300_scall.S
deleted file mode 100644
index 690a5c7c4..000000000
--- a/arch/mips/kernel/r2300_scall.S
+++ /dev/null
@@ -1,84 +0,0 @@
-/* $Id: r2300_scall.S,v 1.3 1996/06/29 12:41:08 dm Exp $
- * r2300_scall.S: R2000/R3000 specific code to handle system calls.
- *
- * Copyright (C) 1994, 1995, 1996 by Ralf Baechle and Andreas Busse
- *
- * Multi-arch abstraction and beautification:
- * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
- */
-#include <asm/asm.h>
-#include <asm/bootinfo.h>
-#include <asm/cachectl.h>
-#include <asm/fpregdef.h>
-#include <asm/mipsconfig.h>
-#include <asm/mipsregs.h>
-#include <asm/page.h>
-#include <asm/pgtable.h>
-#include <asm/processor.h>
-#include <asm/regdef.h>
-#include <asm/stackframe.h>
-
-/*
- * do_syscall calls the function in a1 with upto 7 arguments. If over
- * four arguments are being requested, the additional arguments will
- * be copied from the user stack pointed to by a0->reg29.
- *
- * a0 (struct pt_regs *) pointer to user registers
- * a1 (syscall_t) pointer to syscall to do
- * a2 (int) number of arguments to syscall
- */
- .set noreorder
-NESTED(r2300_do_syscalls, 32, sp)
- subu sp,32
- sw ra,28(sp)
- sll a2,a2,PTRLOG
- lw t0,dst(a2)
- move t2,a1
- jalr t0
- lw t0,PT_R29(a0) # get old user stack pointer
-
-7:
- lw t1,24(t0) # parameter #7 from usp
- nop # delay slot
- sw t1,24(sp)
-6:
- lw t1,20(t0) # parameter #6 from usp
- nop # delay slot
- sw t1,20(sp)
-5:
- lw t1,16(t0) # parameter #5 from usp
- nop # delay slot
- sw t1,16(sp)
-4:
- lw a3,PT_R7(a0) # 4 args
-3:
- lw a2,PT_R6(a0) # 3 args
-2:
- lw a1,PT_R5(a0) # 2 args
-1:
- jalr t2 # 1 args
- lw a0,PT_R4(a0)
-
- lw ra,28(sp)
- addiu sp,32
- jr ra
- nop
-
-0:
- jalr t2 # 0 args, just pass a0
- lw ra,28(sp)
- addiu sp,32
-
- jr ra
- nop # delay slot
- END(r2300_do_syscalls)
-
- .rdata
- .align PTRLOG
-dst: PTR 0b, 1b, 2b, 3b, 4b, 5b, 6b, 7b
-
- .section __ex_table,"a"
- PTR 7b,bad_stack
- PTR 6b,bad_stack
- PTR 5b,bad_stack
- .previous
diff --git a/arch/mips/kernel/r4k_scall.S b/arch/mips/kernel/r4k_scall.S
deleted file mode 100644
index 121616a50..000000000
--- a/arch/mips/kernel/r4k_scall.S
+++ /dev/null
@@ -1,72 +0,0 @@
-/* $Id: r4k_scall.S,v 1.4 1996/06/29 12:41:09 dm Exp $
- * r4k_scall.S: R4xx0 specific code to handle system calls.
- *
- * Copyright (C) 1994, 1995, 1996 by Ralf Baechle and Andreas Busse
- *
- * Multi-arch abstraction and beautification:
- * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
- */
-#include <asm/asm.h>
-#include <asm/bootinfo.h>
-#include <asm/cachectl.h>
-#include <asm/fpregdef.h>
-#include <asm/mipsconfig.h>
-#include <asm/mipsregs.h>
-#include <asm/page.h>
-#include <asm/pgtable.h>
-#include <asm/processor.h>
-#include <asm/regdef.h>
-#include <asm/stackframe.h>
-
- .set noreorder
- .set mips3
- .align 5
-NESTED(r4k_do_syscalls, 64, sp)
- subu sp, 64
- sw ra, 56(sp)
- sll a2, a2, PTRLOG
- lw t0, dst(a2)
- move t2, a1
- jalr t0
- lw t0, PT_R29(a0) # get old user stack pointer
-7:
- lw t1, 24(t0) # parameter #7 from usp
- sw t1, 24(sp)
-6:
- lw t1, 20(t0) # parameter #6 from usp
- sw t1, 20(sp)
-5:
- lw t1, 16(t0) # parameter #5 from usp
- sw t1, 16(sp)
-4:
- lw a3, PT_R7(a0) # 4 args
-3:
- lw a2, PT_R6(a0) # 3 args
-2:
- lw a1, PT_R5(a0) # 2 args
-1:
- jalr t2 # 1 args
- lw a0, PT_R4(a0)
-
- .set reorder
- lw ra, 56(sp)
- addiu sp, 64
- jr ra
-0:
- jalr t2 # 0 args, just pass a0
- nop
- lw ra, 56(sp)
- addiu sp, 64
- jr ra
- nop
- END(r4k_do_syscalls)
-
- .rdata
- .align PTRLOG
-dst: PTR 0b, 1b, 2b, 3b, 4b, 5b, 6b, 7b
-
- .section __ex_table,"a"
- PTR 7b,bad_stack
- PTR 6b,bad_stack
- PTR 5b,bad_stack
- .previous
diff --git a/arch/mips/kernel/scall_o32.S b/arch/mips/kernel/scall_o32.S
new file mode 100644
index 000000000..ee91ac947
--- /dev/null
+++ b/arch/mips/kernel/scall_o32.S
@@ -0,0 +1,156 @@
+/*
+ * Handle ABI O32 style syscalls.
+ *
+ * Copyright (C) 1997, 1998 by Ralf Baechle
+ *
+ * $Id: scall_o32.S,v 1.1 1998/03/12 19:06:20 ralf Exp $
+ */
+#include <asm/asm.h>
+#include <linux/errno.h>
+#include <asm/current.h>
+#include <asm/mipsregs.h>
+#include <asm/regdef.h>
+#include <asm/stackframe.h>
+#include <asm/unistd.h>
+
+/* This duplicates the definition from <linux/sched.h> */
+#define PF_TRACESYS 0x00000020 /* tracing system calls */
+
+/* This duplicates the definition from <asm/signal.h> */
+#define SIGILL 4 /* Illegal instruction (ANSI). */
+
+/* Highest syscall used of any syscall flavour */
+#define MAX_SYSCALL_NO __NR_Linux + __NR_Linux_syscalls
+
+ .align 5
+NESTED(handle_sys, PT_SIZE, sp)
+ .set noat
+ SAVE_ALL
+ STI
+ .set at
+
+ /*
+ * By convention "li v0,<syscallno>" is always preceeding
+ * the syscall instruction. So if we're in a delay slot
+ * userland is screwed up.
+ */
+ lw t0, PT_CAUSE(sp) # delay slot?
+ lw t1, PT_EPC(sp) # skip syscall on return
+ bltz t0, sigill_and_out
+
+ sltiu t0, v0, MAX_SYSCALL_NO + 1 # check syscall number
+ addiu t1, 4 # skip to next instruction
+ beqz t0, illegal_syscall
+ sw t1, PT_EPC(sp)
+
+ /* XXX Put both in one cacheline, should save a bit. */
+ sll t0, v0, 2
+ lw s0, sys_call_table(t0) # syscall routine
+ lbu s1, sys_narg_table(v0) # number of arguments
+ beqz s0, illegal_syscall;
+
+ subu t0, s1, 5 # 5 or more arguments?
+ bgezal t0, stackargs
+
+ GET_CURRENT(s3) # syscall tracing enabled?
+ lw s3, TASK_FLAGS(s3)
+ andi s3, PF_TRACESYS
+ bnez s3, trace_a_syscall
+
+ jalr s0 # Do The Real Thing (TM)
+
+ li t0, -EMAXERRNO - 1 # error?
+ sltu t0, t0, v0
+ sw t0, PT_R7(sp) # set error flag
+ beqz t0, 1f
+
+ negu v0 # error
+ sw v0, PT_R0(sp) # set flag for syscall restarting
+1: sw v0, PT_R2(sp) # result
+ j ret_from_sys_call
+
+/* ------------------------------------------------------------------------ */
+
+trace_a_syscall:
+ jal syscall_trace
+
+ jalr s0 # Do The Real Thing (TM)
+
+ li t0, -EMAXERRNO - 1 # error?
+ sltu t0, t0, v0
+ sw t0, PT_R7(sp) # set error flag
+ beqz t0, 1f
+
+ negu v0 # error
+ sw v0, PT_R0(sp) # set flag for syscall restarting
+1: sw v0, PT_R2(sp) # result
+
+ jal syscall_trace
+ j ret_from_sys_call
+
+/* ------------------------------------------------------------------------ */
+
+ /*
+ * More than four arguments. Try to deal with it by copying the
+ * stack arguments from the user stack to the kernel stack.
+ * This Sucks (TM).
+ */
+stackargs:
+ move s3, ra # save return address
+
+ lw t0, PT_R29(sp) # get old user stack pointer
+ subu s2, s1, 4
+ sll t1, s2, 2 # stack valid?
+
+ addu t1, t0 # end address
+ or t2, t0, t1
+ bltz t0, bad_stack # -> sp is bad
+
+ lw t0, PT_R29(sp) # get old user stack pointer
+ la t1, 3f # copy 1 to 2 arguments
+ sll s2, s2, 3
+ subu t1, s2
+ jr t1
+
+ /* Ok, copy the args from the luser stack to the kernel stack */
+1: lw t1, 20(t0) # argument #6 from usp
+ sw t1, 20(sp)
+2: lw t1, 16(t0) # argument #5 from usp
+ sw t1, 16(sp)
+
+3: jr s3 # go back
+
+ .section __ex_table,"a"
+ PTR 1b,bad_stack
+ PTR 2b,bad_stack
+ .previous
+
+ /*
+ * The stackpointer for a call with more than 4 arguments is bad.
+ */
+bad_stack:
+ negu v0 # error
+ sw v0, PT_R0(sp)
+ sw v0, PT_R2(sp)
+ li t0, 1 # set error flag
+ sw t0, PT_R7(sp)
+ j ret_from_sys_call
+
+ /*
+ * The system call does not exist in this kernel
+ */
+illegal_syscall:
+ li v0, ENOSYS # error
+ sw v0, PT_R2(sp)
+ li t0, 1 # set error flag
+ sw t0, PT_R7(sp)
+ j ret_from_sys_call
+
+sigill_and_out:
+ li t0, -1 # not a sys call
+ REG_S t0, PT_OR2(sp)
+ li a0, SIGILL
+ GET_CURRENT(a2)
+ jal force_sig
+ j ret_from_sys_call
+ END(handle_sys)
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 2095d63fb..390c3ef2b 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -4,7 +4,7 @@
* Copyright (C) 1991, 1992 Linus Torvalds
* Copyright (C) 1994, 1995, 1996 Ralf Baechle
*
- * $Id: signal.c,v 1.7 1997/12/01 17:57:31 ralf Exp $
+ * $Id: signal.c,v 1.8 1997/12/16 05:34:37 ralf Exp $
*/
#include <linux/config.h>
#include <linux/sched.h>
@@ -37,11 +37,11 @@ extern asmlinkage void (*restore_fp_context)(struct sigcontext *sc);
* Atomically swap in the new signal mask, and wait for a signal.
*/
asmlinkage inline int
-sys_sigsuspend(struct pt_regs *regs)
+sys_sigsuspend(struct pt_regs regs)
{
sigset_t *uset, saveset, newset;
- uset = (sigset_t *) regs->regs[4];
+ uset = (sigset_t *) regs.regs[4];
if (copy_from_user(&newset, uset, sizeof(sigset_t)))
return -EFAULT;
sigdelsetmask(&newset, ~_BLOCKABLE);
@@ -51,21 +51,37 @@ sys_sigsuspend(struct pt_regs *regs)
current->blocked = newset;
spin_unlock_irq(&current->sigmask_lock);
- regs->regs[2] = -EINTR;
+ regs.regs[2] = -EINTR;
while (1) {
current->state = TASK_INTERRUPTIBLE;
schedule();
- if (do_signal(&saveset, regs))
+ if (do_signal(&saveset, &regs))
return -EINTR;
}
}
asmlinkage int
-sys_rt_sigsuspend(struct pt_regs *regs)
+sys_rt_sigsuspend(struct pt_regs regs)
{
- if (regs->regs[5] != sizeof(sigset_t))
- return -EINVAL;
- return sys_sigsuspend(regs);
+ sigset_t *uset, saveset, newset;
+
+ uset = (sigset_t *) regs.regs[4];
+ if (copy_from_user(&newset, uset, sizeof(sigset_t)))
+ return -EFAULT;
+ sigdelsetmask(&newset, ~_BLOCKABLE);
+
+ spin_lock_irq(&current->sigmask_lock);
+ saveset = current->blocked;
+ current->blocked = newset;
+ spin_unlock_irq(&current->sigmask_lock);
+
+ regs.regs[2] = -EINTR;
+ while (1) {
+ current->state = TASK_INTERRUPTIBLE;
+ schedule();
+ if (do_signal(&saveset, &regs))
+ return -EINTR;
+ }
}
asmlinkage int
@@ -165,14 +181,14 @@ struct rt_sigframe {
// struct ucontext uc;
};
-asmlinkage int sys_sigreturn(struct pt_regs *regs)
+asmlinkage int sys_sigreturn(struct pt_regs regs)
{
struct sigcontext *context;
sigset_t blocked;
- context = (struct sigcontext *)(long) regs->regs[29];
+ context = (struct sigcontext *)(long) regs.regs[29];
if (!access_ok(VERIFY_READ, context, sizeof(struct sigcontext)) ||
- (regs->regs[29] & (SZREG - 1)))
+ (regs.regs[29] & (SZREG - 1)))
goto badframe;
if (__copy_from_user(&blocked, &context->sc_sigset, sizeof(blocked)))
@@ -184,12 +200,12 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
recalc_sigpending(current);
spin_unlock_irq(&current->sigmask_lock);
- restore_sigcontext(regs, context);
+ restore_sigcontext(&regs, context);
/*
* Disable syscall checks
*/
- regs->orig_reg2 = -1;
+ regs.orig_reg2 = -1;
/*
* Don't let your children do this ...
@@ -198,7 +214,7 @@ asmlinkage int sys_sigreturn(struct pt_regs *regs)
"move\t$29,%0\n\t"
"j\tret_from_sys_call"
:/* no outputs */
- :"r" (regs));
+ :"r" (&regs));
/* Unreached */
badframe:
@@ -208,7 +224,7 @@ badframe:
}
/* same as sys_sigreturn for now */
-asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
+asmlinkage int sys_rt_sigreturn(struct pt_regs regs)
{
return -ENOSYS;
}
@@ -255,7 +271,7 @@ setup_sigcontext(struct pt_regs *regs, struct sigcontext *sc, sigset_t *set)
save_gp_reg(31);
#undef save_gp_reg
- save_fp_context(sc); /* cpu dependand */
+ save_fp_context(sc); /* cpu dependant */
__put_user(regs->hi, &sc->sc_mdhi);
__put_user(regs->lo, &sc->sc_mdlo);
__put_user(regs->cp0_cause, &sc->sc_cause);
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 91cc6a3ae..e9d4340cb 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -11,7 +11,7 @@
* Don't waste that much memory for empty entries in the syscall
* table.
*
- * $Id: syscall.c,v 1.4 1997/12/01 17:57:31 ralf Exp $
+ * $Id: syscall.c,v 1.5 1997/12/16 05:34:37 ralf Exp $
*/
#undef CONF_PRINT_SYSCALLS
#undef CONF_DEBUG_IRIX
@@ -37,7 +37,7 @@ extern asmlinkage int (*do_syscalls)(struct pt_regs *regs, syscall_t fun,
extern syscall_t sys_call_table[];
extern unsigned char sys_narg_table[];
-asmlinkage int sys_pipe(struct pt_regs *regs)
+asmlinkage int sys_pipe(struct pt_regs regs)
{
int fd[2];
int error, res;
@@ -48,7 +48,7 @@ asmlinkage int sys_pipe(struct pt_regs *regs)
res = error;
goto out;
}
- regs->regs[3] = fd[1];
+ regs.regs[3] = fd[1];
res = fd[0];
out:
unlock_kernel();
@@ -105,28 +105,28 @@ out:
return ret;
}
-asmlinkage int sys_fork(struct pt_regs *regs)
+asmlinkage int sys_fork(struct pt_regs regs)
{
int res;
lock_kernel();
- res = do_fork(SIGCHLD, regs->regs[29], regs);
+ res = do_fork(SIGCHLD, regs.regs[29], &regs);
unlock_kernel();
return res;
}
-asmlinkage int sys_clone(struct pt_regs *regs)
+asmlinkage int sys_clone(struct pt_regs regs)
{
unsigned long clone_flags;
unsigned long newsp;
int res;
lock_kernel();
- clone_flags = regs->regs[4];
- newsp = regs->regs[5];
+ clone_flags = regs.regs[4];
+ newsp = regs.regs[5];
if (!newsp)
- newsp = regs->regs[29];
- res = do_fork(clone_flags, newsp, regs);
+ newsp = regs.regs[29];
+ res = do_fork(clone_flags, newsp, &regs);
unlock_kernel();
return res;
}
@@ -134,18 +134,18 @@ asmlinkage int sys_clone(struct pt_regs *regs)
/*
* sys_execve() executes a new program.
*/
-asmlinkage int sys_execve(struct pt_regs *regs)
+asmlinkage int sys_execve(struct pt_regs regs)
{
int error;
char * filename;
lock_kernel();
- filename = getname((char *) (long)regs->regs[4]);
+ filename = getname((char *) (long)regs.regs[4]);
error = PTR_ERR(filename);
if (IS_ERR(filename))
goto out;
- error = do_execve(filename, (char **) (long)regs->regs[5],
- (char **) (long)regs->regs[6], regs);
+ error = do_execve(filename, (char **) (long)regs.regs[5],
+ (char **) (long)regs.regs[6], &regs);
putname(filename);
out:
@@ -193,11 +193,13 @@ asmlinkage int sys_olduname(struct oldold_utsname * name)
/*
* Do the indirect syscall syscall.
* Don't care about kernel locking; the actual syscall will do it.
+ *
+ * XXX This is borken.
*/
-asmlinkage int sys_syscall(struct pt_regs *regs)
+asmlinkage int sys_syscall(struct pt_regs regs)
{
syscall_t syscall;
- unsigned long syscallnr = regs->regs[4];
+ unsigned long syscallnr = regs.regs[4];
unsigned long a0, a1, a2, a3, a4, a5, a6;
int nargs, errno;
@@ -219,7 +221,7 @@ asmlinkage int sys_syscall(struct pt_regs *regs)
}
if(nargs > 3) {
- unsigned long usp = regs->regs[29];
+ unsigned long usp = regs.regs[29];
unsigned long *sp = (unsigned long *) usp;
if(usp & 3) {
printk("unaligned usp -EFAULT\n");
@@ -252,9 +254,9 @@ asmlinkage int sys_syscall(struct pt_regs *regs)
} else {
a3 = a4 = a5 = a6 = 0;
}
- a0 = regs->regs[5]; a1 = regs->regs[6]; a2 = regs->regs[7];
+ a0 = regs.regs[5]; a1 = regs.regs[6]; a2 = regs.regs[7];
if(nargs == 0)
- a0 = (unsigned long) regs;
+ a0 = (unsigned long) &regs;
return syscall((void *)a0, a1, a2, a3, a4, a5, a6);
}
@@ -268,6 +270,9 @@ asmlinkage void bad_stack(void)
do_exit(SIGSEGV);
}
+/*
+ * Build the string table for the builtin "poor man's strace".
+ */
#ifdef CONF_PRINT_SYSCALLS
#define SYS(fun, narg) #fun,
static char *sfnames[] = {
@@ -281,146 +286,3 @@ static char *irix_sys_names[] = {
#include "irix5sys.h"
};
#endif
-
-/*
- * This isn't entirely correct with respect to kernel locking ...
- */
-void do_sys(struct pt_regs *regs)
-{
- unsigned long syscallnr, usp;
- syscall_t syscall;
- int errno, narg;
-
- /* Skip syscall instruction */
- if (delay_slot(regs)) {
- /*
- * By convention "li v0,<syscallno>" is always preceeding
- * the syscall instruction. So if we're in a delay slot
- * userland is screwed up.
- */
- force_sig(SIGILL, current);
- return;
- }
- regs->cp0_epc += 4;
-
- syscallnr = regs->regs[2];
- if (syscallnr > (__NR_Linux + __NR_Linux_syscalls))
- goto illegal_syscall;
-
- syscall = sys_call_table[syscallnr];
- if (syscall == NULL)
- goto illegal_syscall;
-
- narg = sys_narg_table[syscallnr];
-#ifdef CONF_PRINT_SYSCALLS
- if(syscallnr >= 4000)
- printk("do_sys(%s:%d): %s(%08lx,%08lx,%08lx,%08lx)<pc=%08lx>",
- current->comm, current->pid, sfnames[syscallnr - __NR_Linux],
- regs->regs[4], regs->regs[5], regs->regs[6], regs->regs[7],
- regs->cp0_epc);
-#endif
-#if defined(CONFIG_BINFMT_IRIX) && defined(CONF_DEBUG_IRIX)
- if(syscallnr < 2000 && syscallnr >= 1000) {
- printk("irix_sys(%s:%d): %s(", current->comm,
- current->pid, irix_sys_names[syscallnr - 1000]);
- if((narg < 4) && (narg != 0)) {
- int i = 0;
-
- while(i < (narg - 1)) {
- printk("%08lx, ", regs->regs[i + 4]);
- i++;
- }
- printk("%08lx) ", regs->regs[i + 4]);
- } else if(narg == 0) {
- printk("%08lx, %08lx, %08lx, %08lx) ",
- regs->regs[4], regs->regs[5], regs->regs[6],
- regs->regs[7]);
- } else
- printk("narg=%d) ", narg);
- }
-#endif
- if (narg > 4) {
- /*
- * Verify that we can safely get the additional parameters
- * from the user stack. Of course I could read the params
- * from unaligned addresses ... Consider this a programming
- * course caliber .45.
- */
- usp = regs->regs[29];
- if (usp & 3) {
- printk("unaligned usp\n");
- force_sig(SIGSEGV, current);
- regs->regs[2] = EFAULT;
- regs->regs[7] = 1;
- return;
- }
- if (!access_ok(VERIFY_READ, (void *) (usp + 16),
- (narg - 4) * sizeof(unsigned long))) {
- regs->regs[2] = EFAULT;
- regs->regs[7] = 1;
- return;
- }
- }
-
- if ((current->flags & PF_TRACESYS) == 0)
- {
- errno = do_syscalls(regs, syscall, narg);
- if (errno < 0 && errno > (-ENOIOCTLCMD - 1)) {
- goto bad_syscall;
- }
- regs->regs[2] = errno;
- regs->regs[7] = 0;
- }
- else
- {
- syscall_trace();
-
- errno = do_syscalls(regs, syscall, narg);
- if (errno < 0)
- {
- regs->regs[2] = -errno;
- regs->regs[7] = 1;
- }
- else
- {
- regs->regs[2] = errno;
- regs->regs[7] = 0;
- }
-
- syscall_trace();
- }
-#if defined(CONF_PRINT_SYSCALLS) || \
- (defined(CONFIG_BINFMT_IRIX) && defined(CONF_DEBUG_IRIX))
-#if 0
- printk(" returning: normal\n");
-#else
- if(syscallnr >= 4000 && syscallnr < 5000)
- printk(" returning: %08lx\n", (unsigned long) errno);
-#endif
-#endif
- return;
-
-bad_syscall:
- regs->regs[0] = regs->regs[2] = -errno;
- regs->regs[7] = 1;
-#if defined(CONF_PRINT_SYSCALLS) || \
- (defined(CONFIG_BINFMT_IRIX) && defined(CONF_DEBUG_IRIX))
-#if 0
- printk(" returning: bad_syscall\n");
-#else
- if(syscallnr >= 4000 && syscallnr < 5000)
- printk(" returning error: %d\n", errno);
-#endif
-#endif
- return;
-illegal_syscall:
-
- regs->regs[2] = ENOSYS;
- regs->regs[7] = 1;
-#if defined(CONF_PRINT_SYSCALLS) || \
- (defined(CONFIG_BINFMT_IRIX) && defined(CONF_DEBUG_IRIX))
- if(syscallnr >= 1000 && syscallnr < 2000)
- printk(" returning: illegal_syscall\n");
-#endif
- return;
-}
diff --git a/arch/mips/kernel/syscalls.h b/arch/mips/kernel/syscalls.h
index f0614b69f..33bec5be8 100644
--- a/arch/mips/kernel/syscalls.h
+++ b/arch/mips/kernel/syscalls.h
@@ -7,7 +7,7 @@
*
* Copyright (C) 1995, 1996 by Ralf Baechle
*
- * $Id: syscalls.h,v 1.9 1997/12/06 23:52:06 ralf Exp $
+ * $Id: syscalls.h,v 1.10 1997/12/16 05:34:38 ralf Exp $
*/
/*
@@ -220,3 +220,4 @@ SYS(sys_rt_sigqueueinfo, 3)
SYS(sys_rt_sigsuspend, 2)
SYS(sys_pread, 4) /* 4200 */
SYS(sys_pwrite, 4)
+SYS(sys_lchown, 3)
diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c
index 64941c67c..370431a51 100644
--- a/arch/mips/kernel/sysirix.c
+++ b/arch/mips/kernel/sysirix.c
@@ -4,7 +4,7 @@
* Copyright (C) 1996 David S. Miller
* Copyright (C) 1997 Miguel de Icaza
*
- * $Id: sysirix.c,v 1.8 1997/09/21 22:58:44 miguel Exp $
+ * $Id: sysirix.c,v 1.9 1997/12/16 05:34:38 ralf Exp $
*/
#include <linux/kernel.h>
@@ -1692,11 +1692,11 @@ static inline int chown_common(uid_t user, gid_t group, struct dentry *dentry)
error = -EDQUOT;
if (inode->i_sb->dq_op->transfer(inode, &newattrs, 0))
goto dput_and_out;
- error = notify_change(inode, &newattrs);
+ error = notify_change(dentry, &newattrs);
if (error)
inode->i_sb->dq_op->transfer(inode, &newattrs, 1);
} else
- error = notify_change(inode, &newattrs);
+ error = notify_change(dentry, &newattrs);
dput_and_out:
dput(dentry);
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index b80dc6dc8..2632e4d2d 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -8,7 +8,7 @@
* Copyright 1994, 1995, 1996, 1997 by Ralf Baechle
* Modified for R3000 by Paul M. Antoine, 1995, 1996
*
- * $Id: traps.c,v 1.5 1997/12/01 17:57:33 ralf Exp $
+ * $Id: traps.c,v 1.6 1997/12/16 05:34:39 ralf Exp $
*/
#include <linux/config.h>
#include <linux/init.h>
@@ -460,13 +460,6 @@ void set_except_vector(int n, void *addr)
}
}
-typedef asmlinkage int (*syscall_t)(void *a0,...);
-asmlinkage int (*do_syscalls)(struct pt_regs *regs, syscall_t fun, int narg);
-extern asmlinkage int r4k_do_syscalls(struct pt_regs *regs,
- syscall_t fun, int narg);
-extern asmlinkage int r2300_do_syscalls(struct pt_regs *regs,
- syscall_t fun, int narg);
-
asmlinkage void (*save_fp_context)(struct sigcontext *sc);
extern asmlinkage void r4k_save_fp_context(struct sigcontext *sc);
extern asmlinkage void r2300_save_fp_context(struct sigcontext *sc);
@@ -559,7 +552,6 @@ __initfunc(void trap_init(void))
memcpy((void *)(KSEG0 + 0x100), (void *) KSEG0, 0x80);
memcpy((void *)(KSEG0 + 0x180), &except_vec3_r4000, 0x80);
- do_syscalls = r4k_do_syscalls;
save_fp_context = r4k_save_fp_context;
restore_fp_context = r4k_restore_fp_context;
resume = r4xx0_resume;
@@ -606,7 +598,6 @@ __initfunc(void trap_init(void))
case CPU_R3000:
case CPU_R3000A:
memcpy((void *)KSEG0, &except_vec0_r2300, 0x80);
- do_syscalls = r2300_do_syscalls;
save_fp_context = r2300_save_fp_context;
restore_fp_context = r2300_restore_fp_context;
resume = r2300_resume;
diff --git a/arch/mips/lib/.cvsignore b/arch/mips/lib/.cvsignore
index 4671378ae..857dd22e9 100644
--- a/arch/mips/lib/.cvsignore
+++ b/arch/mips/lib/.cvsignore
@@ -1 +1,2 @@
.depend
+.*.flags
diff --git a/arch/mips/mm/.cvsignore b/arch/mips/mm/.cvsignore
index 4671378ae..857dd22e9 100644
--- a/arch/mips/mm/.cvsignore
+++ b/arch/mips/mm/.cvsignore
@@ -1 +1,2 @@
.depend
+.*.flags
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
index 8385eb22f..98d707542 100644
--- a/arch/mips/mm/fault.c
+++ b/arch/mips/mm/fault.c
@@ -16,6 +16,7 @@
#include <linux/smp.h>
#include <linux/smp_lock.h>
+#include <asm/hardirq.h>
#include <asm/pgtable.h>
#include <asm/mmu_context.h>
#include <asm/system.h>
@@ -43,6 +44,8 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
struct mm_struct *mm = tsk->mm;
unsigned long fixup;
+ if (local_irq_count[smp_processor_id()] != 0)
+ die_if_kernel("page fault from irq handler", regs, writeaccess);
lock_kernel();
#if 0
printk("[%s:%d:%08lx:%ld:%08lx]\n", current->comm, current->pid,
diff --git a/arch/mips/sgi/kernel/.cvsignore b/arch/mips/sgi/kernel/.cvsignore
index 4671378ae..857dd22e9 100644
--- a/arch/mips/sgi/kernel/.cvsignore
+++ b/arch/mips/sgi/kernel/.cvsignore
@@ -1 +1,2 @@
.depend
+.*.flags
diff --git a/arch/mips/sgi/kernel/indy_int.c b/arch/mips/sgi/kernel/indy_int.c
index 01b065359..0726ee179 100644
--- a/arch/mips/sgi/kernel/indy_int.c
+++ b/arch/mips/sgi/kernel/indy_int.c
@@ -4,7 +4,7 @@
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
*
- * $Id: indy_int.c,v 1.4 1997/09/20 19:20:15 root Exp $
+ * $Id: indy_int.c,v 1.5 1997/12/01 17:57:38 ralf Exp $
*/
#include <linux/config.h>
@@ -55,6 +55,7 @@ extern asmlinkage void indyIRQ(void);
extern void rs_kgdb_hook(int);
#endif
+unsigned int local_bh_count[NR_CPUS];
unsigned int local_irq_count[NR_CPUS];
unsigned long spurious_count = 0;
@@ -230,7 +231,7 @@ int get_irq_list(char *buf)
if (!action)
continue;
len += sprintf(buf+len, "%2d: %8d %c %s",
- num, kstat.interrupts[num],
+ num, kstat.irqs[0][num],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action=action->next; action; action = action->next) {
@@ -245,7 +246,7 @@ int get_irq_list(char *buf)
if (!action)
continue;
len += sprintf(buf+len, "%2d: %8d %c %s",
- num, kstat.interrupts[num],
+ num, kstat.irqs[0][num],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
for (action=action->next; action; action = action->next) {
@@ -274,7 +275,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
cpu = smp_processor_id();
irq_enter(cpu, irq);
- kstat.interrupts[irq]++;
+ kstat.irqs[0][irq]++;
printk("Got irq %d, press a key.", irq);
prom_getchar();
@@ -440,7 +441,7 @@ void indy_local0_irqdispatch(struct pt_regs *regs)
}
irq_enter(cpu, irq);
- kstat.interrupts[irq + 16]++;
+ kstat.irqs[0][irq + 16]++;
action->handler(irq, action->dev_id, regs);
irq_exit(cpu, irq);
}
@@ -464,7 +465,7 @@ void indy_local1_irqdispatch(struct pt_regs *regs)
action = local_irq_action[irq];
}
irq_enter(cpu, irq);
- kstat.interrupts[irq + 24]++;
+ kstat.irqs[0][irq + 24]++;
action->handler(irq, action->dev_id, regs);
irq_exit(cpu, irq);
}
@@ -475,7 +476,7 @@ void indy_buserror_irq(struct pt_regs *regs)
int irq = 6;
irq_enter(cpu, irq);
- kstat.interrupts[irq]++;
+ kstat.irqs[0][irq]++;
printk("Got a bus error IRQ, shouldn't happen yet\n");
show_regs(regs);
printk("Spinning...\n");
diff --git a/arch/mips/sgi/kernel/indy_timer.c b/arch/mips/sgi/kernel/indy_timer.c
index 69b5ea062..198851eed 100644
--- a/arch/mips/sgi/kernel/indy_timer.c
+++ b/arch/mips/sgi/kernel/indy_timer.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
*
- * $Id: indy_timer.c,v 1.4 1997/12/01 17:57:38 ralf Exp $
+ * $Id: indy_timer.c,v 1.5 1998/03/11 15:21:44 ralf Exp $
*/
#include <linux/errno.h>
@@ -114,7 +114,7 @@ void indy_timer_interrupt(struct pt_regs *regs)
else
r4k_cur += r4k_offset;
ack_r4ktimer(r4k_cur);
- kstat.interrupts[irq]++;
+ kstat.irqs[0][irq]++;
do_timer(regs);
/* We update the Dallas time of day approx. every 11 minutes,
@@ -280,7 +280,7 @@ void indy_8254timer_irq(void)
int irq = 4;
irq_enter(cpu, irq);
- kstat.interrupts[irq]++;
+ kstat.irqs[0][irq]++;
printk("indy_8254timer_irq: Whoops, should not have gotten this IRQ\n");
prom_getchar();
prom_imode();
diff --git a/arch/mips/sgi/prom/.cvsignore b/arch/mips/sgi/prom/.cvsignore
index 4671378ae..857dd22e9 100644
--- a/arch/mips/sgi/prom/.cvsignore
+++ b/arch/mips/sgi/prom/.cvsignore
@@ -1 +1,2 @@
.depend
+.*.flags
diff --git a/arch/mips/sni/.cvsignore b/arch/mips/sni/.cvsignore
index 4671378ae..857dd22e9 100644
--- a/arch/mips/sni/.cvsignore
+++ b/arch/mips/sni/.cvsignore
@@ -1 +1,2 @@
.depend
+.*.flags
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c
index 6297fb369..ee77d50ba 100644
--- a/arch/mips/sni/setup.c
+++ b/arch/mips/sni/setup.c
@@ -1,5 +1,5 @@
/*
- * Setup pointers to hardware dependand routines.
+ * Setup pointers to hardware dependant routines.
*
* 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
@@ -7,7 +7,7 @@
*
* Copyright (C) 1996, 1997 by Ralf Baechle
*
- * $Id: setup.c,v 1.6 1997/12/20 13:09:29 ralf Exp $
+ * $Id: setup.c,v 1.4 1998/03/04 08:47:29 ralf Exp $
*/
#include <asm/ptrace.h>
#include <linux/ioport.h>
diff --git a/arch/mips/tools/.cvsignore b/arch/mips/tools/.cvsignore
index 2a1642034..8342e6588 100644
--- a/arch/mips/tools/.cvsignore
+++ b/arch/mips/tools/.cvsignore
@@ -1 +1,3 @@
-.depend offset.s offset.h
+.depend
+.*.flags
+offset.s offset.h