22 #ifndef _ASM_MMU_CONTEXT_H
23 #define _ASM_MMU_CONTEXT_H
26 #include <asm/pgalloc.h>
27 #include <asm/tlbflush.h>
30 #define MMU_CONTEXT_TLBPID_NR 256
31 #define MMU_CONTEXT_TLBPID_MASK 0x000000ffUL
32 #define MMU_CONTEXT_VERSION_MASK 0xffffff00UL
33 #define MMU_CONTEXT_FIRST_VERSION 0x00000100UL
34 #define MMU_NO_CONTEXT 0x00000000UL
35 #define MMU_CONTEXT_TLBPID_LOCK_NR 0
37 #define enter_lazy_tlb(mm, tsk) do {} while (0)
39 static inline void cpu_ran_vm(
int cpu,
struct mm_struct *mm)
42 cpumask_set_cpu(cpu, mm_cpumask(mm));
46 static inline bool cpu_maybe_ran_vm(
int cpu,
struct mm_struct *mm)
49 return cpumask_test_and_set_cpu(cpu, mm_cpumask(mm));
55 #ifdef CONFIG_MN10300_TLB_USE_PIDR
57 #define mm_context(mm) (mm->context.tlbpid[smp_processor_id()])
63 static inline unsigned long allocate_mmu_context(
struct mm_struct *mm)
66 unsigned long mc = ++(*pmc);
95 mc = allocate_mmu_context(mm);
108 for (i = 0; i < num_cpus; i++)
123 #define init_new_context(tsk, mm) (0)
124 #define activate_context(mm) local_flush_tlb()
135 #define destroy_context(mm) do {} while (0)
152 cpu_ran_vm(cpu, next);
153 PTBR = (
unsigned long) next->
pgd;
158 #define deactivate_mm(tsk, mm) do {} while (0)
159 #define activate_mm(prev, next) switch_mm((prev), (next), NULL)