intr: Per-cpu MI interrupt information array
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 15 Dec 2011 05:47:26 +0000 (13:47 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 15 Dec 2011 06:29:45 +0000 (14:29 +0800)
commitc83c147ec7809044a209b1ea4b3cc251ab6474df
treeba3b340e951df795ac240f6223ff940c4173baa3
parent792c92cb915590da14841ba58df7c9d43c8d2290
intr: Per-cpu MI interrupt information array

- Interrupt information is only recorded in its target CPU's interrupt
  information array.
- Interrupt threads, emergency polling threads, interrupt livelock
  processing and hardware interrupt threads scheduling only access
  the interrupt information of the CPU they are running on; they have
  already been locked to the interrupt's target CPU.
- Location of SWI information is saved in a global array swi_info_ary,
  since scheduling SWI does not necessarily happens on the CPU that
  SWI thread is running, we need a quick and correct way find the SWI
  information.
- Factor out sched_ithd_intern, which accept interrupt information
  (struct intr_info) instead of interrupt number.  Split the original
  sched_ithd() into sched_ithd_soft(), which schedules SWI thread, and
  sched_ithd_hard() which schedules hardware interrupt thread.
- vmstat(8) interrupt reporting w/ -v is augmented to print the interrupts'
  target CPU.

This paves way to the per-cpu MD interrupt description table
sys/kern/kern_intr.c
sys/platform/pc32/acpica5/acpi_fadt.c
sys/platform/pc32/i386/ipl.s
sys/platform/pc32/isa/clock.c
sys/platform/pc64/acpica5/acpi_fadt.c
sys/platform/pc64/isa/clock.c
sys/platform/pc64/x86_64/ipl.s
sys/platform/vkernel/platform/machintr.c
sys/platform/vkernel64/platform/machintr.c
sys/sys/interrupt.h
usr.bin/vmstat/vmstat.c