diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-04-17 10:18:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-17 10:18:28 -0400 |
commit | 5043124e660fcc3ddefe4239ddfa017bf13f5081 (patch) | |
tree | 06875cdb942afe460dbac33acf3e8223c805a35d /arch/mn10300/include/asm/tlbflush.h | |
parent | 77857dc07247ed5fa700a197c96ef842d8dbebdf (diff) | |
parent | 9f76208c33984ab777eace5d07a4e36e88703e02 (diff) |
Merge branch 'linus' into x86/apic
Merge reason: new intr-remap patches depend on the s2ram iommu fixes from upstream
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/mn10300/include/asm/tlbflush.h')
-rw-r--r-- | arch/mn10300/include/asm/tlbflush.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/arch/mn10300/include/asm/tlbflush.h b/arch/mn10300/include/asm/tlbflush.h new file mode 100644 index 000000000000..e0239865abcb --- /dev/null +++ b/arch/mn10300/include/asm/tlbflush.h | |||
@@ -0,0 +1,80 @@ | |||
1 | /* MN10300 TLB flushing functions | ||
2 | * | ||
3 | * Copyright (C) 2007 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 Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | #ifndef _ASM_TLBFLUSH_H | ||
12 | #define _ASM_TLBFLUSH_H | ||
13 | |||
14 | #include <asm/processor.h> | ||
15 | |||
16 | #define __flush_tlb() \ | ||
17 | do { \ | ||
18 | int w; \ | ||
19 | __asm__ __volatile__ \ | ||
20 | (" mov %1,%0 \n" \ | ||
21 | " or %2,%0 \n" \ | ||
22 | " mov %0,%1 \n" \ | ||
23 | : "=d"(w) \ | ||
24 | : "m"(MMUCTR), "i"(MMUCTR_IIV|MMUCTR_DIV) \ | ||
25 | : "memory" \ | ||
26 | ); \ | ||
27 | } while (0) | ||
28 | |||
29 | #define __flush_tlb_all() __flush_tlb() | ||
30 | #define __flush_tlb_one(addr) __flush_tlb() | ||
31 | |||
32 | |||
33 | /* | ||
34 | * TLB flushing: | ||
35 | * | ||
36 | * - flush_tlb() flushes the current mm struct TLBs | ||
37 | * - flush_tlb_all() flushes all processes TLBs | ||
38 | * - flush_tlb_mm(mm) flushes the specified mm context TLB's | ||
39 | * - flush_tlb_page(vma, vmaddr) flushes one page | ||
40 | * - flush_tlb_range(mm, start, end) flushes a range of pages | ||
41 | * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables | ||
42 | */ | ||
43 | #define flush_tlb_all() \ | ||
44 | do { \ | ||
45 | preempt_disable(); \ | ||
46 | __flush_tlb_all(); \ | ||
47 | preempt_enable(); \ | ||
48 | } while (0) | ||
49 | |||
50 | #define flush_tlb_mm(mm) \ | ||
51 | do { \ | ||
52 | preempt_disable(); \ | ||
53 | __flush_tlb_all(); \ | ||
54 | preempt_enable(); \ | ||
55 | } while (0) | ||
56 | |||
57 | #define flush_tlb_range(vma, start, end) \ | ||
58 | do { \ | ||
59 | unsigned long __s __attribute__((unused)) = (start); \ | ||
60 | unsigned long __e __attribute__((unused)) = (end); \ | ||
61 | preempt_disable(); \ | ||
62 | __flush_tlb_all(); \ | ||
63 | preempt_enable(); \ | ||
64 | } while (0) | ||
65 | |||
66 | |||
67 | #define __flush_tlb_global() flush_tlb_all() | ||
68 | #define flush_tlb() flush_tlb_all() | ||
69 | #define flush_tlb_kernel_range(start, end) \ | ||
70 | do { \ | ||
71 | unsigned long __s __attribute__((unused)) = (start); \ | ||
72 | unsigned long __e __attribute__((unused)) = (end); \ | ||
73 | flush_tlb_all(); \ | ||
74 | } while (0) | ||
75 | |||
76 | extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr); | ||
77 | |||
78 | #define flush_tlb_pgtables(mm, start, end) do {} while (0) | ||
79 | |||
80 | #endif /* _ASM_TLBFLUSH_H */ | ||