aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include/pcpu.h
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/pcpu.h
parentc68159a6d8eede11766cf13896d0f7670dbd51aa (diff)
downloadsrc-41ed17bfec3d7948aca7ebee7aea16a5818488e8.tar.gz
src-41ed17bfec3d7948aca7ebee7aea16a5818488e8.zip
Use %fs to access per-cpu variables in uni-processor kernels the same
as multi-processor kernels. The old way made it difficult for kernel modules to be portable between uni-processor and multi-processor kernels. It is no longer necessary to jump through hoops. - always load %fs with the private segment on entry to the kernel - change the type of the self referntial pointer from struct privatespace to struct globaldata - make the globaldata symbol have value 0 in all cases, so the symbols in globals.s are always offsets, not aliases for fields in globaldata - define the globaldata space used for uniprocessor kernels in C, rather than assembler - change the assmebly language accessors to use %fs, add a macro PCPU_ADDR(member, reg), which loads the register reg with the address of the per-cpu variable member
Notes
Notes: svn path=/head/; revision=70714
Diffstat (limited to 'sys/amd64/include/pcpu.h')
-rw-r--r--sys/amd64/include/pcpu.h4
1 files changed, 1 insertions, 3 deletions
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;