On Thu, Feb 15, 2001 at 09:58:59AM -0800, Subodh Nijsure wrote:
I know the physical address I should be writing to.
For debugging I was trying to print exact physical address where
write is happening .When I used virt_to_phys() on the addresse
ioremap() I was not getting back the original physical address.
Hence the question.
Well, the base problem is that virt_to_*/*_to_virt were only ever
intended to work on addresses mapped to system RAM. See
Documentation/IO-mapping.txt. Why not just store argument one to
ioremap to calculate the physical addresses you are working with
in virtual space?
--
Matt Porter
mmporter@home.com
This is Linux Country. On a quiet night, you can hear Windows reboot.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Matt Porter wrote:
Well, the base problem is that virt_to_*/*_to_virt were only ever
intended to work on addresses mapped to system RAM.
I know.....But, even for someone like me that works with this
on a nearly daily basis it is sometimes confusing. It's truly
easy to have one function that can tell you virt/phys/virt mappings,
other OS implementations have done that for years. If you want
a "fast" RAM only mapping, use __pa()/__va(), they have been around
forever. The virt_to_*/*_to_virt functions _should_ have become
something more generic, but they are just yet another macro name
for doing the same thing. Now, we have gone of and created some pci_*
mapping functions, which are not at all useful for highly integrated
processors because their integrated features are not PCI devices.
Yet another set of functions for integrated processors? I don't think so.
I think that requiring knowledge of the object attributes for a VM or
physical space so you can call the proper mapping or other management
functions is just a poor design. If you know this information and
wish to take performance enhancement shortcuts, that's fine, but it
shouldn't be required.
I'm working on it........
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/