Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/include/cpu.h
Show All 39 Lines | |||||
#ifndef _MACHINE_CPU_H_ | #ifndef _MACHINE_CPU_H_ | ||||
#define _MACHINE_CPU_H_ | #define _MACHINE_CPU_H_ | ||||
#include <machine/atomic.h> | #include <machine/atomic.h> | ||||
#include <machine/frame.h> | #include <machine/frame.h> | ||||
#include <machine/armreg.h> | #include <machine/armreg.h> | ||||
#define TRAPF_PC(tfp) ((tfp)->tf_lr) | #define TRAPF_PC(tfp) ((tfp)->tf_elr) | ||||
#define TRAPF_USERMODE(tfp) (((tfp)->tf_spsr & PSR_M_MASK) == PSR_M_EL0t) | #define TRAPF_USERMODE(tfp) (((tfp)->tf_spsr & PSR_M_MASK) == PSR_M_EL0t) | ||||
#define cpu_getstack(td) ((td)->td_frame->tf_sp) | #define cpu_getstack(td) ((td)->td_frame->tf_sp) | ||||
#define cpu_setstack(td, sp) ((td)->td_frame->tf_sp = (sp)) | #define cpu_setstack(td, sp) ((td)->td_frame->tf_sp = (sp)) | ||||
#define cpu_spinwait() __asm __volatile("yield" ::: "memory") | #define cpu_spinwait() __asm __volatile("yield" ::: "memory") | ||||
#define cpu_lock_delay() DELAY(1) | #define cpu_lock_delay() DELAY(1) | ||||
/* Extract CPU affinity levels 0-3 */ | /* Extract CPU affinity levels 0-3 */ | ||||
▲ Show 20 Lines • Show All 158 Lines • Show Last 20 Lines |