Skip to content

Commit

Permalink
x86/PCI: Replace spin_is_locked() with lockdep
Browse files Browse the repository at this point in the history
lockdep_assert_held() is better suited to checking locking requirements,
since it only checks if the current thread holds the lock regardless of
whether someone else does. This is also a step towards possibly removing
spin_is_locked().

Signed-off-by: Lance Roy <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
  • Loading branch information
ldr709 authored and Paul E. McKenney committed Nov 9, 2018
1 parent 6510223 commit 868f7a0
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 @@ -59,7 +59,7 @@ static struct pcibios_fwaddrmap *pcibios_fwaddrmap_lookup(struct pci_dev *dev)
{
struct pcibios_fwaddrmap *map;

WARN_ON_SMP(!spin_is_locked(&pcibios_fwaddrmap_lock));
lockdep_assert_held(&pcibios_fwaddrmap_lock);

list_for_each_entry(map, &pcibios_fwaddrmappings, list)
if (map->dev == dev)
Expand Down

0 comments on commit 868f7a0

Please sign in to comment.