linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/PCI: add spinlock held check to 'pcibios_fwaddrmap_lookup()'
@ 2012-03-02 19:45 Myron Stowe
  2012-03-02 20:00 ` Greg KH
  2012-03-02 20:04 ` Jesse Barnes
  0 siblings, 2 replies; 7+ messages in thread
From: Myron Stowe @ 2012-03-02 19:45 UTC (permalink / raw)
  To: jbarnes; +Cc: linux-pci, linux-kernel

'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>
---

 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 33e6a0b..831971e 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)
 {
 	struct pcibios_fwaddrmap *map;
 
+	WARN_ON(!spin_is_locked(&pcibios_fwaddrmap_lock));
+
 	list_for_each_entry(map, &pcibios_fwaddrmappings, list)
 		if (map->dev == dev)
 			return map;


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-03-02 21:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-02 19:45 [PATCH] x86/PCI: add spinlock held check to 'pcibios_fwaddrmap_lookup()' Myron Stowe
2012-03-02 20:00 ` Greg KH
2012-03-02 20:18   ` Myron Stowe
2012-03-02 20:24   ` Jesse Barnes
2012-03-02 20:41     ` Greg KH
2012-03-02 21:09       ` Jesse Barnes
2012-03-02 20:04 ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).