diff options
author | Jake Burkholder <jake@FreeBSD.org> | 2001-01-06 17:40:04 +0000 |
---|---|---|
committer | Jake Burkholder <jake@FreeBSD.org> | 2001-01-06 17:40:04 +0000 |
commit | 41ed17bfec3d7948aca7ebee7aea16a5818488e8 (patch) | |
tree | 8eec561c0c5524eff3bc2a154b45552f2a4b2b55 /sys/i386/include/globaldata.h | |
parent | c68159a6d8eede11766cf13896d0f7670dbd51aa (diff) |
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/i386/include/globaldata.h')
-rw-r--r-- | sys/i386/include/globaldata.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/i386/include/globaldata.h b/sys/i386/include/globaldata.h index 27884997a535..90c3bd733df2 100644 --- a/sys/i386/include/globaldata.h +++ b/sys/i386/include/globaldata.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; |