diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-03-01 12:32:29 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-03-08 13:14:31 -0500 |
commit | 63e22924f5dc08badf9870c4a52ef4e7f7cbf218 (patch) | |
tree | f579dab1633fb9c2fa3633df78995773098ecd8a /arch/ia64/pci/fixup.c | |
parent | b894157145e4ac7598d7062bc93320898a5e059e (diff) |
PCI: Mark shadow copy of VGA ROM as IORESOURCE_PCI_FIXED
A shadow copy of an option ROM is placed by the BIOS as a fixed address.
Set IORESOURCE_PCI_FIXED to indicate that we can't move the shadow copy.
This prevents warnings like the following when we assign resources:
BAR 6: [??? 0x00000000 flags 0x2] has bogus alignment
This warning is emitted by pdev_sort_resources(), which already ignores
IORESOURCE_PCI_FIXED resources.
Link: http://lkml.kernel.org/r/CA+55aFyVMfTBB0oz_yx8+eQOEJnzGtCsYSj9QuhEpdZ9BHdq5A@mail.gmail.com
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'arch/ia64/pci/fixup.c')
-rw-r--r-- | arch/ia64/pci/fixup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/ia64/pci/fixup.c b/arch/ia64/pci/fixup.c index fc505d58f078..fd9ceff2b5a5 100644 --- a/arch/ia64/pci/fixup.c +++ b/arch/ia64/pci/fixup.c | |||
@@ -61,7 +61,8 @@ static void pci_fixup_video(struct pci_dev *pdev) | |||
61 | if (!vga_default_device() || pdev == vga_default_device()) { | 61 | if (!vga_default_device() || pdev == vga_default_device()) { |
62 | pci_read_config_word(pdev, PCI_COMMAND, &config); | 62 | pci_read_config_word(pdev, PCI_COMMAND, &config); |
63 | if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { | 63 | if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { |
64 | pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW; | 64 | pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW | |
65 | IORESOURCE_PCI_FIXED; | ||
65 | dev_printk(KERN_DEBUG, &pdev->dev, "Video device with shadowed ROM\n"); | 66 | dev_printk(KERN_DEBUG, &pdev->dev, "Video device with shadowed ROM\n"); |
66 | } | 67 | } |
67 | } | 68 | } |