Subject: Re: [PATCH] export new __io{re,un}map_at() symbols

From: Olof Johansson <[email-masked]>
Date: Mon, 10 Sep 2007 18:34:17 -0500

On Tue, Sep 11, 2007 at 09:10:20AM +1000, Paul Mackerras wrote:
> Olof Johansson writes:
> 
> > electra_cf uses it, that driver is currently in -mm including below
> > update to use benh's rewritten interfaces:
> > 
> > http://patchwork.ozlabs.org/linuxppc/patch?id=13237
> > 
> > It gets the effective addresses to use out of the device tree.
> 
> Huh?  What does firmware (or the device tree) know about how the
> kernel uses effective addresses?

Oh, sorry, of course it doesn't (I was thinking of the physical address
but writing effective).

I get effective address by allocating it with __get_vm_area same way
the pseries pci hotplug does:

	area = __get_vm_area(cf->io_size, 0, PHB_IO_BASE, PHB_IO_END);
	if (area == NULL)
		return -ENOMEM;

	cf->io_virt = (void __iomem *)(area->addr);

-Olof