1 #ifndef _M68K_TLBFLUSH_H
2 #define _M68K_TLBFLUSH_H
7 #include <asm/current.h>
17 __asm__ __volatile__(
".chip 68040\n\t"
23 __asm__ __volatile__(
"pflush #4,#4,(%0)" : :
"a" (addr));
34 __asm__ __volatile__(
".chip 68040\n\t"
38 __asm__ __volatile__(
"pflush #0,#4");
42 static inline void __flush_tlb040_one(
unsigned long addr)
44 __asm__ __volatile__(
".chip 68040\n\t"
50 static inline void __flush_tlb_one(
unsigned long addr)
55 __flush_tlb040_one(addr);
57 __asm__ __volatile__(
"pflush #0,#4,(%0)" : :
"a" (addr));
60 #define flush_tlb() __flush_tlb()
70 __asm__ __volatile__(
".chip 68040\n\t"
74 __asm__ __volatile__(
"pflusha");
89 __flush_tlb_one(addr);
95 unsigned long start,
unsigned long end)
120 unsigned char ctx, oldctx;
122 oldctx = sun3_get_context();
124 for(ctx = 0; ctx < 8; ctx++) {
125 sun3_put_context(ctx);
130 sun3_put_context(oldctx);
134 if(pmeg_alloc[addr] == 1) {
135 pmeg_alloc[
addr] = 0;
137 pmeg_vaddr[
addr] = 0;
146 unsigned char oldctx;
150 oldctx = sun3_get_context();
154 seg = sun3_get_segmap(i);
155 if(seg == SUN3_INVALID_PMEG)
158 sun3_put_segmap(i, SUN3_INVALID_PMEG);
164 sun3_put_context(oldctx);
173 unsigned char oldctx;
176 oldctx = sun3_get_context();
177 sun3_put_context(vma->
vm_mm->context);
179 if((i = sun3_get_segmap(addr)) != SUN3_INVALID_PMEG)
184 sun3_put_segmap (addr, SUN3_INVALID_PMEG);
186 sun3_put_context(oldctx);
192 unsigned long start,
unsigned long end)
195 unsigned char seg, oldctx;
199 oldctx = sun3_get_context();
204 if((seg = sun3_get_segmap(start)) == SUN3_INVALID_PMEG)
206 if(pmeg_ctx[seg] == mm->
context) {
211 sun3_put_segmap(start, SUN3_INVALID_PMEG);
225 sun3_put_segmap (addr & ~(
SUN3_PMEG_SIZE - 1), SUN3_INVALID_PMEG);
240 static inline void __flush_tlb_one(
unsigned long addr)
245 #define flush_tlb() __flush_tlb()
266 unsigned long start,
unsigned long end)