lkml.org 
[lkml]   [2018]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjecthow to fix acpi_pci_root_remap_iospace?
Bjorn,

Back in commit:

0a70abb38062 ("PCI/ACPI: Support I/O resources when parsing host bridge resources")

we added acpi_pci_root_remap_iospace(). On ia64 this was a no-op because ia64
didn't define PCI_IOBASE, so the entire body of the function was skipped.

But in the current merge window commit:

0bbf47eab469 ("ia64: use asm-generic/io.h")

ended up defining PCI_IOBASE for us, and now we die horribly
in early boot with:

kernel BUG at lib/ioremap.c:72!


Is PCI_IOBASE the right thing to check for to decide whether
acpi_pci_root_remap_iospace() needs to do anything?

The ugly fix would be:


diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 7433035ded95..de06377de13b 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -741,7 +741,7 @@ static void acpi_pci_root_validate_resources(struct device *dev,
static void acpi_pci_root_remap_iospace(struct fwnode_handle *fwnode,
struct resource_entry *entry)
{
-#ifdef PCI_IOBASE
+#if defined(PCI_IOBASE) && !defined(CONFIG_IA64)
struct resource *res = entry->res;
resource_size_t cpu_addr = res->start;
resource_size_t pci_addr = cpu_addr - entry->offset;
or we can do some other juggling with defines to get the
same outcome.

-Tony

\
 
 \ /
  Last update: 2018-08-16 22:45    [W:0.754 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site