diff options
| author | Geert Uytterhoeven <geert@linux-m68k.org> | 2002-11-02 23:54:03 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-11-02 23:54:03 -0800 |
| commit | f5539ad049f53a7ef5ee43b7ddd1b69382ee8358 (patch) | |
| tree | 0c110f471680bd309476749135bdf13ae0b34b1b /include | |
| parent | 6ade2cd267dbd88f444e0292bf9e95a23d6c42de (diff) | |
[PATCH] M68k virt/phys fallback removal
Remove m68k fallback function for virtual/physical address conversions
(should there be any driver relying on this, that driver is seriously b0rken)
(from Roman Zippel)
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-m68k/virtconvert.h | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/include/asm-m68k/virtconvert.h b/include/asm-m68k/virtconvert.h index 73a99d70a860..9bf9159327e5 100644 --- a/include/asm-m68k/virtconvert.h +++ b/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 @@ extern inline unsigned long mm_ptov(unsigned long paddr) #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); } |
