ae253d4eef4cbcea45b5a1961dd1768fa2c7d93e
[openwrt/svn-archive/archive.git] / target / linux / coldfire / files-2.6.31 / arch / m68k / include / asm / cf_tlbflush.h
1 /*
2 * Copyright 2007-2009 Freescale Semiconductor, Inc. All Rights Reserved.
3 */
4 #ifndef M68K_CF_TLBFLUSH_H
5 #define M68K_CF_TLBFLUSH_H
6
7 #include <asm/coldfire.h>
8
9 /* Flush all userspace mappings. */
10 static inline void flush_tlb_all(void)
11 {
12 preempt_disable();
13 *MMUOR = MMUOR_CNL;
14 preempt_enable();
15 }
16
17 /* Clear user TLB entries within the context named in mm */
18 static inline void flush_tlb_mm(struct mm_struct *mm)
19 {
20 preempt_disable();
21 *MMUOR = MMUOR_CNL;
22 preempt_enable();
23 }
24
25 /* Flush a single TLB page. */
26 static inline void flush_tlb_page(struct vm_area_struct *vma,
27 unsigned long addr)
28 {
29 preempt_disable();
30 *MMUOR = MMUOR_CNL;
31 preempt_enable();
32 }
33 /* Flush a range of pages from TLB. */
34
35 static inline void flush_tlb_range(struct mm_struct *mm,
36 unsigned long start, unsigned long end)
37 {
38 preempt_disable();
39 *MMUOR = MMUOR_CNL;
40 preempt_enable();
41 }
42
43 /* Flush kernel page from TLB. */
44 static inline void flush_tlb_kernel_page(void *addr)
45 {
46 preempt_disable();
47 *MMUOR = MMUOR_CNL;
48 preempt_enable();
49 }
50
51 static inline void flush_tlb_kernel_range(unsigned long start,
52 unsigned long end)
53 {
54 flush_tlb_all();
55 }
56
57 extern inline void flush_tlb_pgtables(struct mm_struct *mm,
58 unsigned long start, unsigned long end)
59 {
60 }
61
62 #endif /* M68K_CF_TLBFLUSH_H */