Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
[powerpc.git] / include / asm-mips / io.h
index d77b657..67f0810 100644 (file)
@@ -115,7 +115,7 @@ static inline void set_io_port_base(unsigned long base)
  */
 static inline unsigned long virt_to_phys(volatile const void *address)
 {
-       return (unsigned long)address - PAGE_OFFSET;
+       return (unsigned long)address - PAGE_OFFSET + PHYS_OFFSET;
 }
 
 /*
@@ -132,7 +132,7 @@ static inline unsigned long virt_to_phys(volatile const void *address)
  */
 static inline void * phys_to_virt(unsigned long address)
 {
-       return (void *)(address + PAGE_OFFSET);
+       return (void *)(address + PAGE_OFFSET - PHYS_OFFSET);
 }
 
 /*