diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/Makefile | 31 | ||||
-rw-r--r-- | arch/mips/baget/bagetIRQ.S | 3 | ||||
-rw-r--r-- | arch/mips/config.in | 5 | ||||
-rw-r--r-- | arch/mips/jazz/int-handler.S | 3 | ||||
-rw-r--r-- | arch/mips/jazz/io.c | 1 | ||||
-rw-r--r-- | arch/mips/jazz/jazzdma.c | 1 | ||||
-rw-r--r-- | arch/mips/kernel/entry.S | 3 | ||||
-rw-r--r-- | arch/mips/kernel/gdb-low.S | 3 | ||||
-rw-r--r-- | arch/mips/kernel/head.S | 3 | ||||
-rw-r--r-- | arch/mips/kernel/ptrace.c | 34 | ||||
-rw-r--r-- | arch/mips/kernel/r2300_misc.S | 3 | ||||
-rw-r--r-- | arch/mips/kernel/r2300_switch.S | 9 | ||||
-rw-r--r-- | arch/mips/kernel/r4k_fpu.S | 50 | ||||
-rw-r--r-- | arch/mips/kernel/r4k_misc.S | 3 | ||||
-rw-r--r-- | arch/mips/kernel/r4k_switch.S | 57 | ||||
-rw-r--r-- | arch/mips/ld.script.big | 3 | ||||
-rw-r--r-- | arch/mips/ld.script.little | 3 | ||||
-rw-r--r-- | arch/mips/lib/dump_tlb.c | 1 | ||||
-rw-r--r-- | arch/mips/mm/fault.c | 30 | ||||
-rw-r--r-- | arch/mips/sgi/kernel/indyIRQ.S | 3 | ||||
-rw-r--r-- | arch/mips/sni/int-handler.S | 3 | ||||
-rw-r--r-- | arch/mips/sni/io.c | 3 | ||||
-rw-r--r-- | arch/mips/tools/offset.c | 3 |
23 files changed, 88 insertions, 170 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index d0e4406da..34e875891 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.13 1998/08/17 10:16:23 ralf Exp $ +# $Id: Makefile,v 1.18 1999/06/21 22:16:10 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 @@ -18,44 +18,27 @@ # ifdef CONFIG_CPU_LITTLE_ENDIAN tool-prefix = mipsel-linux- -ifdef CONFIG_MIPS_ECOFF -oformat = ecoff-littlemips -else -oformat = elf32-littlemips -endif else tool-prefix = mips-linux- -ifdef CONFIG_MIPS_ECOFF -oformat = ecoff-bigmips -else -oformat = elf32-bigmips -endif endif ifdef CONFIG_CROSSCOMPILE CROSS_COMPILE = $(tool-prefix) endif -LINKFLAGS = -static -N -MODFLAGS += -mlong-calls - # -# The new ELF GCC uses -G0 -mabicalls -fpic as default. We don't need PIC +# The ELF GCC uses -G0 -mabicalls -fpic as default. We don't need PIC # code in the kernel since it only slows down the whole thing. For the # old GCC these options are just the defaults. At some point we might # make use of global pointer optimizations. # # The DECStation requires an ECOFF kernel for remote booting, other MIPS -# machines may also. +# machines may also. Since BFD is incredibly buggy with respect to +# crossformat linking we rely on the elf2ecoff tool for format conversion. # -ifdef CONFIG_ELF_KERNEL -CFLAGS += -G 0 -mno-abicalls -fno-pic -LINKFLAGS += -G 0 -endif -ifdef CONFIG_ECOFF_KERNEL CFLAGS += -G 0 -mno-abicalls -fno-pic -LINKFLAGS += -G 0 -oformat ecoff-littlemips -endif +LINKFLAGS += -static -G 0 -N +MODFLAGS += -mlong-calls ifdef CONFIG_REMOTE_DEBUG CFLAGS := $(CFLAGS) -g @@ -171,7 +154,7 @@ CFLAGS += -pipe HEAD := arch/mips/kernel/head.o arch/mips/kernel/init_task.o -SUBDIRS := $(SUBDIRS) $(addprefix arch/mips/, kernel mm lib tools) +SUBDIRS := $(addprefix arch/mips/, tools) $(SUBDIRS) $(addprefix arch/mips/, kernel mm lib) CORE_FILES := arch/mips/kernel/kernel.o arch/mips/mm/mm.o $(CORE_FILES) LIBS := arch/mips/lib/lib.a $(LIBS) diff --git a/arch/mips/baget/bagetIRQ.S b/arch/mips/baget/bagetIRQ.S index 01dd5a64d..4990a9cf6 100644 --- a/arch/mips/baget/bagetIRQ.S +++ b/arch/mips/baget/bagetIRQ.S @@ -1,11 +1,10 @@ -/* $Id$ +/* $Id: bagetIRQ.S,v 1.1 1999/01/17 03:49:37 ralf Exp $ * bagetIRQ.S: Interrupt exception dispatch code for Baget/MIPS * * Copyright (C) 1998 Gleb Raiko & Vladimir Roganov */ #include <asm/asm.h> -#include <asm/mipsconfig.h> #include <asm/mipsregs.h> #include <asm/regdef.h> #include <asm/stackframe.h> diff --git a/arch/mips/config.in b/arch/mips/config.in index 07a29e652..b203f2069 100644 --- a/arch/mips/config.in +++ b/arch/mips/config.in @@ -1,4 +1,4 @@ -# $Id: config.in,v 1.27 1999/06/17 13:25:44 ralf Exp $ +# $Id: config.in,v 1.28 1999/08/13 17:07:25 harald Exp $ # For a description of the syntax of this configuration file, # see the Configure script. # @@ -116,9 +116,6 @@ fi define_bool CONFIG_BINFMT_AOUT n define_bool CONFIG_BINFMT_ELF y tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC -if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then - tristate 'Kernel support for JAVA binaries (obsolete)' CONFIG_BINFMT_JAVA -fi bool 'Networking support' CONFIG_NET bool 'System V IPC' CONFIG_SYSVIPC diff --git a/arch/mips/jazz/int-handler.S b/arch/mips/jazz/int-handler.S index d2f2f6cc7..a05cf7cfa 100644 --- a/arch/mips/jazz/int-handler.S +++ b/arch/mips/jazz/int-handler.S @@ -1,4 +1,4 @@ -/* $Id: int-handler.S,v 1.13 1999/02/25 21:56:30 tsbogend Exp $ +/* $Id: int-handler.S,v 1.14 1999/05/01 22:40:34 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 @@ -14,7 +14,6 @@ * cycle is a good cycle. */ #include <asm/asm.h> -#include <asm/mipsconfig.h> #include <asm/mipsregs.h> #include <asm/jazz.h> #include <asm/regdef.h> diff --git a/arch/mips/jazz/io.c b/arch/mips/jazz/io.c index a151b99fe..559dabeae 100644 --- a/arch/mips/jazz/io.c +++ b/arch/mips/jazz/io.c @@ -8,7 +8,6 @@ * Copyright (C) 1997 by Ralf Baechle. */ #include <linux/string.h> -#include <asm/mipsconfig.h> #include <asm/addrspace.h> #include <asm/system.h> #include <asm/spinlock.h> diff --git a/arch/mips/jazz/jazzdma.c b/arch/mips/jazz/jazzdma.c index d249a296a..bb8007bf1 100644 --- a/arch/mips/jazz/jazzdma.c +++ b/arch/mips/jazz/jazzdma.c @@ -13,7 +13,6 @@ #include <linux/errno.h> #include <linux/mm.h> #include <asm/mipsregs.h> -#include <asm/mipsconfig.h> #include <asm/jazz.h> #include <asm/io.h> #include <asm/uaccess.h> diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S index a740bac27..1f6533ead 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.14 1999/04/12 19:13:21 harald Exp $ + * $Id: entry.S,v 1.15 1999/07/26 19:42:40 harald Exp $ */ /* @@ -23,7 +23,6 @@ #include <asm/current.h> #include <asm/errno.h> #include <asm/mipsregs.h> -#include <asm/mipsconfig.h> #include <asm/page.h> #include <asm/pgtable.h> #include <asm/stackframe.h> diff --git a/arch/mips/kernel/gdb-low.S b/arch/mips/kernel/gdb-low.S index a379c5c5b..dff18ca12 100644 --- a/arch/mips/kernel/gdb-low.S +++ b/arch/mips/kernel/gdb-low.S @@ -5,14 +5,13 @@ * * Copyright (C) 1995 Andreas Busse * - * $Id:$ + * $Id: gdb-low.S,v 1.4 1997/12/01 17:57:26 ralf Exp $ */ #include <linux/sys.h> #include <asm/asm.h> #include <asm/mipsregs.h> -#include <asm/mipsconfig.h> #include <asm/regdef.h> #include <asm/stackframe.h> #include <asm/gdb-stub.h> diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index 72d42a2da..acc666083 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S @@ -1,4 +1,4 @@ -/* $Id: head.S,v 1.11 1998/10/18 13:27:12 tsbogend Exp $ +/* $Id: head.S,v 1.12 1999/07/26 19:42:40 harald Exp $ * * arch/mips/kernel/head.S * @@ -26,7 +26,6 @@ #include <asm/regdef.h> #include <asm/cachectl.h> #include <asm/mipsregs.h> -#include <asm/mipsconfig.h> #include <asm/stackframe.h> #include <asm/bootinfo.h> #include <asm/cpu.h> diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index 9350a3be0..c8e3d23b6 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c @@ -1,4 +1,4 @@ -/* $Id: ptrace.c,v 1.13 1999/06/17 13:25:46 ralf Exp $ +/* $Id: ptrace.c,v 1.15 1999/08/09 19:43:14 harald 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 @@ -348,17 +348,13 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) break; case FPR_BASE ... FPR_BASE + 31: if (child->used_math) { - unsigned long long *fregs; - if (last_task_used_math == child) { enable_cp1(); save_fp(child); disable_cp1(); last_task_used_math = NULL; } - fregs = (unsigned long long *) - &child->tss.fpu.hard.fp_regs[0]; - tmp = (unsigned long) fregs[(addr - 32)]; + tmp = child->tss.fpu.hard.fp_regs[addr - 32]; } else { tmp = -1; /* FP not yet used */ } @@ -381,9 +377,15 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) case FPC_CSR: tmp = child->tss.fpu.hard.control; break; - case FPC_EIR: /* implementation / version register */ - tmp = 0; /* XXX */ + case FPC_EIR: { /* implementation / version register */ + unsigned int flags; + + __save_flags(flags); + enable_cp1(); + __asm__ __volatile__("cfc1\t%0,$0": "=r" (tmp)); + __restore_flags(flags); break; + } default: tmp = 0; res = -EIO; @@ -401,22 +403,24 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) goto out; case PTRACE_POKEUSR: { - unsigned long long *fregs; struct pt_regs *regs; int res = 0; + regs = (struct pt_regs *) ((unsigned long) child + + KERNEL_STACK_SIZE - 32 - sizeof(struct pt_regs)); switch (addr) { case 0 ... 31: - regs = (struct pt_regs *) ((unsigned long) child + - KERNEL_STACK_SIZE - 32 - sizeof(struct pt_regs)); + regs->regs[addr] = data; break; - case FPR_BASE ... FPR_BASE + 31: + case FPR_BASE ... FPR_BASE + 31: { + unsigned int *fregs; if (child->used_math) { if (last_task_used_math == child) { enable_cp1(); save_fp(child); disable_cp1(); last_task_used_math = NULL; + regs->cp0_status &= ~ST0_CU1; } } else { /* FP not yet used */ @@ -424,10 +428,10 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) sizeof(child->tss.fpu.hard)); child->tss.fpu.hard.control = 0; } - fregs = (unsigned long long *) - &child->tss.fpu.hard.fp_regs[0]; - fregs[(addr - 32)] = (unsigned long long) data; + fregs = child->tss.fpu.hard.fp_regs; + fregs[addr - FPR_BASE] = data; break; + } case PC: regs->cp0_epc = data; break; diff --git a/arch/mips/kernel/r2300_misc.S b/arch/mips/kernel/r2300_misc.S index 23869af7d..e5bef295f 100644 --- a/arch/mips/kernel/r2300_misc.S +++ b/arch/mips/kernel/r2300_misc.S @@ -1,4 +1,4 @@ -/* $Id: misc.S,v 1.3 1999/05/01 22:40:36 ralf Exp $ +/* $Id: r2300_misc.S,v 1.4 1999/08/09 19:43:14 harald Exp $ * misc.S: Misc. exception handling code for R3000/R2000. * * Copyright (C) 1994, 1995, 1996 by Ralf Baechle and Andreas Busse @@ -17,7 +17,6 @@ #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> diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S index 9341a31e0..710345c00 100644 --- a/arch/mips/kernel/r2300_switch.S +++ b/arch/mips/kernel/r2300_switch.S @@ -1,4 +1,4 @@ -/* $Id: r2300_switch.S,v 1.6 1999/06/13 16:30:32 ralf Exp $ +/* $Id: r2300_switch.S,v 1.7 1999/08/09 19:43:14 harald Exp $ * * r2300_switch.S: R2300 specific task switching code. * @@ -16,7 +16,6 @@ #include <asm/cachectl.h> #include <asm/current.h> #include <asm/fpregdef.h> -#include <asm/mipsconfig.h> #include <asm/mipsregs.h> #include <asm/offset.h> #include <asm/page.h> @@ -87,12 +86,12 @@ LEAF(lazy_fpu_switch) and t1, t3 sw t1, ST_OFF(a0) swc1 $f0, (THREAD_FPU + 0x00)(a0) - FPU_SAVE(a0, t1) # clobbers t1 + FPU_SAVE_SINGLE(a0, t1) # clobbers t1 2: lwc1 $f0, (THREAD_FPU + 0x00)($28) .set reorder - FPU_RESTORE($28, t0) # clobbers t0 + FPU_RESTORE_SINGLE($28, t0) # clobbers t0 jr ra END(lazy_fpu_switch) @@ -101,7 +100,7 @@ LEAF(lazy_fpu_switch) */ .set noreorder LEAF(save_fp) - FPU_SAVE(a0, t1) # clobbers t1 + FPU_SAVE_SINGLE(a0, t1) # clobbers t1 jr ra swc1 $f0, (THREAD_FPU + 0x00)(a0) END(save_fp) diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S index dbd2eba43..39ec93b57 100644 --- a/arch/mips/kernel/r4k_fpu.S +++ b/arch/mips/kernel/r4k_fpu.S @@ -10,7 +10,7 @@ * Multi-arch abstraction and asm macros for easier reading: * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) * - * $Id: r4k_fpu.S,v 1.5 1999/05/01 22:40:36 ralf Exp $ + * $Id: r4k_fpu.S,v 1.6 1999/08/09 19:43:15 harald Exp $ */ #include <asm/asm.h> #include <asm/fpregdef.h> @@ -28,28 +28,7 @@ .set mips3 /* Save floating point context */ LEAF(save_fp_context) - mfc0 t1,CP0_STATUS - sll t2,t1,5 - - bgez t2,1f - cfc1 t1,fcr31 - /* Store the 16 odd double precision registers */ - EX(sdc1 $f1,(SC_FPREGS+8)(a0)) - EX(sdc1 $f3,(SC_FPREGS+24)(a0)) - EX(sdc1 $f5,(SC_FPREGS+40)(a0)) - EX(sdc1 $f7,(SC_FPREGS+56)(a0)) - EX(sdc1 $f9,(SC_FPREGS+72)(a0)) - EX(sdc1 $f11,(SC_FPREGS+88)(a0)) - EX(sdc1 $f13,(SC_FPREGS+104)(a0)) - EX(sdc1 $f15,(SC_FPREGS+120)(a0)) - EX(sdc1 $f17,(SC_FPREGS+136)(a0)) - EX(sdc1 $f19,(SC_FPREGS+152)(a0)) - EX(sdc1 $f21,(SC_FPREGS+168)(a0)) - EX(sdc1 $f23,(SC_FPREGS+184)(a0)) - EX(sdc1 $f25,(SC_FPREGS+200)(a0)) - EX(sdc1 $f27,(SC_FPREGS+216)(a0)) - EX(sdc1 $f29,(SC_FPREGS+232)(a0)) - EX(sdc1 $f31,(SC_FPREGS+248)(a0)) + cfc1 t1,fcr31 /* Store the 16 even double precision registers */ 1: @@ -88,30 +67,7 @@ LEAF(save_fp_context) * stack frame which might have been changed by the user. */ LEAF(restore_fp_context) - mfc0 t1, CP0_STATUS - sll t0,t1,5 - bgez t0,1f - EX(lw t0,SC_FPC_CSR(a0)) - - /* Restore the 16 odd double precision registers only - * when enabled in the cp0 status register. - */ - EX(ldc1 $f1,(SC_FPREGS+8)(a0)) - EX(ldc1 $f3,(SC_FPREGS+24)(a0)) - EX(ldc1 $f5,(SC_FPREGS+40)(a0)) - EX(ldc1 $f7,(SC_FPREGS+56)(a0)) - EX(ldc1 $f9,(SC_FPREGS+72)(a0)) - EX(ldc1 $f11,(SC_FPREGS+88)(a0)) - EX(ldc1 $f13,(SC_FPREGS+104)(a0)) - EX(ldc1 $f15,(SC_FPREGS+120)(a0)) - EX(ldc1 $f17,(SC_FPREGS+136)(a0)) - EX(ldc1 $f19,(SC_FPREGS+152)(a0)) - EX(ldc1 $f21,(SC_FPREGS+168)(a0)) - EX(ldc1 $f23,(SC_FPREGS+184)(a0)) - EX(ldc1 $f25,(SC_FPREGS+200)(a0)) - EX(ldc1 $f27,(SC_FPREGS+216)(a0)) - EX(ldc1 $f29,(SC_FPREGS+232)(a0)) - EX(ldc1 $f31,(SC_FPREGS+248)(a0)) + EX(lw t0,SC_FPC_CSR(a0)) /* * Restore the 16 even double precision registers diff --git a/arch/mips/kernel/r4k_misc.S b/arch/mips/kernel/r4k_misc.S index e4e2801a9..c791f3275 100644 --- a/arch/mips/kernel/r4k_misc.S +++ b/arch/mips/kernel/r4k_misc.S @@ -6,7 +6,7 @@ * Multi-cpu abstraction and reworking: * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) * - * $Id: r4k_misc.S,v 1.4 1997/12/01 17:57:30 ralf Exp $ + * $Id: r4k_misc.S,v 1.5 1999/08/09 19:43:15 harald Exp $ */ #include <asm/asm.h> #include <asm/current.h> @@ -15,7 +15,6 @@ #include <asm/cachectl.h> #include <asm/current.h> #include <asm/fpregdef.h> -#include <asm/mipsconfig.h> #include <asm/mipsregs.h> #include <asm/page.h> #include <asm/pgtable.h> diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S index 842bc1c38..8f16bdd80 100644 --- a/arch/mips/kernel/r4k_switch.S +++ b/arch/mips/kernel/r4k_switch.S @@ -1,4 +1,4 @@ -/* $Id: r4k_switch.S,v 1.7 1999/06/13 16:30:32 ralf Exp $ +/* $Id: r4k_switch.S,v 1.8 1999/08/09 19:43:15 harald 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 @@ -13,7 +13,6 @@ #include <asm/cachectl.h> #include <asm/current.h> #include <asm/fpregdef.h> -#include <asm/mipsconfig.h> #include <asm/mipsregs.h> #include <asm/offset.h> #include <asm/page.h> @@ -76,41 +75,26 @@ LEAF(lazy_fpu_switch) beqz a0, 2f # Save floating point state nor t3, zero, t3 + lw t1, ST_OFF(a0) # last thread looses fpu and t1, t3 sw t1, ST_OFF(a0) - sll t2, t1, 5 - bgez t2, 1f - sdc1 $f0, (THREAD_FPU + 0x00)(a0) - FPU_SAVE_16ODD(a0) -1: - FPU_SAVE_16EVEN(a0, t1) # clobbers t1 + + + FPU_SAVE_DOUBLE(a0, t1) # clobbers t1 2: - sll t0, t0, 5 # load new fp state - bgez t0, 1f - ldc1 $f0, (THREAD_FPU + 0x00)($28) - FPU_RESTORE_16ODD($28) -1: .set reorder - FPU_RESTORE_16EVEN($28, t0) # clobbers t0 + FPU_RESTORE_DOUBLE($28, t0) # clobbers t0 jr ra END(lazy_fpu_switch) /* * Save a thread's fp context. */ - .set noreorder LEAF(save_fp) - mfc0 t0, CP0_STATUS - sll t1, t0, 5 - bgez t1, 1f # 16 register mode? - nop - FPU_SAVE_16ODD(a0) -1: - FPU_SAVE_16EVEN(a0, t1) # clobbers t1 + FPU_SAVE_DOUBLE(a0, t1) # clobbers t1 jr ra - sdc1 $f0, (THREAD_FPU + 0x00)(a0) END(save_fp) /* @@ -128,32 +112,13 @@ LEAF(init_fpu) li t1, 0x20000000 or t0, t1 mtc0 t0, CP0_STATUS - sll t0, t0, 5 li t1, FPU_DEFAULT ctc1 t1, fcr31 - bgez t0, 1f # 16 / 32 register mode? - li t0, -1 - - dmtc1 t0, $f1 - dmtc1 t0, $f3 - dmtc1 t0, $f5 - dmtc1 t0, $f7 - dmtc1 t0, $f9 - dmtc1 t0, $f11 - dmtc1 t0, $f13 - dmtc1 t0, $f15 - dmtc1 t0, $f17 - dmtc1 t0, $f19 - dmtc1 t0, $f21 - dmtc1 t0, $f23 - dmtc1 t0, $f25 - dmtc1 t0, $f27 - dmtc1 t0, $f29 - dmtc1 t0, $f31 - -1: dmtc1 t0, $f0 + li t0, -1 + + dmtc1 t0, $f0 dmtc1 t0, $f2 dmtc1 t0, $f4 dmtc1 t0, $f6 @@ -168,6 +133,8 @@ LEAF(init_fpu) dmtc1 t0, $f24 dmtc1 t0, $f26 dmtc1 t0, $f28 + .set noreorder jr ra dmtc1 t0, $f30 + .set reorder END(init_fpu) diff --git a/arch/mips/ld.script.big b/arch/mips/ld.script.big index 7181d0886..c1b63b691 100644 --- a/arch/mips/ld.script.big +++ b/arch/mips/ld.script.big @@ -86,6 +86,7 @@ SECTIONS __bss_start = .; _fbss = .; + .sbss : { *(.sbss) *(.scommon) } .bss : { *(.dynbss) @@ -93,8 +94,6 @@ SECTIONS *(COMMON) _end = . ; PROVIDE (end = .); - *(.sbss) - *(.scommon) } /* These are needed for ELF backends which have not yet been converted to the new style linker. */ diff --git a/arch/mips/ld.script.little b/arch/mips/ld.script.little index 7e638d739..ba8df4b6e 100644 --- a/arch/mips/ld.script.little +++ b/arch/mips/ld.script.little @@ -86,6 +86,7 @@ SECTIONS __bss_start = .; _fbss = .; + .sbss : { *(.sbss) *(.scommon) } .bss : { *(.dynbss) @@ -93,8 +94,6 @@ SECTIONS *(COMMON) _end = . ; PROVIDE (end = .); - *(.sbss) - *(.scommon) } /* These are needed for ELF backends which have not yet been converted to the new style linker. */ diff --git a/arch/mips/lib/dump_tlb.c b/arch/mips/lib/dump_tlb.c index 6205719f5..d4d81ce61 100644 --- a/arch/mips/lib/dump_tlb.c +++ b/arch/mips/lib/dump_tlb.c @@ -11,7 +11,6 @@ #include <asm/bootinfo.h> #include <asm/cachectl.h> -#include <asm/mipsconfig.h> #include <asm/mipsregs.h> #include <asm/page.h> #include <asm/pgtable.h> diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index fbcea015d..cacb97115 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c @@ -1,4 +1,4 @@ -/* $Id: fault.c,v 1.9 1999/01/04 16:03:53 ralf Exp $ +/* $Id: fault.c,v 1.10 1999/08/09 19:43:16 harald 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 @@ -83,7 +83,15 @@ good_area: if (!(vma->vm_flags & (VM_READ | VM_EXEC))) goto bad_area; } - handle_mm_fault(tsk, vma, address, writeaccess); + + /* + * If for any reason at all we couldn't handle the fault, + * make sure we exit gracefully rather than endlessly redo + * the fault. + */ + if (!handle_mm_fault(tsk, vma, address, writeaccess)) + goto do_sigbus; + up(&mm->mmap_sem); return; @@ -134,4 +142,22 @@ no_context: address, regs->cp0_epc, regs->regs[31]); die("Oops", regs, writeaccess); do_exit(SIGKILL); + +/* + * We ran out of memory, or some other thing happened to us that made + * us unable to handle the page fault gracefully. + */ +do_sigbus: + up(&mm->mmap_sem); + + /* + * Send a sigbus, regardless of whether we were in kernel + * or user mode. + */ + tsk->tss.cp0_badvaddr = address; + force_sig(SIGBUS, tsk); + + /* Kernel mode? Handle exceptions or die */ + if (!user_mode(regs)) + goto no_context; } diff --git a/arch/mips/sgi/kernel/indyIRQ.S b/arch/mips/sgi/kernel/indyIRQ.S index d6b72dfcb..fd8e2a1dd 100644 --- a/arch/mips/sgi/kernel/indyIRQ.S +++ b/arch/mips/sgi/kernel/indyIRQ.S @@ -1,4 +1,4 @@ -/* $Id: indyIRQ.S,v 1.2 1997/12/01 17:57:37 ralf Exp $ +/* $Id: indyIRQ.S,v 1.3 1998/03/22 23:27:17 ralf Exp $ * indyIRQ.S: Interrupt exception dispatch code for FullHouse and * Guiness. * @@ -6,7 +6,6 @@ */ #include <asm/asm.h> -#include <asm/mipsconfig.h> #include <asm/mipsregs.h> #include <asm/regdef.h> #include <asm/stackframe.h> diff --git a/arch/mips/sni/int-handler.S b/arch/mips/sni/int-handler.S index fbda9cb26..57dfd661f 100644 --- a/arch/mips/sni/int-handler.S +++ b/arch/mips/sni/int-handler.S @@ -1,11 +1,10 @@ -/* $Id: int-handler.S,v 1.3 1998/05/07 23:44:01 ralf Exp $ +/* $Id: int-handler.S,v 1.4 1999/01/04 16:03:58 ralf Exp $ * * SNI RM200 PCI specific interrupt handler code. * * Copyright (C) 1994 - 1997 by Ralf Baechle */ #include <asm/asm.h> -#include <asm/mipsconfig.h> #include <asm/mipsregs.h> #include <asm/regdef.h> #include <asm/sni.h> diff --git a/arch/mips/sni/io.c b/arch/mips/sni/io.c index a59df4565..99b991ef6 100644 --- a/arch/mips/sni/io.c +++ b/arch/mips/sni/io.c @@ -1,4 +1,4 @@ -/* $Id: io.c,v 1.2 1998/04/05 11:24:06 ralf Exp $ +/* $Id: io.c,v 1.3 1999/01/04 16:03:58 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 @@ -7,7 +7,6 @@ * Low level I/O functions for SNI. */ #include <linux/string.h> -#include <asm/mipsconfig.h> #include <asm/addrspace.h> #include <asm/system.h> #include <asm/spinlock.h> diff --git a/arch/mips/tools/offset.c b/arch/mips/tools/offset.c index db91ed1f4..f32f3e76e 100644 --- a/arch/mips/tools/offset.c +++ b/arch/mips/tools/offset.c @@ -1,4 +1,4 @@ -/* $Id: offset.c,v 1.10 1998/08/19 21:53:53 ralf Exp $ +/* $Id: offset.c,v 1.9 1998/08/25 09:14:52 ralf Exp $ * * offset.c: Calculate pt_regs and task_struct offsets. * @@ -82,6 +82,7 @@ void output_task_defines(void) offset("#define TASK_COUNTER ", struct task_struct, counter); offset("#define TASK_PRIORITY ", struct task_struct, priority); offset("#define TASK_MM ", struct task_struct, mm); + size("#define TASK_STRUCT_SIZE ", struct task_struct); linefeed; } |