summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64
diff options
context:
space:
mode:
authorLuiz Souza <luiz@netgate.com>2018-05-08 12:22:58 -0300
committerLuiz Souza <luiz@netgate.com>2018-05-08 12:22:58 -0300
commit77c0e2e68638110a69edb20c8beaf1f288912b09 (patch)
tree3e8b780ae0b551c955bb8e9b0296d5a93f3513fb /sys/amd64/amd64
parent2d610b9dd3fbae01c76c63d1ff563db29b0e79a3 (diff)
parentc0eaeb9c07bf0a6724d7ebb3ed64b4e3dfcd4d16 (diff)
downloadFreeBSD-src-77c0e2e68638110a69edb20c8beaf1f288912b09.zip
FreeBSD-src-77c0e2e68638110a69edb20c8beaf1f288912b09.tar.gz
Merge remote-tracking branch 'origin/releng/11.1' into RELENG_2_4
Diffstat (limited to 'sys/amd64/amd64')
-rw-r--r--sys/amd64/amd64/cpu_switch.S6
-rw-r--r--sys/amd64/amd64/genassym.c2
-rw-r--r--sys/amd64/amd64/pmap.c6
3 files changed, 8 insertions, 6 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index 75599a5..952539f 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.S
@@ -214,10 +214,10 @@ do_kthread:
done_tss:
movq %r8,PCPU(RSP0)
movq %r8,PCPU(CURPCB)
- /* Update the TSS_RSP0 pointer for the next interrupt */
+ /* Update the COMMON_TSS_RSP0 pointer for the next interrupt */
cmpb $0,pti(%rip)
jne 1f
- movq %r8,TSS_RSP0(%rdx)
+ movq %r8,COMMON_TSS_RSP0(%rdx)
1: movq %r12,PCPU(CURTHREAD) /* into next thread */
/* Test if debug registers should be restored. */
@@ -299,7 +299,7 @@ do_tss: movq %rdx,PCPU(TSSP)
je 1f
movq PCPU(PRVSPACE),%rax
addq $PC_PTI_STACK+PC_PTI_STACK_SZ*8,%rax
- movq %rax,TSS_RSP0(%rdx)
+ movq %rax,COMMON_TSS_RSP0(%rdx)
1: movl $TSSSEL,%eax
ltr %ax
jmp done_tss
diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c
index d6c1bdf..94382ca 100644
--- a/sys/amd64/amd64/genassym.c
+++ b/sys/amd64/amd64/genassym.c
@@ -158,7 +158,7 @@ ASSYM(PCB_FULL_IRET, PCB_FULL_IRET);
ASSYM(PCB_DBREGS, PCB_DBREGS);
ASSYM(PCB_32BIT, PCB_32BIT);
-ASSYM(TSS_RSP0, offsetof(struct amd64tss, tss_rsp0));
+ASSYM(COMMON_TSS_RSP0, offsetof(struct amd64tss, tss_rsp0));
ASSYM(TF_R15, offsetof(struct trapframe, tf_r15));
ASSYM(TF_R14, offsetof(struct trapframe, tf_r14));
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index b1c7d84..64abe9b 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -2593,8 +2593,10 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, int flags)
pmap->pm_cr3 = pml4phys;
pmap_pinit_pml4(pml4pg);
if (pti) {
- pml4pgu = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL |
- VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_WAITOK);
+ while ((pml4pgu = vm_page_alloc(NULL, 0,
+ VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED))
+ == NULL)
+ VM_WAIT;
pmap->pm_pml4u = (pml4_entry_t *)PHYS_TO_DMAP(
VM_PAGE_TO_PHYS(pml4pgu));
pmap_pinit_pml4_pti(pml4pgu);
OpenPOWER on IntegriCloud