diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-12-04 03:58:56 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-12-04 03:58:56 +0000 |
commit | 1d67e90f19a7acfd9a05dc59678e7d0c5090bd0d (patch) | |
tree | 357efc7b93f8f5102110d20d293f41360ec212fc /arch/mips64/kernel/entry.S | |
parent | aea27b2e18d69af87e673972246e66657b4fa274 (diff) |
Merge with Linux 2.3.21.
Diffstat (limited to 'arch/mips64/kernel/entry.S')
-rw-r--r-- | arch/mips64/kernel/entry.S | 115 |
1 files changed, 17 insertions, 98 deletions
diff --git a/arch/mips64/kernel/entry.S b/arch/mips64/kernel/entry.S index 297c41840..05bbee928 100644 --- a/arch/mips64/kernel/entry.S +++ b/arch/mips64/kernel/entry.S @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: entry.S,v 1.6 1999/11/23 17:12:49 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 @@ -9,20 +9,10 @@ * Copyright (C) 1994 - 1999 by Ralf Baechle * Copyright (C) 1999 Silicon Graphics */ -#include <linux/config.h> -#include <linux/sys.h> - #include <asm/asm.h> -#include <asm/current.h> -#include <asm/errno.h> -#include <asm/mipsregs.h> -#include <asm/page.h> -#include <asm/pgtable.h> #include <asm/regdef.h> +#include <asm/mipsregs.h> #include <asm/stackframe.h> -#include <asm/processor.h> -#include <asm/fpregdef.h> -#include <asm/unistd.h> /* * Heia ... The %lo, %hi and %HI stuff is too strong for the ELF assembler @@ -30,9 +20,14 @@ */ .text .set noreorder - .set mips3 .align 4 +EXPORT(ret_from_fork) + jal schedule_tail + move a0, v0 # prev + j ret_from_sys_call + nop EXPORT(handle_bottom_half) + .type handle_bottom_half,@function jal do_bottom_half nop b 9f @@ -42,16 +37,18 @@ reschedule: jal schedule nop EXPORT(ret_from_sys_call) + .type ret_from_sys_call,@function EXPORT(ret_from_irq) - lw t0,bh_mask - lw t1,bh_active # unused delay slot - and t0,t1 - bnez t0,handle_bottom_half -9: lw t0,PT_STATUS(sp) # returning to kernel mode? + .type ret_from_irq,@function + ld t0, bh_mask + ld t1, bh_active # unused delay slot + and t0, t1 + bnez t0, handle_bottom_half +9: ld t0, PT_STATUS(sp) # returning to kernel mode? andi t1, t0, 0x10 beqz t1, return # -> yes - lw t1, TASK_NEED_RESCHED($28) + ld t1, TASK_NEED_RESCHED($28) bnez t1, reschedule lw v0, TASK_SIGPENDING($28) move a0, zero @@ -61,6 +58,7 @@ EXPORT(ret_from_irq) move a1, sp EXPORT(return) .set noat + .type return,@function RESTORE_ALL eret .set at @@ -81,82 +79,3 @@ LEAF(spurious_interrupt) j ret_from_irq sw t0,%lo(spurious_count)(t1) END(spurious_interrupt) - -/* - * Build a default exception handler for the exceptions that don't need - * special handlers. If you didn't know yet - I *like* playing games with - * the C preprocessor ... - */ - .macro __build_clear_none - .endm - - .macro __build_clear_sti - STI - .endm - - .macro __build_clear_cli - CLI - .endm - - .macro __build_clear_fpe - cfc1 a1, fcr31 - li a2, ~(0x3f << 13) - and a2, a1 - ctc1 a2, fcr31 - STI - .endm - - .macro __build_clear_ade - mfc0 t0, CP0_BADVADDR - sd t0, PT_BVADDR(sp) - KMODE - .endm - - .macro __BUILD_silent exception - .endm - - /* Gas tries to parse the PRINT argument as a string containing - string escapes and emits bogus warnings if it believes to - recognize an unknown escape code. So make the arguments - start with an n and gas will believe \n is ok ... */ - .macro __BUILD_verbose nexception - ld a1, PT_EPC(sp) - PRINT("Got \nexception at %016lx") - .endm - - .macro __BUILD_count exception - .set reorder - ld t0,exception_count_\exception - daddiu t0, 1 - sd t0,exception_count_\exception - .set noreorder - .comm exception_count\exception, 8, 8 - .endm - - .macro BUILD_HANDLER exception handler clear verbose - .align 5 - NESTED(handle_\exception, PT_SIZE, sp) - .set noat - SAVE_ALL - __BUILD_clear_\clear - .set at - __BUILD_\verbose \exception - jal do_\handler - move a0,sp - j ret_from_sys_call - nop - END(handle_\exception) - .endm - - BUILD_HANDLER adel ade ade silent /* #4 */ - BUILD_HANDLER ades ade ade silent /* #5 */ - BUILD_HANDLER ibe ibe cli verbose /* #6 */ - BUILD_HANDLER dbe dbe cli silent /* #7 */ - BUILD_HANDLER bp bp sti silent /* #9 */ - BUILD_HANDLER ri ri sti silent /* #10 */ - BUILD_HANDLER cpu cpu sti silent /* #11 */ - BUILD_HANDLER ov ov sti silent /* #12 */ - BUILD_HANDLER tr tr sti silent /* #13 */ - BUILD_HANDLER fpe fpe fpe silent /* #15 */ - BUILD_HANDLER watch watch sti verbose /* #23 */ - BUILD_HANDLER reserved reserved sti verbose /* others */ |