1
2
3
4
5
6
7
8
9
10
11
12#ifndef __UNICORE_MMU_CONTEXT_H__
13#define __UNICORE_MMU_CONTEXT_H__
14
15#include <linux/compiler.h>
16#include <linux/sched.h>
17#include <linux/io.h>
18
19#include <asm/cacheflush.h>
20#include <asm/cpu-single.h>
21
22#define init_new_context(tsk, mm) 0
23
24#define destroy_context(mm) do { } while (0)
25
26
27
28
29
30
31
32
33
34
35static inline void
36enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
37{
38}
39
40
41
42
43
44
45
46static inline void
47switch_mm(struct mm_struct *prev, struct mm_struct *next,
48 struct task_struct *tsk)
49{
50 unsigned int cpu = smp_processor_id();
51
52 if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next)
53 cpu_switch_mm(next->pgd, next);
54}
55
56#define deactivate_mm(tsk, mm) do { } while (0)
57#define activate_mm(prev, next) switch_mm(prev, next, NULL)
58
59
60
61
62
63
64
65
66#define arch_exit_mmap(mm) \
67do { \
68 struct vm_area_struct *high_vma = find_vma(mm, 0xffff0000); \
69 if (high_vma) { \
70 BUG_ON(high_vma->vm_next); \
71 if (high_vma->vm_prev) \
72 high_vma->vm_prev->vm_next = NULL; \
73 else \
74 mm->mmap = NULL; \
75 rb_erase(&high_vma->vm_rb, &mm->mm_rb); \
76 mm->mmap_cache = NULL; \
77 mm->map_count--; \
78 remove_vma(high_vma); \
79 } \
80} while (0)
81
82static inline void arch_dup_mmap(struct mm_struct *oldmm,
83 struct mm_struct *mm)
84{
85}
86
87#endif
88