9 #include <linux/module.h>
10 #include <asm/pgalloc.h>
11 #include <asm/traps.h>
14 static unsigned long virt_to_phys_slow(
unsigned long vaddr)
22 asm volatile (
".chip 68060\n"
26 ".section .fixup,\"ax\"\n"
31 ".section __ex_table,\"a\"\n"
41 asm volatile (
".chip 68040\n\t"
43 "movec %%mmusr, %0\n\t"
49 return (mmusr &
PAGE_MASK) | (vaddr & ~PAGE_MASK);
52 unsigned long *descaddr;
54 asm volatile (
"ptestr %3,%2@,#7,%0\n\t"
56 :
"=a&" (descaddr),
"=m" (mmusr)
63 return (*descaddr & 0xfe000000) | (vaddr & 0x01ffffff);
65 return (*descaddr & 0xfffc0000) | (vaddr & 0x0003ffff);
67 return (*descaddr &
PAGE_MASK) | (vaddr & ~PAGE_MASK);
82 flush_cf_icache(0, end);
85 flush_cf_icache(start, end);
90 asm volatile (
"nop\n\t"
92 "cpushp %%bc,(%0)\n\t"
94 : :
"a" (virt_to_phys_slow(address)));
96 }
while (address < endaddr);
99 asm volatile (
"movec %%cacr,%0\n\t"
109 unsigned long addr,
int len)
114 end = (addr + len) & ICACHE_SET_MASK;
116 flush_cf_icache(0, end);
119 flush_cf_icache(start, end);
122 asm volatile (
"nop\n\t"
124 "cpushp %%bc,(%0)\n\t"
129 asm volatile (
"movec %%cacr,%0\n\t"