linux/arch/ia64
Rafael J. Wysocki 66345d5f79 ACPI / ia64 / sba_iommu: Use ACPI scan handler for device discovery
The IA64 System Bus Adapter (SBA) I/O MMU driver uses an ACPI driver
object to look for device objects it needs in the ACPI namespace, but
that leads to an ordering issue between that driver and the container
scan handler on ia64 HP rx2600.

Namely, on that machine the SBA I/O MMU device object in the ACPI
namespace has a _HID returning its own specific device ID and a
_CID returning a generic container device ID.  According to Toshi
Kani, the idea is that if a _HID is not mached by an I/O MMU driver,
the _CID should be matched by a generic container driver, so those
device IDs should be used mutually exclusively.

That is not what happens, however, because the container driver uses
an ACPI scan handler which is matched against the device object in
question before registering the SBA I/O MMU driver object.  As a
result, that scan handler claims the device object first.  The driver
binds to the same device object later, however, and they both happily
use it simultaneously going forward (fortunately, that doesn't cause
any real breakage to happen).

To avoid that ordering issue, make the SBA I/O MMU code use an ACPI
scan handler instead of an ACPI driver, so that it can claim the SBA
I/O MMU device object before the container driver (thanks to an
improved algorithm of matching ACPI device IDs used for ACPI scan
handlers, which matches device _HIDs against the registered scan
handlers before _CIDs).

This also reduces the kernel's memory footprint slightly by
avoiding to register a driver object that's not used after system
initialization, so having it registered (and present in sysfs)
throughout the system's life time isn't particularly useful.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Tony Luck <tony.luck@gmail.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
2013-06-20 01:24:29 +02:00
..
configs [IA64] defconfig: Remove CONFIG_MISC_DEVICES 2012-08-20 13:04:29 -07:00
dig Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
hp ACPI / ia64 / sba_iommu: Use ACPI scan handler for device discovery 2013-06-20 01:24:29 +02:00
include arch, mm: Remove tlb_fast_mode() 2013-06-06 10:07:26 +09:00
kernel ia64: single_open() leaks 2013-05-05 00:09:04 -04:00
kvm Merge tag 'kvm-3.10-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2013-05-05 14:47:31 -07:00
lib Fix common misspellings 2011-03-31 11:26:23 -03:00
mm mm: speedup in __early_pfn_to_nid 2013-04-29 15:54:35 -07:00
oprofile Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
pci ia64/PCI: Implement pcibios_{add|remove}_bus() hooks 2013-04-12 15:38:25 -06:00
scripts scripts: change scripts to use system python instead of env 2010-02-02 14:33:56 +01:00
sn ia64: single_open() leaks 2013-05-05 00:09:04 -04:00
uv ia64: change to new flag variables 2011-03-17 14:02:56 +01:00
xen arch/ia64/xen: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:38:04 -08:00
install.sh
Kconfig Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
Kconfig.debug
Makefile Merge commit 'v2.6.35' into kbuild/kbuild 2010-08-04 13:59:13 +02:00
module.lds