Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358389
b: refs/heads/master
c: 7452160
h: refs/heads/master
i:
  358387: cf230fd
v: v3
  • Loading branch information
Yinghai Lu authored and Bjorn Helgaas committed Jan 7, 2013
1 parent 786d2fe commit 98e61b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dc2f56fa8400677ef4852d5128f03b795cf57e7b
refs/heads/master: 745216025de0354eea23493d994e3fc0ab7369fc
10 changes: 9 additions & 1 deletion trunk/arch/x86/pci/i386.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ struct pcibios_fwaddrmap {

static LIST_HEAD(pcibios_fwaddrmappings);
static DEFINE_SPINLOCK(pcibios_fwaddrmap_lock);
static bool pcibios_fw_addr_done;

/* Must be called with 'pcibios_fwaddrmap_lock' lock held. */
static struct pcibios_fwaddrmap *pcibios_fwaddrmap_lookup(struct pci_dev *dev)
Expand All @@ -72,6 +73,9 @@ pcibios_save_fw_addr(struct pci_dev *dev, int idx, resource_size_t fw_addr)
unsigned long flags;
struct pcibios_fwaddrmap *map;

if (pcibios_fw_addr_done)
return;

spin_lock_irqsave(&pcibios_fwaddrmap_lock, flags);
map = pcibios_fwaddrmap_lookup(dev);
if (!map) {
Expand All @@ -97,6 +101,9 @@ resource_size_t pcibios_retrieve_fw_addr(struct pci_dev *dev, int idx)
struct pcibios_fwaddrmap *map;
resource_size_t fw_addr = 0;

if (pcibios_fw_addr_done)
return 0;

spin_lock_irqsave(&pcibios_fwaddrmap_lock, flags);
map = pcibios_fwaddrmap_lookup(dev);
if (map)
Expand All @@ -106,7 +113,7 @@ resource_size_t pcibios_retrieve_fw_addr(struct pci_dev *dev, int idx)
return fw_addr;
}

static void pcibios_fw_addr_list_del(void)
static void __init pcibios_fw_addr_list_del(void)
{
unsigned long flags;
struct pcibios_fwaddrmap *entry, *next;
Expand All @@ -118,6 +125,7 @@ static void pcibios_fw_addr_list_del(void)
kfree(entry);
}
spin_unlock_irqrestore(&pcibios_fwaddrmap_lock, flags);
pcibios_fw_addr_done = true;
}

static int
Expand Down

0 comments on commit 98e61b7

Please sign in to comment.