aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/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-ppc64/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-ppc64/tlbflush.h')
-rw-r--r--include/asm-ppc64/tlbflush.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/include/asm-ppc64/tlbflush.h b/include/asm-ppc64/tlbflush.h
new file mode 100644
index 000000000000..45411a67e082
--- /dev/null
+++ b/include/asm-ppc64/tlbflush.h
@@ -0,0 +1,54 @@
1#ifndef _PPC64_TLBFLUSH_H
2#define _PPC64_TLBFLUSH_H
3
4/*
5 * TLB flushing:
6 *
7 * - flush_tlb_mm(mm) flushes the specified mm context TLB's
8 * - flush_tlb_page(vma, vmaddr) flushes one page
9 * - flush_tlb_page_nohash(vma, vmaddr) flushes one page if SW loaded TLB
10 * - flush_tlb_range(vma, start, end) flushes a range of pages
11 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
12 * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables
13 */
14
15#include <linux/percpu.h>
16#include <asm/page.h>
17
18#define PPC64_TLB_BATCH_NR 192
19
20struct mm_struct;
21struct ppc64_tlb_batch {
22 unsigned long index;
23 unsigned long context;
24 struct mm_struct *mm;
25 pte_t pte[PPC64_TLB_BATCH_NR];
26 unsigned long addr[PPC64_TLB_BATCH_NR];
27 unsigned long vaddr[PPC64_TLB_BATCH_NR];
28};
29DECLARE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch);
30
31extern void __flush_tlb_pending(struct ppc64_tlb_batch *batch);
32
33static inline void flush_tlb_pending(void)
34{
35 struct ppc64_tlb_batch *batch = &get_cpu_var(ppc64_tlb_batch);
36
37 if (batch->index)
38 __flush_tlb_pending(batch);
39 put_cpu_var(ppc64_tlb_batch);
40}
41
42#define flush_tlb_mm(mm) flush_tlb_pending()
43#define flush_tlb_page(vma, addr) flush_tlb_pending()
44#define flush_tlb_page_nohash(vma, addr) do { } while (0)
45#define flush_tlb_range(vma, start, end) \
46 do { (void)(start); flush_tlb_pending(); } while (0)
47#define flush_tlb_kernel_range(start, end) flush_tlb_pending()
48#define flush_tlb_pgtables(mm, start, end) do { } while (0)
49
50extern void flush_hash_page(unsigned long context, unsigned long ea, pte_t pte,
51 int local);
52void flush_hash_range(unsigned long context, unsigned long number, int local);
53
54#endif /* _PPC64_TLBFLUSH_H */