freebsd-nq/sys/amd64/include
John Baldwin 215e7c161a 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
..
pc Make the facility for recognizing BIOS-signatures more general 2005-07-21 09:48:37 +00:00
_bus.h
_inttypes.h
_limits.h Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and rename 2005-08-20 16:44:41 +00:00
_stdint.h
_types.h By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT into 2006-01-09 06:05:57 +00:00
acpica_machdep.h
apicreg.h
apicvar.h Rework how we wire up interrupt sources to CPUs: 2006-02-28 22:24:55 +00:00
asm.h
asmacros.h MFi386: 2005-12-08 18:33:30 +00:00
atomic.h Add a new atomic_fetchadd() primitive that atomically adds a value to a 2005-09-27 17:39:11 +00:00
bus_dma.h Fix $FreeBSD$. 2005-07-22 04:03:25 +00:00
bus.h
clock.h Tweak how the MD code calls the fooclock() methods some. Instead of 2005-12-22 22:16:09 +00:00
cpu.h Tweak how the MD code calls the fooclock() methods some. Instead of 2005-12-22 22:16:09 +00:00
cpufunc.h
cputypes.h
db_machdep.h
elf.h
endian.h
exec.h
float.h
floatingpoint.h
fpu.h
frame.h Tweak how the MD code calls the fooclock() methods some. Instead of 2005-12-22 22:16:09 +00:00
gdb_machdep.h
ieeefp.h
in_cksum.h
intr_machdep.h Rework how we wire up interrupt sources to CPUs: 2006-02-28 22:24:55 +00:00
iodev.h
kdb.h
legacyvar.h MFi386: pci attribute allocation fixes. 2005-09-18 01:42:43 +00:00
limits.h
md_var.h - Print number of physical/logical cores and more CPUID info. 2005-10-14 22:52:01 +00:00
memdev.h
metadata.h
mp_watchdog.h
mptable.h
mutex.h
param.h By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT into 2006-01-09 06:05:57 +00:00
pcb_ext.h
pcb.h I believe the stack underflows during early development that caused me to 2005-09-27 21:11:35 +00:00
pci_cfgreg.h
pcpu.h
pmap.h - Cleanup whitespace and extra ()s in vtophys() macros. 2005-12-06 21:09:01 +00:00
pmc_mdep.h
ppireg.h
proc.h
profile.h
psl.h
ptrace.h
reg.h
reloc.h
resource.h
runq.h
segments.h
setjmp.h
sf_buf.h
sigframe.h
signal.h Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and rename 2005-08-20 16:44:41 +00:00
smp.h Tweak how the MD code calls the fooclock() methods some. Instead of 2005-12-22 22:16:09 +00:00
specialreg.h Correct few MSR addresses. 2005-10-15 00:44:56 +00:00
stdarg.h
sysarch.h
timerreg.h
trap.h
tss.h
ucontext.h
varargs.h
vmparam.h