aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2019-10-25 20:09:42 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2019-10-25 20:09:42 +0000
commit5e921ff49ea8bb70506248a4675894729cdad8c2 (patch)
treec6839af74ba3c400522ce1fc41139fb614712d09 /sys/amd64/include
parent5dae8927356d6ce48a54d9fc608f31fa7ddf1b03 (diff)
Notes
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/md_var.h1
-rw-r--r--sys/amd64/include/pcpu_aux.h12
-rw-r--r--sys/amd64/include/proc.h3
3 files changed, 5 insertions, 11 deletions
diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h
index 237a75cf23788..8d866fee846aa 100644
--- a/sys/amd64/include/md_var.h
+++ b/sys/amd64/include/md_var.h
@@ -83,6 +83,7 @@ void fpstate_drop(struct thread *td);
void pagezero(void *addr);
void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist);
void sse2_pagezero(void *addr);
+void set_top_of_stack_td(struct thread *td);
struct savefpu *get_pcb_user_save_td(struct thread *td);
struct savefpu *get_pcb_user_save_pcb(struct pcb *pcb);
void pci_early_quirks(void);
diff --git a/sys/amd64/include/pcpu_aux.h b/sys/amd64/include/pcpu_aux.h
index 7db51e83d0396..50dfa30fbf5ba 100644
--- a/sys/amd64/include/pcpu_aux.h
+++ b/sys/amd64/include/pcpu_aux.h
@@ -57,16 +57,6 @@ __curthread(void)
return (td);
}
#define curthread (__curthread())
-
-static __inline __pure2 struct pcb *
-__curpcb(void)
-{
- struct pcb *pcb;
-
- __asm("movq %%gs:%P1,%0" : "=r" (pcb) : "n" (offsetof(struct pcpu,
- pc_curpcb)));
- return (pcb);
-}
-#define curpcb (__curpcb())
+#define curpcb (&curthread->td_md.md_pcb)
#endif /* _MACHINE_PCPU_AUX_H_ */
diff --git a/sys/amd64/include/proc.h b/sys/amd64/include/proc.h
index 21d6cce7954f4..75f357c3a53e6 100644
--- a/sys/amd64/include/proc.h
+++ b/sys/amd64/include/proc.h
@@ -36,6 +36,7 @@
#define _MACHINE_PROC_H_
#include <sys/queue.h>
+#include <machine/pcb.h>
#include <machine/segments.h>
/*
@@ -72,6 +73,8 @@ struct mdthread {
struct pmap_invl_gen md_invl_gen;
register_t md_efirt_tmp; /* (k) */
int md_efirt_dis_pf; /* (k) */
+ struct pcb md_pcb;
+ vm_offset_t md_stack_base;
};
struct mdproc {