freebsd-skq/sys/i386
jhb 3478c467ee Rework how we wire up interrupt sources to CPUs:
- Throw out all of the logical APIC ID stuff.  The Intel docs are somewhat
  ambiguous, but it seems that the "flat" cluster model we are currently
  using is only supported on Pentium and P6 family CPUs.  The other
  "hierarchy" cluster model that is supported on all Intel CPUs with
  local APICs is severely underdocumented.  For example, it's not clear
  if the OS needs to glean the topology of the APIC hierarchy from
  somewhere (neither ACPI nor MP Table include it) and setup the logical
  clusters based on the physical hierarchy or not.  Not only that, but on
  certain Intel chipsets, even though there were 4 CPUs in a logical
  cluster, all the interrupts were only sent to one CPU anyway.
- We now bind interrupts to individual CPUs using physical addressing via
  the local APIC IDs.  This code has also moved out of the ioapic PIC
  driver and into the common interrupt source code so that it can be
  shared with MSI interrupt sources since MSI is addressed to APICs the
  same way that I/O APIC pins are.
- Interrupt source classes grow a new method pic_assign_cpu() to bind an
  interrupt source to a specific local APIC ID.
- The SMP code now tells the interrupt code which CPUs are avaiable to
  handle interrupts in a simpler and more intuitive manner.  For one thing,
  it means we could now choose to not route interrupts to HT cores if we
  wanted to (this code is currently in place in fact, but under an #if 0
  for now).
- For now we simply do static round-robin of IRQs to CPUs when the first
  interrupt handler just as before, with the change that IRQs are now
  bound to individual CPUs rather than groups of up to 4 CPUs.
- Because the IRQ to CPU mapping has now been moved up a layer, it would
  be easier to manage this mapping from higher levels.  For example, we
  could allow drivers to specify a CPU affinity map for their interrupts,
  or we could allow a userland tool to bind IRQs to specific CPUs.

The MFC is tentative, but I want to see if this fixes problems some folks
had with UP APIC kernels on 6.0 on SMP machines (an SMP kernel would work
fine, but a UP APIC kernel (such as GENERIC in RELENG_6) would lose
interrupts).

MFC after:	1 week
2006-02-28 22:24:55 +00:00
..
acpica Catch up with ACPI-CA 20051021 import 2005-11-01 22:44:08 +00:00
bios Fix build (including both asm.h and asmacros.h is evil). 2005-07-22 15:01:07 +00:00
compile
conf Move asr driver from global NOTES to i386-specific NOTES. Requestor 2006-02-05 05:06:04 +00:00
cpufreq Add frequency-voltage tables for Intel 778, 758, 773, 753, and 733J 2006-02-25 04:55:38 +00:00
i386 Rework how we wire up interrupt sources to CPUs: 2006-02-28 22:24:55 +00:00
ibcs2 Regenerate. 2006-02-06 22:15:00 +00:00
include Rework how we wire up interrupt sources to CPUs: 2006-02-28 22:24:55 +00:00
isa Rework how we wire up interrupt sources to CPUs: 2006-02-28 22:24:55 +00:00
linux Close some races between procfs/ptrace and exit(2): 2006-02-22 18:57:50 +00:00
pci - Make pcib_devclass private to sys/dev/pci/pci_pci.c and change all the 2006-01-06 19:22:19 +00:00
svr4 Use svr4_si_{addr,code,errno,signo,trap} in preference to si_{...}. 2005-10-19 14:59:54 +00:00
xbox Cleaned the memory initialization up, moved some defines from the framebuffer 2006-02-10 18:48:22 +00:00
Makefile