[RFC/PATCH] powerpc: Rewrite IO allocation & mapping on powerpc64

Benjamin Herrenschmidt benh at kernel.crashing.org
Mon May 14 19:18:40 EST 2007


> +	/* If this not a PHB, we don't do anything on mapping */
> +	if (bus->self) {
> +		DBG("IO mapping for PCI-PCI bridge %s\n",
> +		    pci_name(bus->self));
> +		DBG("  virt=0x%016lx...0x%016lx\n",
> +		    bus->resource[0]->start + pci_io_base,
> +		    bus->resource[0]->end + pci_io_base);
> +		return 0;
>  	}

Hrm... the above is incorrect. Since I iounmap_at() when removing a P2P
bridge, I need to ioremap_at() when mapping it back in. I'll fix that
in the next iteration.

One of the cool thing is that mapping over a previous mapping is
harmless, so if the PHB is inserted and create a mapping for the full
PHB range, and later on, a P2P is added to this PHB, doing an
ioremap_at() will work fine wether that sub-range was part of the
initial PHB mapping or wether it was unmapped by a previous removal of a
bridge...

Ben.





More information about the Linuxppc-dev mailing list