linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* virt_to_phys() on 440
@ 2003-09-08 21:36 Brian Kuschak
  2003-09-08 22:03 ` Dan Malek
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Brian Kuschak @ 2003-09-08 21:36 UTC (permalink / raw)
  To: linuxppc-embedded


I think the virt_to_phys() function is incorrect for
PPC440.  It should call iopa for all 4xx, not only the
405.  By chance, it happens to work currently if the
address is in SDRAM, but is always incorrect for
ioremapped addresses.  virt_to_bus() does the right
thing.

Also, to be correct, shouldn't this function return a
phys_addr_t rather than an unsigned long, as the
physical address is >32 bits on 44x?

Regards,
Brian

--- include/asm/io.h.new   Thu Aug 28 14:30:33 2003
+++ include/asm/io.h    Mon Sep  8 14:21:08 2003
@@ -309,7 +309,7 @@
  */
 extern inline unsigned long virt_to_phys(volatile
void * address)
 {
-#if defined(CONFIG_APUS) || defined(CONFIG_8xx) ||
defined(CONFIG_40x)
+#if defined(CONFIG_APUS) || defined(CONFIG_8xx) ||
defined(CONFIG_4xx)
        return iopa ((unsigned long) address);
 #else
        return (unsigned long) address - KERNELBASE;


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-09-08 23:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-08 21:36 virt_to_phys() on 440 Brian Kuschak
2003-09-08 22:03 ` Dan Malek
2003-09-08 22:08 ` Eugene Surovegin
2003-09-08 22:14 ` Matt Porter
2003-09-08 22:36   ` Brian Kuschak
2003-09-08 23:26     ` Matt Porter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).