freebsd-dev/sys/riscv/include
Konstantin Belousov a2a0f90654 Centralize __pcpu definitions.
Many extern struct pcpu <something>__pcpu declarations were
copied/pasted in sources.  The issue is that the definition is MD, but
it cannot be provided by machine/pcpu.h due to actual struct pcpu
defined in sys/pcpu.h later than the inclusion of machine/pcpu.h.
This forced the copying when other code needed direct access to
__pcpu.  There is no way around it, due to machine/pcpu.h supplying
part of struct pcpu fields.

To work around the problem, add a new machine/pcpu_aux.h header, which
should fill any needed MD definitions after struct pcpu definition is
completed. This allows to remove copies of __pcpu spread around the
source.  Also on x86 it makes it possible to remove work arounds like
OFFSETOF_CURTHREAD or clang specific warnings supressions.

Reported and tested by:	lwhsu, bcran
Reviewed by:	imp, markj (previous version)
Discussed with:	jhb
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D21418
2019-08-29 07:25:27 +00:00
..
_align.h
_bus.h
_inttypes.h
_limits.h
_stdint.h
_types.h
asm.h Fix global pointer relaxations in the RISC-V kernel 2019-06-09 15:43:38 +00:00
atomic.h
bus_dma_impl.h
bus_dma.h
bus.h
clock.h
counter.h Centralize __pcpu definitions. 2019-08-29 07:25:27 +00:00
cpu.h
cpufunc.h
db_machdep.h
dump.h
efi.h
elf.h RISC-V: expose extension bits in AT_HWCAP 2019-06-11 00:55:54 +00:00
encoding.h
endian.h
exec.h
float.h
floatingpoint.h
fpe.h
frame.h
ieeefp.h
in_cksum.h
intr.h
kdb.h
machdep.h
md_var.h RISC-V: expose extension bits in AT_HWCAP 2019-06-11 00:55:54 +00:00
memdev.h
minidump.h
ofw_machdep.h
param.h
pcb.h
pcpu_aux.h Centralize __pcpu definitions. 2019-08-29 07:25:27 +00:00
pcpu.h Fix global pointer relaxations in the RISC-V kernel 2019-06-09 15:43:38 +00:00
pmap.h Move phys_avail definition into MI code. It is consumed in the MI layer and 2019-08-16 00:45:14 +00:00
pmc_mdep.h
proc.h
procctl.h
profile.h
psl.h
pte.h
ptrace.h
reg.h
reloc.h
resource.h
riscvreg.h
runq.h
sbi.h
setjmp.h
sf_buf.h
sigframe.h
signal.h
smp.h
stack.h
stdarg.h
sysarch.h
trap.h
ucontext.h
vdso.h
vm.h
vmparam.h