Skip to contentSkip to conversation

export new __io{re,un}map_at() symbols

PATCH In review Olof Johansson 2 participants 5 messages Aug 31, 2007 – Sep 10, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 export new __io{re,un}map_at() symbols

Export new __io{re,un}map_at() symbols so modules can use them.

arch/powerpc/mm/pgtable_64.c +2 -0
Index: mainline/arch/powerpc/mm/pgtable_64.c
===================================================================
@@ -228,5 +228,7 @@ void iounmap(volatile void __iomem *toke
 EXPORT_SYMBOL(ioremap);
 EXPORT_SYMBOL(ioremap_flags);
 EXPORT_SYMBOL(__ioremap);
+EXPORT_SYMBOL(__ioremap_at);
 EXPORT_SYMBOL(iounmap);
 EXPORT_SYMBOL(__iounmap);
+EXPORT_SYMBOL(__iounmap_at);
#1 lore raw
Quoted 1 line · Olof Johansson

Export new __io{re,un}map_at() symbols so modules can use them.

What module wants to use these? How is it going to work out what effective address to use?

Paul.

#2 lore raw

Hi,

Quoted 6 lines · Paul Mackerras
Quoted 1 line · Olof Johansson

Export new __io{re,un}map_at() symbols so modules can use them.

What module wants to use these? How is it going to work out what effective address to use?

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.

-Olof

#3 lore raw
Quoted 6 lines · Olof Johansson

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?

Paul.

#4 lore raw
Quoted 11 lines · Paul Mackerras
Quoted 6 lines · Olof Johansson

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