diff options
author | John Baldwin <jhb@FreeBSD.org> | 2019-08-28 23:40:57 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2019-08-28 23:40:57 +0000 |
commit | e08087ee432d00542b494b9dbd7d97035fd94391 (patch) | |
tree | b75ada1d1c729ae8461d50757573da8d1f3e7b67 /sys/amd64/vmm/vmm_host.h | |
parent | 5fc7854e6932a8fae1f2a2e4dc84045eb38d6349 (diff) | |
download | src-e08087ee432d00542b494b9dbd7d97035fd94391.tar.gz src-e08087ee432d00542b494b9dbd7d97035fd94391.zip |
Use get_pcpu() to fetch the current CPU's pcpu pointer.
This avoids encoding knowledge about how pcpu objects are allocated and is
also a few instructions shorter.
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=351591
Diffstat (limited to 'sys/amd64/vmm/vmm_host.h')
-rw-r--r-- | sys/amd64/vmm/vmm_host.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/amd64/vmm/vmm_host.h b/sys/amd64/vmm/vmm_host.h index 51991e13fc6b..0129cfddd90c 100644 --- a/sys/amd64/vmm/vmm_host.h +++ b/sys/amd64/vmm/vmm_host.h @@ -72,14 +72,11 @@ vmm_get_host_gdtrbase(void) return ((uint64_t)&gdt[NGDT * curcpu]); } -struct pcpu; -extern struct pcpu __pcpu[]; - static __inline uint64_t vmm_get_host_gsbase(void) { - return ((uint64_t)&__pcpu[curcpu]); + return ((uint64_t)get_pcpu()); } #endif |