Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/arm/swtch-v6.S
| Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | |||||
| * | * | ||||
| * cpu switching functions | * cpu switching functions | ||||
| * | * | ||||
| * Created : 15/10/94 | * Created : 15/10/94 | ||||
| * | * | ||||
| */ | */ | ||||
| #include "assym.inc" | #include "assym.inc" | ||||
| #include "opt_sched.h" | |||||
| #include <machine/asm.h> | #include <machine/asm.h> | ||||
| #include <machine/asmacros.h> | #include <machine/asmacros.h> | ||||
| #include <machine/armreg.h> | #include <machine/armreg.h> | ||||
| #include <machine/sysreg.h> | #include <machine/sysreg.h> | ||||
| #include <machine/vfp.h> | #include <machine/vfp.h> | ||||
| #if defined(SMP) | #if defined(SMP) | ||||
| #define GET_PCPU(tmp, tmp2) \ | #define GET_PCPU(tmp, tmp2) \ | ||||
| ▲ Show 20 Lines • Show All 336 Lines • ▼ Show 20 Lines | sw1: | ||||
| clrex | clrex | ||||
| /* | /* | ||||
| * Registers at this point | * Registers at this point | ||||
| * r7 = new PCB | * r7 = new PCB | ||||
| * r8 = current pcpu | * r8 = current pcpu | ||||
| * r11 = newtd | * r11 = newtd | ||||
| */ | */ | ||||
| #if defined(SMP) && defined(SCHED_ULE) | #if defined(SMP) | ||||
| /* | |||||
| * 386 and amd64 do the blocked lock test only for SMP and SCHED_ULE | |||||
| * QQQ: What does it mean in reality and why is it done? | |||||
| */ | |||||
| ldr r6, =blocked_lock | ldr r6, =blocked_lock | ||||
| 1: | 1: | ||||
| ldr r3, [r11, #TD_LOCK] /* atomic write regular read */ | ldr r3, [r11, #TD_LOCK] /* atomic write regular read */ | ||||
| cmp r3, r6 | cmp r3, r6 | ||||
| beq 1b | beq 1b | ||||
| #endif | #endif | ||||
| /* We have a new curthread now so make a note it */ | /* We have a new curthread now so make a note it */ | ||||
| ▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines | |||||