Skip to content

Commit

Permalink
x86/PCI: only check for spinlock being held in SMP kernels
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bjorn Helgaas committed May 15, 2012
1 parent 74d24b2 commit 867aae6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/pci/i386.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 867aae6

Please sign in to comment.