Skip to content

Commit

Permalink
[PATCH] ppc64: fix PCI IO mapping
Browse files Browse the repository at this point in the history
phbs_remap_io(), which maps the PCI IO space into the kernel virtual space,
is called too early on powermac, and thus doesn't work.

This fixes it by removing the call from all platforms and putting it back
into the ppc64 common code where it belongs, after the actual probing of
the bus.

That means that before that call, only the ISA IO space (if any) is mapped,
any PIO access (from quirks for example) will fail. This happens not to be
a problem for now, but we'll have to rework that code if it becomes one in
the future.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Nov 10, 2005
1 parent 47c2ac8 commit 0f34f49
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
3 changes: 0 additions & 3 deletions arch/powerpc/platforms/maple/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,6 @@ void __init maple_pcibios_fixup(void)
for_each_pci_dev(dev)
pci_read_irq_line(dev);

/* Do the mapping of the IO space */
phbs_remap_io();

DBG(" <- maple_pcibios_fixup\n");
}

Expand Down
3 changes: 0 additions & 3 deletions arch/powerpc/platforms/powermac/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,9 +918,6 @@ void __init pmac_pci_init(void)
PCI_DN(np)->busno = 0xf0;
}

/* map in PCI I/O space */
phbs_remap_io();

/* pmac_check_ht_link(); */

/* Tell pci.c to not use the common resource allocation mechanism */
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/platforms/pseries/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ static void __init pSeries_request_regions(void)

void __init pSeries_final_fixup(void)
{
phbs_remap_io();
pSeries_request_regions();

pci_addr_cache_build();
Expand Down
3 changes: 3 additions & 0 deletions arch/ppc64/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,9 @@ static int __init pcibios_init(void)
if (ppc64_isabridge_dev != NULL)
printk("ISA bridge at %s\n", pci_name(ppc64_isabridge_dev));

/* map in PCI I/O space */
phbs_remap_io();

printk("PCI: Probing PCI hardware done\n");

return 0;
Expand Down

0 comments on commit 0f34f49

Please sign in to comment.