1 #ifndef _ASM_M32R_MMU_CONTEXT_H
2 #define _ASM_M32R_MMU_CONTEXT_H
7 #define MMU_CONTEXT_ASID_MASK (0x000000FF)
8 #define MMU_CONTEXT_VERSION_MASK (0xFFFFFF00)
9 #define MMU_CONTEXT_FIRST_VERSION (0x00000100)
10 #define NO_CONTEXT (0x00000000)
15 #include <asm/pgalloc.h>
17 #include <asm/tlbflush.h>
25 #define mmu_context_cache mmu_context_cache_dat
26 #define mm_context(mm) mm->context
29 #define mmu_context_cache mmu_context_cache_dat[smp_processor_id()]
30 #define mm_context(mm) mm->context[smp_processor_id()]
33 #define set_tlb_tag(entry, tag) (*entry = (tag & PAGE_MASK)|get_asid())
34 #define set_tlb_data(entry, data) (*entry = (data | _PAGE_PRESENT))
37 #define enter_lazy_tlb(mm, tsk) do { } while (0)
83 for (i = 0 ; i < num_cpus ; i++)
94 #define destroy_context(mm) do { } while (0)
96 static inline void set_asid(
unsigned long asid)
98 *(
volatile unsigned long *)
MASID = (asid & MMU_CONTEXT_ASID_MASK);
101 static inline unsigned long get_asid(
void)
105 asid = *(
volatile long *)
MASID;
118 set_asid(
mm_context(mm) & MMU_CONTEXT_ASID_MASK);
130 cpumask_set_cpu(cpu, mm_cpumask(next));
133 *(
volatile unsigned long *)
MPTB = (
unsigned long)next->
pgd;
138 if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)))
143 #define deactivate_mm(tsk, mm) do { } while (0)
145 #define activate_mm(prev, next) \
146 switch_mm((prev), (next), NULL)
149 #define get_mmu_context(mm) do { } while (0)
150 #define init_new_context(tsk,mm) (0)
151 #define destroy_context(mm) do { } while (0)
152 #define set_asid(asid) do { } while (0)
153 #define get_asid() (0)
154 #define activate_context(mm) do { } while (0)
155 #define switch_mm(prev,next,tsk) do { } while (0)
156 #define deactivate_mm(mm,tsk) do { } while (0)
157 #define activate_mm(prev,next) do { } while (0)
158 #define enter_lazy_tlb(mm,tsk) do { } while (0)