x86/pci: insert ioapic resource before assigning unassigned resources
commitc58b0ab995f63edcbc3524a582ffa22277d1c650
authorYinghai Lu <yinghai@kernel.org>
Fri, 10 Jul 2009 16:36:20 +0000 (10 09:36 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 30 Jul 2009 21:39:55 +0000 (30 14:39 -0700)
tree578590922c0ac353d467d84f15c305c2b83712a6
parentca8b86c5ae91b3041790085d296f5b8fbf71570b
x86/pci: insert ioapic resource before assigning unassigned resources

commit 857fdc53a0a90c3ba7fcf5b1fb4c7a62ae03cf82 upstream.

Stephen reported that his DL585 G2 needed noapic after 2.6.22 (?)

Dann bisected it down to:
  commit 30a18d6c3f1e774de656ebd8ff219d53e2ba4029
  Date:   Tue Feb 19 03:21:20 2008 -0800

      x86: multi pci root bus with different io resource range, on
      64-bit

It turns out that:
  1. that AMD-based systems have two HT chains.
  2. BIOS doesn't allocate resources for BAR 6 of devices under 8132 etc
  3. that multi-peer-root patch will try to split root resources to peer
     root resources according to PCI conf of NB
  4. PCI core assigns unassigned resources, but they overlap with BARs
     that are used by ioapic addr of io4 and 8132.

The reason: at that point ioapic address are not inserted yet.  Solution
is to insert ioapic resources into the tree a bit earlier.

Reported-by: Stephen Frost <sfrost@snowman.net>
Reported-and-Tested-by: dann frazier <dannf@hp.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/include/asm/io_apic.h
arch/x86/kernel/apic/io_apic.c
arch/x86/pci/i386.c