Skip to contentSkip to conversation

Fix /proc/iomem

parisc-linux Grant Grundler 1 participant 2 messages Oct 18, 2007 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 5 lines · Matthew Wilcox

commit 5d04e33a34814d0cc3029f4b1ba0e62829cb4610

Author: Matthew Wilcox <[email protected]>
Date:   Sun Oct 14 10:13:31 2007 -0400
Quoted 7 lines

parisc: Fix infinite loop in /proc/iomem

pcibios_link_hba_resources() could corrupt the resource tree by inserting resources in the wrong place. Fix this by calling pci_claim_resource() for PCI-PCI bridges. Delete pcibios_link_hba_resources as we shouldn't need it any more. Also get rid of lba_claim_dev_resources() and just call pci_claim_resource() directly.

Nice!

Just one question on this bit:

Review lba_fixup_bus(struct pci_bus *bus) · line 775

Quoted 9 lines
(quoted diff) +3 -0
@@ -803,6 +768,9 @@ lba_fixup_bus(struct pci_bus *bus)
 				DBG("lba_fixup_bus() WTF? 0x%lx [%lx/%lx] XXX",
 					res->flags, res->start, res->end);
 			}
+			if ((i != PCI_ROM_RESOURCE) ||
+			    (res->flags & IORESOURCE_ROM_ENABLE))
+				pci_claim_resource(dev, i);
 		}
 

Why would ROM_ENABLE be set for something that's not a ROM? I would expect "is ROM BAR _and_ ROM_ENABLE".

What am I missing? Maybe add a comment for this?

the rest looks good.

thanks,
grant
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 4 lines · Grant Grundler

Why would ROM_ENABLE be set for something that's not a ROM? I would expect "is ROM BAR _and_ ROM_ENABLE".

What am I missing? Maybe add a comment for this?

Nevermind...this got explained over IRC.
ROM_ENABLE only gets checked for ROM devices.
Willy suggested this comment:
/* Don't register resources for disabled ROMs as they may overlap each other */

and that works for me.

thanks,
grant
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux