2 * linux/include/asm-arm/mmu_context.h
4 * Copyright (c) 1996 Russell King.
7 * 27-06-1996 RMK Created
9 #ifndef __ASM_ARM_MMU_CONTEXT_H
10 #define __ASM_ARM_MMU_CONTEXT_H
12 #include <asm/bitops.h>
13 #include <asm/pgtable.h>
14 #include <asm/arch/memory.h>
15 #include <asm/proc-fns.h>
17 #define destroy_context(mm) do { } while(0)
18 #define init_new_context(tsk,mm) 0
21 * This is called when "tsk" is about to enter lazy TLB mode.
23 * mm: describes the currently active mm context
24 * tsk: task which is entering lazy tlb
25 * cpu: cpu number which is entering lazy tlb
27 * tsk->mm will be NULL
29 static inline void enter_lazy_tlb(struct mm_struct
*mm
, struct task_struct
*tsk
, unsigned cpu
)
34 * This is the actual mm switch as far as the scheduler
35 * is concerned. No registers are touched.
38 switch_mm(struct mm_struct
*prev
, struct mm_struct
*next
,
39 struct task_struct
*tsk
, unsigned int cpu
)
42 cpu_switch_mm(next
->pgd
, tsk
);
43 clear_bit(cpu
, &prev
->cpu_vm_mask
);
45 set_bit(cpu
, &next
->cpu_vm_mask
);
48 #define activate_mm(prev, next) \
49 switch_mm((prev),(next),NULL,smp_processor_id())