I don't think that's going to work (except maybe on alpha).
On x86 and ppc ioremap() will allocate virtual address space somewhere,
using get_vm_area(). virt_to_bus(address) on PPC just does
return (unsigned long)address - KERNELBASE + PCI_DRAM_OFFSET;
and on x86 does (with a bit of macro expansion)
return ((unsigned long)(address) & ~PAGE_OFFSET)
It looks like virt_to_bus() and virt_to_phys() can only be safely used
on kernel virtual addresses corresponding to RAM. Which is not a
surprising design decision, as working through page tables is much
slower.
- Adrian Cox, AG Electronics
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/