patch-2.4.22 linux-2.4.22/include/asm-m68k/virtconvert.h
Next file: linux-2.4.22/include/asm-mips/asm.h
Previous file: linux-2.4.22/include/asm-m68k/pgtable.h
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
2003-08-25 04:44:43.000000000 -0700
- Orig file:
linux-2.4.21/include/asm-m68k/virtconvert.h
- Orig date:
2003-06-13 07:51:38.000000000 -0700
diff -urN linux-2.4.21/include/asm-m68k/virtconvert.h linux-2.4.22/include/asm-m68k/virtconvert.h
@@ -20,7 +20,6 @@
*/
#ifndef CONFIG_SUN3
extern unsigned long mm_vtop(unsigned long addr) __attribute__ ((const));
-extern unsigned long mm_vtop_fallback (unsigned long) __attribute__ ((const));
extern unsigned long mm_ptov(unsigned long addr) __attribute__ ((const));
#else
extern inline unsigned long mm_vtop(unsigned long vaddr)
@@ -35,39 +34,22 @@
#endif
#ifdef CONFIG_SINGLE_MEMORY_CHUNK
-extern inline unsigned long virt_to_phys(volatile void *vaddr)
+static inline unsigned long virt_to_phys(void *vaddr)
{
- unsigned long voff = (unsigned long)vaddr - PAGE_OFFSET;
-
- if (voff < m68k_memory[0].size)
- return voff + m68k_memory[0].addr;
- return mm_vtop_fallback((unsigned long)vaddr);
+ return (unsigned long)vaddr - PAGE_OFFSET + m68k_memory[0].addr;
}
-extern inline void * phys_to_virt(unsigned long paddr)
+static inline void * phys_to_virt(unsigned long paddr)
{
- unsigned long poff = paddr - m68k_memory[0].addr;
-
- if (poff < m68k_memory[0].size)
- return (void *)(poff + PAGE_OFFSET);
-
-#ifdef CONFIG_AMIGA
- /*
- * if on an amiga and address is in first 16M, move it
- * to the ZTWO_VADDR range
- */
- if (MACH_IS_AMIGA && paddr < 16*1024*1024)
- return (void *)ZTWO_VADDR(paddr);
-#endif
- return (void *)paddr;
+ return (void *)(paddr - m68k_memory[0].addr + PAGE_OFFSET);
}
#else
-extern inline unsigned long virt_to_phys(volatile void * address)
+static inline unsigned long virt_to_phys(void *address)
{
return mm_vtop((unsigned long)address);
}
-extern inline void * phys_to_virt(unsigned long address)
+static inline void *phys_to_virt(unsigned long address)
{
return (void *) mm_ptov(address);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)