freebsd-dev/sys
John Baldwin 2ccfc93222 Overhaul the ACPI PCI bridge driver a bit:
- Add an ACPI PCI-PCI bridge driver (the previous driver just handled
  Host-PCI bridges) that is a PCI driver that is a subclass of the generic
  PCI-PCI bridge driver.  It overrides probe, attach, read_ivar, and
  pci_route_interrupt.
  - The probe routine only succeeds if our parent is an ACPI PCI bus which
    we test for by seeing if we can read our ACPI_HANDLE as an ivar.
  - The attach routine saves a copy of our handle and calls the new
    acpi_pcib_attach_common() function described below.
  - The read_ivar routine handles normal PCI-PCI bridge ivars and adds an
    ivar to return the ACPI_HANDLE of the bus this bridge represents.
  - The route_interrupt routine fetches the _PRT (PCI Interrupt Routing
    Table) from the bridge device's softc and passes it off to
    acpi_pcib_route_interrupt() to route the interrupt.
- Split the old ACPI Host-PCI bridge driver into two pieces.  Part of
  the attach routine and most of the route_interrupt routine remain in
  acpi_pcib.c and are shared by both ACPI PCI bridge drivers.
  - The attach routine verifies the PCI bridge is present, reads in
    the _PRT for the bridge, and attaches the child PCI bus.
  - The route_interrupt routine uses the passed in _PRT to route a PCI
    interrupt.
  The rest of the driver is the ACPI Host-PCI bridge specific bits that
  live in acpi_pcib_acpi.c.
  - We no longer duplicate pcib_maxslots but use it directly.
  - The driver now uses the pcib devclass instead of its own devclass.
    This means that PCI busses are now only children of pcib devices.
  - Allow the ACPI_HANDLE for the child PCI bus to be read as an ivar
    of the child bus.
  - Fetch the _PRT for routing PCI interrupts directly from our softc
    instead of walking the devclass to find ourself and then fetch our
    own softc.

With this change and the new ACPI PCI bus driver, ACPI can now properly
route interrupts for devices behind PCI-PCI bridges.  That is, the
Itanium2 with like 10 PCI busses can now boot ok and route all the PCI
interrupts.  Hopefully this will also fix problems people are having with
CardBus bridges behind PCI-PCI bridges not properly routing interrupts
when ACPI is used.

Tested on:	i386, ia64
2002-08-26 18:30:27 +00:00
..
alpha Fix a long-standing bug on alpha: 2002-08-26 02:39:03 +00:00
amd64 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
arm Since arm and powerpc aren't far enough to set stathz, take a 2002-08-26 03:44:11 +00:00
boot - Do not pretend to compile a kernel and remove the definition 2002-08-21 15:52:23 +00:00
cam Adjust scsi_calc_syncparam() to the exception table changing from 10ths to 2002-08-26 17:13:35 +00:00
coda
compat Replace (ab)uses of "NULL" where "0" is really meant. 2002-08-22 21:24:01 +00:00
conf Turned format checking back on. It was left turned off for too long after 2002-08-25 08:05:02 +00:00
contrib Don't use "NULL" when "0" is really meant. 2002-08-23 20:07:19 +00:00
crypto
ddb
dev Overhaul the ACPI PCI bridge driver a bit: 2002-08-26 18:30:27 +00:00
fs Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
geom Use 'p' as the partition specifier instead of 's'. We continue to use 2002-08-24 22:42:16 +00:00
gnu
i4b Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
i386 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
ia64 o Retire pmap_pageable(). It's an advisory routine that none 2002-08-25 04:20:05 +00:00
isa Add suspend/resume method to syscons. This switch the mode 2002-08-25 18:35:44 +00:00
isofs/cd9660 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
kern move the assert to cover more cases 2002-08-26 05:02:56 +00:00
libkern Include sys/libkern.h for the kernel prototypes of these libkern functions 2002-08-22 20:08:07 +00:00
modules Keep subdirectory list sorted. 2002-08-20 23:58:49 +00:00
net Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
netatalk
netatm Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
netgraph Don't use "NULL" when "0" is really meant. 2002-08-22 00:30:03 +00:00
netinet Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
netinet6 Lock the sysctl(8) knobs that turn ip{,6}fw(8) firewalling and 2002-08-25 03:50:29 +00:00
netipx Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
netkey
netnatm
netncp
netns Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
netsmb
nfs
nfsclient
nfsserver Make the V2 errno translation more resistent to new errnos. 2002-08-21 19:28:44 +00:00
pc98 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
pccard
pci Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
posix4
powerpc Since arm and powerpc aren't far enough to set stathz, take a 2002-08-26 03:44:11 +00:00
rpc
security
sparc64 o Retire pmap_pageable(). It's an advisory routine that none 2002-08-25 04:20:05 +00:00
sys Move intrmask_t to the kernel-only section of <sys/types.h>. Add some 2002-08-25 19:26:31 +00:00
tools - Add two new debugging macros: ASSERT_VI_LOCKED and ASSERT_VI_UNLOCKED 2002-08-21 06:19:29 +00:00
ufs Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
vm o Retire pmap_pageable(). It's an advisory routine that none 2002-08-25 04:20:05 +00:00
Makefile