From: Bjorn Helgaas <bhelgaas@google.com>
To: linux-pci@vger.kernel.org
Cc: "Matthew Garrett" <mjg59@srcf.ucam.org>,
"Tony Luck" <tony.luck@intel.com>,
DRI <dri-devel@lists.freedesktop.org>,
"Fenghua Yu" <fenghua.yu@intel.com>,
"Intel Graphics Development" <intel-gfx@lists.freedesktop.org>,
linux-kernel@vger.kernel.org,
"Ralf Baechle" <ralf@linux-mips.org>,
"Andy Lutomirski" <luto@amacapital.net>,
"Bruno Prémont" <bonbons@linux-vserver.org>,
"Daniel Stone" <daniel@fooishbar.org>,
"Alex Deucher" <alexdeucher@gmail.com>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: [PATCH v1 01/12] PCI: Mark shadow copy of VGA ROM as IORESOURCE_PCI_FIXED
Date: Thu, 03 Mar 2016 10:53:58 -0600 [thread overview]
Message-ID: <20160303165358.3025.23146.stgit@bhelgaas-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <20160303164533.3025.82439.stgit@bhelgaas-glaptop2.roam.corp.google.com>
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>
---
arch/ia64/pci/fixup.c | 3 ++-
arch/x86/pci/fixup.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/ia64/pci/fixup.c b/arch/ia64/pci/fixup.c
index fc505d5..fd9ceff 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)
if (!vga_default_device() || pdev == vga_default_device()) {
pci_read_config_word(pdev, PCI_COMMAND, &config);
if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) {
- pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW;
+ pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW |
+ IORESOURCE_PCI_FIXED;
dev_printk(KERN_DEBUG, &pdev->dev, "Video device with shadowed ROM\n");
}
}
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index 0ae7e9f..dac027c 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -336,7 +336,8 @@ static void pci_fixup_video(struct pci_dev *pdev)
if (!vga_default_device() || pdev == vga_default_device()) {
pci_read_config_word(pdev, PCI_COMMAND, &config);
if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) {
- pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW;
+ pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW |
+ IORESOURCE_PCI_FIXED;
dev_printk(KERN_DEBUG, &pdev->dev, "Video device with shadowed ROM\n");
}
}
next prev parent reply other threads:[~2016-03-03 16:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 16:53 [PATCH v1 00/12] PCI: Rework shadow ROM handling Bjorn Helgaas
2016-03-03 16:53 ` Bjorn Helgaas [this message]
2016-03-03 16:54 ` [PATCH v1 02/12] PCI: Don't assign or reassign immutable resources Bjorn Helgaas
2016-03-03 16:54 ` [PATCH v1 03/12] PCI: Don't enable/disable ROM BAR if we're using a RAM shadow copy Bjorn Helgaas
2016-03-03 16:54 ` [PATCH v1 04/12] PCI: Set ROM shadow location in arch code, not in PCI core Bjorn Helgaas
2016-03-03 16:54 ` [PATCH v1 05/12] PCI: Clean up pci_map_rom() whitespace Bjorn Helgaas
2016-03-03 16:54 ` [PATCH v1 06/12] ia64/PCI: Use temporary struct resource * to avoid repetition Bjorn Helgaas
2016-03-03 16:54 ` [PATCH v1 07/12] ia64/PCI: Use ioremap() instead of open-coded equivalent Bjorn Helgaas
2016-03-03 16:54 ` [PATCH v1 08/12] ia64/PCI: Keep CPU physical (not virtual) addresses in shadow ROM resource Bjorn Helgaas
2016-03-03 16:55 ` [PATCH v1 09/12] MIPS: Loongson 3: Use temporary struct resource * to avoid repetition Bjorn Helgaas
2016-03-03 16:55 ` [PATCH v1 10/12] MIPS: Loongson 3: Keep CPU physical (not virtual) addresses in shadow ROM resource Bjorn Helgaas
2016-03-03 16:55 ` [PATCH v1 11/12] PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY Bjorn Helgaas
2016-03-03 16:55 ` [PATCH v1 12/12] PCI: Simplify sysfs ROM cleanup Bjorn Helgaas
2016-03-03 18:02 ` [PATCH v1 00/12] PCI: Rework shadow ROM handling Linus Torvalds
2016-03-08 17:45 ` Bjorn Helgaas
2016-03-11 21:16 ` Andy Lutomirski
2016-03-11 23:29 ` Bjorn Helgaas
2016-03-12 0:49 ` Andy Lutomirski
2016-03-12 1:09 ` Linus Torvalds
2016-03-12 4:04 ` Alex Deucher
2016-03-12 12:26 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160303165358.3025.23146.stgit@bhelgaas-glaptop2.roam.corp.google.com \
--to=bhelgaas@google.com \
--cc=alexdeucher@gmail.com \
--cc=bonbons@linux-vserver.org \
--cc=daniel@fooishbar.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=fenghua.yu@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mjg59@srcf.ucam.org \
--cc=ralf@linux-mips.org \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®