mirror of
https://github.com/torvalds/linux.git
synced 2024-11-07 04:32:03 +00:00
61619b1207
The changes in the mmu version of entry.h (entry_mm.h) and the non-mmu version (entry_no.h) are not about the presence or use of an MMU at all. The main changes are to support the ColdFire processors. The code for trap entry and exit for all types of 68k processor outside coldfire is the same. So merge the files back to a single entry.h and share the common 68k entry/exit code. Some changes are required for the non-mmu entry handlers to adopt the differing macros for system call and interrupt entry, but this is quite strait forward. The changes for the ColdFire remove a couple of instructions for the separate a7 register case, and are no worse for the older single a7 register case. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
134 lines
2.6 KiB
ArmAsm
134 lines
2.6 KiB
ArmAsm
/*
|
|
* linux/arch/m68knommu/kernel/entry.S
|
|
*
|
|
* Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com)
|
|
* Copyright (C) 1998 D. Jeff Dionne <jeff@lineo.ca>,
|
|
* Kenneth Albanowski <kjahds@kjahds.com>,
|
|
* Copyright (C) 2000 Lineo Inc. (www.lineo.com)
|
|
*
|
|
* Based on:
|
|
*
|
|
* linux/arch/m68k/kernel/entry.S
|
|
*
|
|
* Copyright (C) 1991, 1992 Linus Torvalds
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file README.legal in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* Linux/m68k support by Hamish Macdonald
|
|
*
|
|
* 68060 fixes by Jesper Skov
|
|
* ColdFire support by Greg Ungerer (gerg@snapgear.com)
|
|
* 5307 fixes by David W. Miller
|
|
* linux 2.4 support David McCullough <davidm@snapgear.com>
|
|
*/
|
|
|
|
#include <linux/linkage.h>
|
|
#include <asm/errno.h>
|
|
#include <asm/setup.h>
|
|
#include <asm/segment.h>
|
|
#include <asm/asm-offsets.h>
|
|
#include <asm/entry.h>
|
|
#include <asm/unistd.h>
|
|
|
|
.text
|
|
|
|
.globl buserr
|
|
.globl trap
|
|
.globl ret_from_exception
|
|
.globl ret_from_signal
|
|
.globl sys_fork
|
|
.globl sys_clone
|
|
.globl sys_vfork
|
|
|
|
ENTRY(buserr)
|
|
SAVE_ALL_INT
|
|
moveq #-1,%d0
|
|
movel %d0,%sp@(PT_OFF_ORIG_D0)
|
|
movel %sp,%sp@- /* stack frame pointer argument */
|
|
jsr buserr_c
|
|
addql #4,%sp
|
|
jra ret_from_exception
|
|
|
|
ENTRY(trap)
|
|
SAVE_ALL_INT
|
|
moveq #-1,%d0
|
|
movel %d0,%sp@(PT_OFF_ORIG_D0)
|
|
movel %sp,%sp@- /* stack frame pointer argument */
|
|
jsr trap_c
|
|
addql #4,%sp
|
|
jra ret_from_exception
|
|
|
|
#ifdef TRAP_DBG_INTERRUPT
|
|
|
|
.globl dbginterrupt
|
|
ENTRY(dbginterrupt)
|
|
SAVE_ALL_INT
|
|
moveq #-1,%d0
|
|
movel %d0,%sp@(PT_OFF_ORIG_D0)
|
|
movel %sp,%sp@- /* stack frame pointer argument */
|
|
jsr dbginterrupt_c
|
|
addql #4,%sp
|
|
jra ret_from_exception
|
|
#endif
|
|
|
|
ENTRY(reschedule)
|
|
/* save top of frame */
|
|
pea %sp@
|
|
jbsr set_esp0
|
|
addql #4,%sp
|
|
pea ret_from_exception
|
|
jmp schedule
|
|
|
|
ENTRY(ret_from_fork)
|
|
movel %d1,%sp@-
|
|
jsr schedule_tail
|
|
addql #4,%sp
|
|
jra ret_from_exception
|
|
|
|
ENTRY(sys_fork)
|
|
SAVE_SWITCH_STACK
|
|
pea %sp@(SWITCH_STACK_SIZE)
|
|
jbsr m68k_fork
|
|
addql #4,%sp
|
|
RESTORE_SWITCH_STACK
|
|
rts
|
|
|
|
ENTRY(sys_vfork)
|
|
SAVE_SWITCH_STACK
|
|
pea %sp@(SWITCH_STACK_SIZE)
|
|
jbsr m68k_vfork
|
|
addql #4,%sp
|
|
RESTORE_SWITCH_STACK
|
|
rts
|
|
|
|
ENTRY(sys_clone)
|
|
SAVE_SWITCH_STACK
|
|
pea %sp@(SWITCH_STACK_SIZE)
|
|
jbsr m68k_clone
|
|
addql #4,%sp
|
|
RESTORE_SWITCH_STACK
|
|
rts
|
|
|
|
ENTRY(sys_sigreturn)
|
|
SAVE_SWITCH_STACK
|
|
jbsr do_sigreturn
|
|
RESTORE_SWITCH_STACK
|
|
rts
|
|
|
|
ENTRY(sys_rt_sigreturn)
|
|
SAVE_SWITCH_STACK
|
|
jbsr do_rt_sigreturn
|
|
RESTORE_SWITCH_STACK
|
|
rts
|
|
|
|
ENTRY(ret_from_user_signal)
|
|
moveq #__NR_sigreturn,%d0
|
|
trap #0
|
|
|
|
ENTRY(ret_from_user_rt_signal)
|
|
movel #__NR_rt_sigreturn,%d0
|
|
trap #0
|
|
|