summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/cpu_switch.S7
-rw-r--r--sys/amd64/amd64/swtch.s7
-rw-r--r--sys/i386/i386/swtch.s7
3 files changed, 12 insertions, 9 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index 82e9852411f1..97958fc4120f 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.S
@@ -252,10 +252,11 @@ sw1b:
movl %eax,PCPU(CURRENTLDT)
jmp 2f
-1: pushl %edx /* Preserver pointer to pcb. */
- pushl P_MD+MD_LDT(%eax) /* passing p_md -> set_user_ldt */
+1: pushl %edx /* Preserve pointer to pcb. */
+ addl $P_MD,%eax /* Pointer to mdproc is arg. */
+ pushl %eax
call set_user_ldt /* Check and load the ldt. */
- popl %eax
+ addl $4,%esp
popl %edx
2:
diff --git a/sys/amd64/amd64/swtch.s b/sys/amd64/amd64/swtch.s
index 82e9852411f1..97958fc4120f 100644
--- a/sys/amd64/amd64/swtch.s
+++ b/sys/amd64/amd64/swtch.s
@@ -252,10 +252,11 @@ sw1b:
movl %eax,PCPU(CURRENTLDT)
jmp 2f
-1: pushl %edx /* Preserver pointer to pcb. */
- pushl P_MD+MD_LDT(%eax) /* passing p_md -> set_user_ldt */
+1: pushl %edx /* Preserve pointer to pcb. */
+ addl $P_MD,%eax /* Pointer to mdproc is arg. */
+ pushl %eax
call set_user_ldt /* Check and load the ldt. */
- popl %eax
+ addl $4,%esp
popl %edx
2:
diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s
index 82e9852411f1..97958fc4120f 100644
--- a/sys/i386/i386/swtch.s
+++ b/sys/i386/i386/swtch.s
@@ -252,10 +252,11 @@ sw1b:
movl %eax,PCPU(CURRENTLDT)
jmp 2f
-1: pushl %edx /* Preserver pointer to pcb. */
- pushl P_MD+MD_LDT(%eax) /* passing p_md -> set_user_ldt */
+1: pushl %edx /* Preserve pointer to pcb. */
+ addl $P_MD,%eax /* Pointer to mdproc is arg. */
+ pushl %eax
call set_user_ldt /* Check and load the ldt. */
- popl %eax
+ addl $4,%esp
popl %edx
2: