]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Overhaul the per-CPU support a bit:
authorJohn Baldwin <jhb@FreeBSD.org>
Tue, 11 Dec 2001 23:33:44 +0000 (23:33 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 11 Dec 2001 23:33:44 +0000 (23:33 +0000)
commit0bbc882680ceece07eb134ddeb7fceffb59ea018
treec785835e70070309148a72c55669ff0bf043a20a
parentdefd4957ccd0abfd2d3d3417dfae025ee37f770e
Overhaul the per-CPU support a bit:

- The MI portions of struct globaldata have been consolidated into a MI
  struct pcpu.  The MD per-CPU data are specified via a macro defined in
  machine/pcpu.h.  A macro was chosen over a struct mdpcpu so that the
  interface would be cleaner (PCPU_GET(my_md_field) vs.
  PCPU_GET(md.md_my_md_field)).
- All references to globaldata are changed to pcpu instead.  In a UP kernel,
  this data was stored as global variables which is where the original name
  came from.  In an SMP world this data is per-CPU and ideally private to each
  CPU outside of the context of debuggers.  This also included combining
  machine/globaldata.h and machine/globals.h into machine/pcpu.h.
- The pointer to the thread using the FPU on i386 was renamed from
  npxthread to fpcurthread to be identical with other architectures.
- Make the show pcpu ddb command MI with a MD callout to display MD
  fields.
- The globaldata_register() function was renamed to pcpu_init() and now
  init's MI fields of a struct pcpu in addition to registering it with
  the internal array and list.
- A pcpu_destroy() function was added to remove a struct pcpu from the
  internal array and list.

Tested on: alpha, i386
Reviewed by: peter, jake
107 files changed:
sys/alpha/alpha/db_interface.c
sys/alpha/alpha/exception.s
sys/alpha/alpha/genassym.c
sys/alpha/alpha/interrupt.c
sys/alpha/alpha/locore.s
sys/alpha/alpha/machdep.c
sys/alpha/alpha/mp_machdep.c
sys/alpha/alpha/support.s
sys/alpha/alpha/swtch.s
sys/alpha/alpha/trap.c
sys/alpha/include/asm.h
sys/alpha/include/globaldata.h [deleted file]
sys/alpha/include/globals.h [deleted file]
sys/alpha/include/mutex.h
sys/alpha/include/pcb.h
sys/alpha/include/pcpu.h
sys/alpha/include/proc.h
sys/amd64/amd64/bios.c
sys/amd64/amd64/cpu_switch.S
sys/amd64/amd64/db_interface.c
sys/amd64/amd64/fpu.c
sys/amd64/amd64/genassym.c
sys/amd64/amd64/machdep.c
sys/amd64/amd64/mp_machdep.c
sys/amd64/amd64/mptable.c
sys/amd64/amd64/pmap.c
sys/amd64/amd64/support.S
sys/amd64/amd64/support.s
sys/amd64/amd64/swtch.s
sys/amd64/amd64/vm_machdep.c
sys/amd64/include/asmacros.h
sys/amd64/include/cpu.h
sys/amd64/include/mptable.h
sys/amd64/include/pcpu.h
sys/amd64/include/proc.h
sys/amd64/isa/npx.c
sys/i386/i386/bios.c
sys/i386/i386/db_interface.c
sys/i386/i386/genassym.c
sys/i386/i386/machdep.c
sys/i386/i386/mp_machdep.c
sys/i386/i386/mpapic.c
sys/i386/i386/mptable.c
sys/i386/i386/pmap.c
sys/i386/i386/support.s
sys/i386/i386/swtch.s
sys/i386/i386/vm86bios.s
sys/i386/i386/vm_machdep.c
sys/i386/include/asmacros.h
sys/i386/include/cpu.h
sys/i386/include/globaldata.h [deleted file]
sys/i386/include/globals.h [deleted file]
sys/i386/include/mptable.h
sys/i386/include/pcpu.h
sys/i386/include/privatespace.h
sys/i386/include/proc.h
sys/i386/isa/npx.c
sys/ia64/ia64/db_interface.c
sys/ia64/ia64/exception.S
sys/ia64/ia64/exception.s
sys/ia64/ia64/genassym.c
sys/ia64/ia64/machdep.c
sys/ia64/ia64/mp_machdep.c
sys/ia64/ia64/support.S
sys/ia64/ia64/support.s
sys/ia64/ia64/swtch.s
sys/ia64/include/globaldata.h [deleted file]
sys/ia64/include/globals.h [deleted file]
sys/ia64/include/mutex.h
sys/ia64/include/pcpu.h
sys/ia64/include/proc.h
sys/kern/init_main.c
sys/kern/kern_idle.c
sys/kern/kern_ktr.c
sys/kern/subr_pcpu.c
sys/kern/subr_smp.c
sys/pc98/i386/machdep.c
sys/pc98/pc98/machdep.c
sys/powerpc/aim/locore.S
sys/powerpc/aim/machdep.c
sys/powerpc/aim/swtch.S
sys/powerpc/include/cpufunc.h
sys/powerpc/include/globaldata.h [deleted file]
sys/powerpc/include/globals.h [deleted file]
sys/powerpc/include/mutex.h
sys/powerpc/include/pcpu.h
sys/powerpc/include/proc.h
sys/powerpc/powerpc/genassym.c
sys/powerpc/powerpc/locore.S
sys/powerpc/powerpc/locore.s
sys/powerpc/powerpc/machdep.c
sys/powerpc/powerpc/swtch.S
sys/powerpc/powerpc/swtch.s
sys/sparc64/include/asmacros.h
sys/sparc64/include/globaldata.h [deleted file]
sys/sparc64/include/globals.h [deleted file]
sys/sparc64/include/pcpu.h
sys/sparc64/include/proc.h
sys/sparc64/sparc64/db_interface.c
sys/sparc64/sparc64/exception.S
sys/sparc64/sparc64/exception.s
sys/sparc64/sparc64/genassym.c
sys/sparc64/sparc64/intr_machdep.c
sys/sparc64/sparc64/machdep.c
sys/sys/mutex.h
sys/sys/pcpu.h
sys/sys/proc.h