/[base]
ViewVC logotype

Revision 351594


Jump to revision: Previous Next
Author: kib
Date: Thu Aug 29 07:25:27 2019 UTC (4 years, 10 months ago)
Changed paths: 26
Log Message:
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


Changed paths

Path Details
Directoryhead/sys/amd64/amd64/mp_machdep.c modified , text changed
Directoryhead/sys/amd64/amd64/pmap.c modified , text changed
Directoryhead/sys/amd64/amd64/vm_machdep.c modified , text changed
Directoryhead/sys/amd64/include/counter.h modified , text changed
Directoryhead/sys/amd64/include/pcpu.h modified , text changed
Directoryhead/sys/amd64/include/pcpu_aux.h added
Directoryhead/sys/arm/arm/mp_machdep.c modified , text changed
Directoryhead/sys/arm/include/counter.h modified , text changed
Directoryhead/sys/arm/include/pcpu_aux.h added
Directoryhead/sys/arm64/arm64/mp_machdep.c modified , text changed
Directoryhead/sys/arm64/include/counter.h modified , text changed
Directoryhead/sys/arm64/include/pcpu_aux.h added
Directoryhead/sys/i386/i386/mp_machdep.c modified , text changed
Directoryhead/sys/i386/i386/vm_machdep.c modified , text changed
Directoryhead/sys/i386/include/counter.h modified , text changed
Directoryhead/sys/i386/include/pcpu.h modified , text changed
Directoryhead/sys/i386/include/pcpu_aux.h added
Directoryhead/sys/mips/include/pcpu_aux.h added
Directoryhead/sys/powerpc/include/counter.h modified , text changed
Directoryhead/sys/powerpc/include/pcpu_aux.h added
Directoryhead/sys/powerpc/powerpc/mp_machdep.c modified , text changed
Directoryhead/sys/riscv/include/counter.h modified , text changed
Directoryhead/sys/riscv/include/pcpu_aux.h added
Directoryhead/sys/riscv/riscv/mp_machdep.c modified , text changed
Directoryhead/sys/sparc64/include/pcpu_aux.h added
Directoryhead/sys/sys/pcpu.h modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27