x86/PCI: only check for spinlock being held in SMP kernels
authorBjorn Helgaas <bhelgaas@google.com>
Tue, 15 May 2012 23:01:09 +0000 (17:01 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 15 May 2012 23:01:09 +0000 (17:01 -0600)
spin_is_locked() is always false on UP kernels: spin_lock_irqsave() does no
locking, so we can't tell whether the lock is held or not.  Therefore,
this warning is only valid for SMP kernels.

CC: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
arch/x86/pci/i386.c

index 831971e731f7a0379d732ec040e683f490845aa0..dd8ca6f7223be11ad7900649e699a35f147e2da1 100644 (file)
@@ -57,7 +57,7 @@ static struct pcibios_fwaddrmap *pcibios_fwaddrmap_lookup(struct pci_dev *dev)
 {
        struct pcibios_fwaddrmap *map;
 
-       WARN_ON(!spin_is_locked(&pcibios_fwaddrmap_lock));
+       WARN_ON_SMP(!spin_is_locked(&pcibios_fwaddrmap_lock));
 
        list_for_each_entry(map, &pcibios_fwaddrmappings, list)
                if (map->dev == dev)
This page took 0.025683 seconds and 5 git commands to generate.