aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorJake Burkholder <jake@FreeBSD.org>2001-01-06 17:40:04 +0000
committerJake Burkholder <jake@FreeBSD.org>2001-01-06 17:40:04 +0000
commit41ed17bfec3d7948aca7ebee7aea16a5818488e8 (patch)
tree8eec561c0c5524eff3bc2a154b45552f2a4b2b55 /sys/amd64/include
parentc68159a6d8eede11766cf13896d0f7670dbd51aa (diff)
Notes
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/asmacros.h6
-rw-r--r--sys/amd64/include/pcpu.h4
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/amd64/include/asmacros.h b/sys/amd64/include/asmacros.h
index c2d89b83c446..0931404a13b9 100644
--- a/sys/amd64/include/asmacros.h
+++ b/sys/amd64/include/asmacros.h
@@ -69,10 +69,10 @@
#define NON_GPROF_ENTRY(name) GEN_ENTRY(name)
#define NON_GPROF_RET .byte 0xc3 /* opcode for `ret' */
-#ifdef SMP
+#ifdef LOCORE
#define PCPU(member) %fs:GD_ ## member
-#else
-#define PCPU(member) CNAME(globaldata) + GD_ ## member
+#define PCPU_ADDR(member, reg) movl %fs:GD_PRVSPACE,reg; \
+ addl $GD_ ## member,reg
#endif
#ifdef GPROF
diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h
index 27884997a535..90c3bd733df2 100644
--- a/sys/amd64/include/pcpu.h
+++ b/sys/amd64/include/pcpu.h
@@ -53,7 +53,7 @@
* other processors"
*/
struct globaldata {
- struct privatespace *gd_prvspace; /* self-reference */
+ struct globaldata *gd_prvspace; /* self-reference */
struct proc *gd_curproc;
struct proc *gd_npxproc;
struct pcb *gd_curpcb;
@@ -92,8 +92,6 @@ struct globaldata {
#endif
};
-extern struct globaldata globaldata;
-
SLIST_HEAD(cpuhead, globaldata);
extern struct cpuhead cpuhead;