diff options
author | Myron Stowe <myron.stowe@redhat.com> | 2012-03-02 14:45:01 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-03-02 15:03:58 -0500 |
commit | 63ab387ca0d1576edef35ef68e4b8ea5e0757b7a (patch) | |
tree | f68e3c80461c15e20c019814e557ee095e82f734 /arch/x86/pci | |
parent | 6748dcc269e52925993e0d68447858b41b88b4be (diff) |
x86/PCI: add spinlock held check to 'pcibios_fwaddrmap_lookup()'
'pcibios_fwaddrmap_lookup()' is used to maintain FW-assigned BIOS BAR
values for reinstatement when normal resource assignment attempts
fail and must be called with the 'pcibios_fwaddrmap_lock' spinlock
held.
This patch adds a WARN_ON notification if the spinlock is not currently
held by the caller.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86/pci')
-rw-r--r-- | arch/x86/pci/i386.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 33e6a0b995fc..831971e731f7 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
@@ -57,6 +57,8 @@ static struct pcibios_fwaddrmap *pcibios_fwaddrmap_lookup(struct pci_dev *dev) | |||
57 | { | 57 | { |
58 | struct pcibios_fwaddrmap *map; | 58 | struct pcibios_fwaddrmap *map; |
59 | 59 | ||
60 | WARN_ON(!spin_is_locked(&pcibios_fwaddrmap_lock)); | ||
61 | |||
60 | list_for_each_entry(map, &pcibios_fwaddrmappings, list) | 62 | list_for_each_entry(map, &pcibios_fwaddrmappings, list) |
61 | if (map->dev == dev) | 63 | if (map->dev == dev) |
62 | return map; | 64 | return map; |