#include <asm/unistd.h> /* For NR_syscalls definition */ #include <asm/arcregs.h> #include <asm/ptrace.h> #include <asm/processor.h> /* For VMALLOC_START */ #include <asm/mmu.h>
#ifdef __ASSEMBLER__
#ifdef CONFIG_ISA_ARCOMPACT #include <asm/entry-compact.h> /* ISA specific bits */ #else #include <asm/entry-arcv2.h> #endif
/* * save user mode callee regs as struct callee_regs * - needed by fork/do_signal/unaligned-access-emulation.
*/
.macro SAVE_CALLEE_SAVED_USER
SAVE_ABI_CALLEE_REGS
.endm
/* * restore user mode callee regs as struct callee_regs * - could have been changed by ptrace tracer or unaligned-access fixup
*/
.macro RESTORE_CALLEE_SAVED_USER
RESTORE_ABI_CALLEE_REGS
.endm
/* * save/restore kernel mode callee regs at the time of context switch
*/
.macro SAVE_CALLEE_SAVED_KERNEL
SAVE_ABI_CALLEE_REGS
.endm
/*-------------------------------------------------------------- * Super FAST Restore callee saved regs by simply re-adjusting SP
*-------------------------------------------------------------*/
.macro DISCARD_CALLEE_SAVED_USER
add sp, sp, SZ_CALLEE_REGS
.endm
/*------------------------------------------------------------- * given a tsk struct, get to the base of its kernel mode stack * tsk->thread_info is really a PAGE, whose bottom hoists stack * which grows upwards towards thread_info
*------------------------------------------------------------*/
.macro GET_TSK_STACK_BASE tsk, out
/* Get task->thread_info (this is essentially start of a PAGE) */
ld \out, [\tsk, TASK_THREAD_INFO]
/* Go to end of page where stack begins (grows upwards) */
add2 \out, \out, (THREAD_SIZE)/4
/* * Retrieve the current running task on this CPU * - loads it from backing _current_task[] (and can't use the * caching reg for current task
*/
.macro GET_CURR_TASK_ON_CPU reg
GET_CPU_ID \reg
ld.as \reg, [@_current_task, \reg]
.endm
/*------------------------------------------------- * Save a new task as the "current" task on this CPU * 1. Determine curr CPU id. * 2. Use it to index into _current_task[ ] * * Coded differently than GET_CURR_TASK_ON_CPU (which uses LD.AS) * because ST r0, [r1, offset] can ONLY have s9 @offset * while LD can take s9 (4 byte insn) or LIMM (8 byte insn)
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.