Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/swtch.S
| Show All 25 Lines | |||||
| * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
| * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
| * SUCH DAMAGE. | * SUCH DAMAGE. | ||||
| * | * | ||||
| */ | */ | ||||
| #include "assym.inc" | #include "assym.inc" | ||||
| #include "opt_kstack_pages.h" | #include "opt_kstack_pages.h" | ||||
| #include "opt_sched.h" | |||||
| #include <sys/elf_common.h> | #include <sys/elf_common.h> | ||||
| #include <machine/asm.h> | #include <machine/asm.h> | ||||
| #include <machine/armreg.h> | #include <machine/armreg.h> | ||||
| #include <machine/proc.h> | #include <machine/proc.h> | ||||
| .macro clear_step_flag pcbflags, tmp | .macro clear_step_flag pcbflags, tmp | ||||
| ▲ Show 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | #ifdef PERTHREAD_SSP | ||||
| add x20, x20, #(TD_MD_CANARY) | add x20, x20, #(TD_MD_CANARY) | ||||
| msr sp_el0, x20 | msr sp_el0, x20 | ||||
| #endif | #endif | ||||
| /* | /* | ||||
| * Release the old thread. | * Release the old thread. | ||||
| */ | */ | ||||
| stlr x2, [x0, #TD_LOCK] | stlr x2, [x0, #TD_LOCK] | ||||
| #if defined(SCHED_ULE) && defined(SMP) | #if defined(SMP) | ||||
| /* Spin if TD_LOCK points to a blocked_lock */ | /* Spin if TD_LOCK points to a blocked_lock */ | ||||
| ldr x2, =_C_LABEL(blocked_lock) | ldr x2, =_C_LABEL(blocked_lock) | ||||
| 1: | 1: | ||||
| ldar x3, [x1, #TD_LOCK] | ldar x3, [x1, #TD_LOCK] | ||||
| cmp x3, x2 | cmp x3, x2 | ||||
| b.eq 1b | b.eq 1b | ||||
| #endif | #endif | ||||
| ▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines | |||||