1
2#ifndef _PARISC_TLBFLUSH_H
3#define _PARISC_TLBFLUSH_H
4
5
6
7#include <linux/mm.h>
8#include <linux/sched.h>
9#include <asm/mmu_context.h>
10
11extern void flush_tlb_all(void);
12extern void flush_tlb_all_local(void *);
13
14#define smp_flush_tlb_all() flush_tlb_all()
15
16int __flush_tlb_range(unsigned long sid,
17 unsigned long start, unsigned long end);
18
19#define flush_tlb_range(vma, start, end) \
20 __flush_tlb_range((vma)->vm_mm->context.space_id, start, end)
21
22#define flush_tlb_kernel_range(start, end) \
23 __flush_tlb_range(0, start, end)
24
25
26
27
28
29
30
31
32
33
34
35
36static inline void flush_tlb_mm(struct mm_struct *mm)
37{
38 BUG_ON(mm == &init_mm);
39
40#if 1 || defined(CONFIG_SMP)
41
42
43
44
45
46
47 flush_tlb_all();
48#else
49
50
51
52
53
54 if (mm) {
55 if (mm->context != 0)
56 free_sid(mm->context);
57 mm->context = alloc_sid();
58 if (mm == current->active_mm)
59 load_context(mm->context);
60 }
61#endif
62}
63
64static inline void flush_tlb_page(struct vm_area_struct *vma,
65 unsigned long addr)
66{
67 purge_tlb_entries(vma->vm_mm, addr);
68}
69#endif
70