freebsd-dev/sys/amd64
Konstantin Belousov 83b22b05e6 Introduce curpcb magic variable, similar to curthread, which is MD
amd64.  It is implemented as __pure2 inline with non-volatile asm read
from pcpu, which allows a compiler to cache its results.

Convert most PCPU_GET(pcb) and curthread->td_pcb accesses into curpcb.

Note that __curthread() uses magic value 0 as an offsetof(struct pcpu,
pc_curthread). It seems to be done this way due to machine/pcpu.h
needs to be processed before sys/pcpu.h, because machine/pcpu.h
contributes machine-depended fields to the struct pcpu definition. As
result, machine/pcpu.h cannot use struct pcpu yet.

The __curpcb() also uses a magic constant instead of offsetof(struct
pcpu, pc_curpcb) for the same reason. The constants are now defined as
symbols and CTASSERTs are added to ensure that future KBI changes do
not break the code.

Requested and reviewed by: bde
MFC after:    3 weeks
2012-07-19 19:09:12 +00:00
..
acpica - Remove unused code for CR3 and CR4. 2012-06-13 22:53:56 +00:00
amd64 Introduce curpcb magic variable, similar to curthread, which is MD 2012-07-19 19:09:12 +00:00
compile
conf tws(4) is interfaced with CAM so move it to the same section. 2012-07-01 08:10:49 +00:00
ia32 Eliminate ia32_reg.h by moving its contents to x86 and ia64 reg.h. 2012-03-18 19:12:11 +00:00
include Introduce curpcb magic variable, similar to curthread, which is MD 2012-07-19 19:09:12 +00:00
linux32 Regenerate system call tables. 2012-05-25 21:52:57 +00:00
pci Move {amd64,i386}/pci/pci_bus.c and {amd64,i386}/include/pci_cfgreg.h to 2011-06-22 21:04:13 +00:00
Makefile Adjustments to make a tags file a bit more suitable to amd64. 2008-12-01 14:15:10 +00:00