aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-frv/tlbflush.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-frv/tlbflush.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-frv/tlbflush.h')
-rw-r--r--include/asm-frv/tlbflush.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/include/asm-frv/tlbflush.h b/include/asm-frv/tlbflush.h
new file mode 100644
index 000000000000..bc3462625084
--- /dev/null
+++ b/include/asm-frv/tlbflush.h
@@ -0,0 +1,77 @@
1/* tlbflush.h: TLB flushing functions
2 *
3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12#ifndef _ASM_TLBFLUSH_H
13#define _ASM_TLBFLUSH_H
14
15#include <linux/config.h>
16#include <linux/mm.h>
17#include <asm/processor.h>
18
19#ifdef CONFIG_MMU
20
21#ifndef __ASSEMBLY__
22extern void asmlinkage __flush_tlb_all(void);
23extern void asmlinkage __flush_tlb_mm(unsigned long contextid);
24extern void asmlinkage __flush_tlb_page(unsigned long contextid, unsigned long start);
25extern void asmlinkage __flush_tlb_range(unsigned long contextid,
26 unsigned long start, unsigned long end);
27#endif /* !__ASSEMBLY__ */
28
29#define flush_tlb_all() \
30do { \
31 preempt_disable(); \
32 __flush_tlb_all(); \
33 preempt_enable(); \
34} while(0)
35
36#define flush_tlb_mm(mm) \
37do { \
38 preempt_disable(); \
39 __flush_tlb_mm((mm)->context.id); \
40 preempt_enable(); \
41} while(0)
42
43#define flush_tlb_range(vma,start,end) \
44do { \
45 preempt_disable(); \
46 __flush_tlb_range((vma)->vm_mm->context.id, start, end); \
47 preempt_enable(); \
48} while(0)
49
50#define flush_tlb_page(vma,addr) \
51do { \
52 preempt_disable(); \
53 __flush_tlb_page((vma)->vm_mm->context.id, addr); \
54 preempt_enable(); \
55} while(0)
56
57
58#define __flush_tlb_global() flush_tlb_all()
59#define flush_tlb() flush_tlb_all()
60#define flush_tlb_kernel_range(start, end) flush_tlb_all()
61#define flush_tlb_pgtables(mm,start,end) \
62 asm volatile("movgs %0,scr0 ! movgs %0,scr1" :: "r"(ULONG_MAX) : "memory");
63
64#else
65
66#define flush_tlb() BUG()
67#define flush_tlb_all() BUG()
68#define flush_tlb_mm(mm) BUG()
69#define flush_tlb_page(vma,addr) BUG()
70#define flush_tlb_range(mm,start,end) BUG()
71#define flush_tlb_pgtables(mm,start,end) BUG()
72#define flush_tlb_kernel_range(start, end) BUG()
73
74#endif
75
76
77#endif /* _ASM_TLBFLUSH_H */