1
0
Fork 0
alistair23-linux/arch/x86
Darrick J. Wong 4528752f49 x86, Calgary IOMMU quirk: Find nearest matching Calgary while walking up the PCI tree
On a multi-node x3950M2 system, there's a slight oddity in the
PCI device tree for all secondary nodes:

 30:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
  \-33:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01)
     \-34:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 1078 (rev 04)

...as compared to the primary node:

 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
  \-01:00.0 VGA compatible controller: ATI Technologies Inc ES1000 (rev 02)
 03:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01)
  \-04:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 1078 (rev 04)

In both nodes, the LSI RAID controller hangs off a CalIOC2
device, but on the secondary nodes, the BIOS hides the VGA
device and substitutes the device tree ending with the disk
controller.

It would seem that Calgary devices don't necessarily appear at
the top of the PCI tree, which means that the current code to
find the Calgary IOMMU that goes with a particular device is
buggy.

Rather than walk all the way to the top of the PCI
device tree and try to match bus number with Calgary descriptor,
the code needs to examine each parent of the particular device;
if it encounters a Calgary with a matching bus number, simply
use that.

Otherwise, we BUG() when the bus number of the Calgary doesn't
match the bus number of whatever's at the top of the device tree.

Extra note: This patch appears to work correctly for the x3950
that came before the x3950 M2.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Jon D. Mason <jdmason@kudzu.us>
Cc: Corinna Schultz <coschult@us.ibm.com>
Cc: <stable@kernel.org>
LKML-Reference: <20091202230556.GG10295@tux1.beaverton.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-03 11:44:05 +01:00
..
boot x86: Document linker script ASSERT() quirk 2009-10-16 07:18:46 +02:00
configs tracing: Rename FTRACE_SYSCALLS for tracepoints 2009-08-26 00:17:35 +02:00
crypto crypto: aesni-intel - Fix irq_fpu_usable usage 2009-10-20 16:20:47 +09:00
ia32 x86-64: Fix register leak in 32-bit syscall audting 2009-10-26 16:23:26 +01:00
include/asm x86/amd-iommu: Remove amd_iommu_pd_table 2009-11-27 14:20:37 +01:00
kernel x86, Calgary IOMMU quirk: Find nearest matching Calgary while walking up the PCI tree 2009-12-03 11:44:05 +01:00
kvm KVM: get_tss_base_addr() should return a gpa_t 2009-11-04 12:42:36 -02:00
lguest lguest: move panic notifier registration to its expected place. 2009-09-23 22:26:44 +09:30
lib x86: Don't generate cmpxchg8b_emu if CONFIG_X86_CMPXCHG64=y 2009-10-01 08:42:24 +02:00
math-emu Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
mm x86: Fix error return sequence in __ioremap_caller() 2009-11-08 12:48:58 +01:00
oprofile perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
pci const: mark struct vm_struct_operations 2009-09-27 11:39:25 -07:00
power x86: Remove final bits of CONFIG_X86_OLD_MCE 2009-09-18 08:31:23 +02:00
vdso kbuild: rename ld-option to cc-ldoption 2009-09-20 12:27:42 +02:00
video
xen xen: mask extended topology info in cpuid 2009-11-03 11:09:12 -08:00
Kbuild x86: standardize Kbuild rules 2009-04-16 18:09:02 +02:00
Kconfig x86: Remove STACKPROTECTOR_ALL 2009-10-23 16:35:23 +02:00
Kconfig.cpu x86: Side-step lguest problem by only building cmpxchg8b_emu for pre-Pentium 2009-10-26 12:33:02 +01:00
Kconfig.debug kmemcheck: make kconfig accessible for other architectures 2009-06-15 15:49:17 +02:00
Makefile x86: Remove STACKPROTECTOR_ALL 2009-10-23 16:35:23 +02:00
Makefile_32.cpu x86: add specific support for Intel Atom architecture 2009-08-23 11:20:02 +02:00