Re: [2.6.35] AMD-Vi: Enabling IOMMU at 0000:00:00.2 cap 0x40 BUG:unable to handle kernel NULL pointer dereference at 0000000000000198

From: Joerg Roedel
Date: Tue Aug 10 2010 - 16:28:59 EST


On Tue, Aug 10, 2010 at 08:05:14PM +0200, Sander Eikelenboom wrote:
> Could you also provide a perhaps more specific message what is wrong
> with the bios, that i could forward to MSI, in the hope it will reach
> the bios engineers someday ? :-)

Lets first prove that my theory is right before contacting MSI directly.
Can you try the attached patch? it should fix the boot-crash. When the
system booted successfully please try some USB device (make sure it uses
the seperate usb-controler, I guess the seperate device is responsible
for USB 3, so try to plug a device into one of your USB 3 ports).
If you finished that please send me whether it worked or not and the
full dmesg output of the system.

Joerg

diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 0d20286..6b4fb05 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -153,6 +153,8 @@ static int iommu_init_device(struct device *dev)
pdev = pci_get_bus_and_slot(PCI_BUS(alias), alias & 0xff);
if (pdev)
dev_data->alias = &pdev->dev;
+ else
+ dev_data->alias = dev;

atomic_set(&dev_data->bind, 0);