virt_to_bus for ppc64

Julie DeWandel jdewand at redhat.com
Wed Jan 28 07:36:59 EST 2004


Hi,

I'm playing around with 2.6 code and one of the modules I am building is
looking for a virt_to_bus function. I was wondering if the following
patch would be appropriate to use:

--- linux-2.6.1/include/asm-ppc64/io.h.orig     2004-01-27
15:02:15.000000000 -0500
+++ linux-2.6.1/include/asm-ppc64/io.h  2004-01-27 15:04:20.000000000 -0500
@@ -143,6 +143,7 @@ static inline unsigned long virt_to_phys
 #endif
        return __pa((unsigned long)address);
 }
+#define virt_to_bus    virt_to_phys

 static inline void * phys_to_virt(unsigned long address)
 {
@@ -151,6 +152,7 @@ static inline void * phys_to_virt(unsign
 #endif
        return (void *) __va(address);
 }
+#define bus_to_virt    phys_to_virt

 /*
  * Change "struct page" to physical address.

--
Julie DeWandel <jdewand at redhat.com>
Red Hat, Inc.
Tel (978) 692-3113 x23251


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





More information about the Linuxppc64-dev mailing list