diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-sh64/tlb.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-sh64/tlb.h')
-rw-r--r-- | include/asm-sh64/tlb.h | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/include/asm-sh64/tlb.h b/include/asm-sh64/tlb.h new file mode 100644 index 000000000000..4979408bd88c --- /dev/null +++ b/include/asm-sh64/tlb.h | |||
@@ -0,0 +1,92 @@ | |||
1 | /* | ||
2 | * include/asm-sh64/tlb.h | ||
3 | * | ||
4 | * Copyright (C) 2003 Paul Mundt | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | * | ||
10 | */ | ||
11 | #ifndef __ASM_SH64_TLB_H | ||
12 | #define __ASM_SH64_TLB_H | ||
13 | |||
14 | /* | ||
15 | * Note! These are mostly unused, we just need the xTLB_LAST_VAR_UNRESTRICTED | ||
16 | * for head.S! Once this limitation is gone, we can clean the rest of this up. | ||
17 | */ | ||
18 | |||
19 | /* ITLB defines */ | ||
20 | #define ITLB_FIXED 0x00000000 /* First fixed ITLB, see head.S */ | ||
21 | #define ITLB_LAST_VAR_UNRESTRICTED 0x000003F0 /* Last ITLB */ | ||
22 | |||
23 | /* DTLB defines */ | ||
24 | #define DTLB_FIXED 0x00800000 /* First fixed DTLB, see head.S */ | ||
25 | #define DTLB_LAST_VAR_UNRESTRICTED 0x008003F0 /* Last DTLB */ | ||
26 | |||
27 | #ifndef __ASSEMBLY__ | ||
28 | |||
29 | /** | ||
30 | * for_each_dtlb_entry | ||
31 | * | ||
32 | * @tlb: TLB entry | ||
33 | * | ||
34 | * Iterate over free (non-wired) DTLB entries | ||
35 | */ | ||
36 | #define for_each_dtlb_entry(tlb) \ | ||
37 | for (tlb = cpu_data->dtlb.first; \ | ||
38 | tlb <= cpu_data->dtlb.last; \ | ||
39 | tlb += cpu_data->dtlb.step) | ||
40 | |||
41 | /** | ||
42 | * for_each_itlb_entry | ||
43 | * | ||
44 | * @tlb: TLB entry | ||
45 | * | ||
46 | * Iterate over free (non-wired) ITLB entries | ||
47 | */ | ||
48 | #define for_each_itlb_entry(tlb) \ | ||
49 | for (tlb = cpu_data->itlb.first; \ | ||
50 | tlb <= cpu_data->itlb.last; \ | ||
51 | tlb += cpu_data->itlb.step) | ||
52 | |||
53 | /** | ||
54 | * __flush_tlb_slot | ||
55 | * | ||
56 | * @slot: Address of TLB slot. | ||
57 | * | ||
58 | * Flushes TLB slot @slot. | ||
59 | */ | ||
60 | static inline void __flush_tlb_slot(unsigned long long slot) | ||
61 | { | ||
62 | __asm__ __volatile__ ("putcfg %0, 0, r63\n" : : "r" (slot)); | ||
63 | } | ||
64 | |||
65 | /* arch/sh64/mm/tlb.c */ | ||
66 | extern int sh64_tlb_init(void); | ||
67 | extern unsigned long long sh64_next_free_dtlb_entry(void); | ||
68 | extern unsigned long long sh64_get_wired_dtlb_entry(void); | ||
69 | extern int sh64_put_wired_dtlb_entry(unsigned long long entry); | ||
70 | |||
71 | extern void sh64_setup_tlb_slot(unsigned long long config_addr, unsigned long eaddr, unsigned long asid, unsigned long paddr); | ||
72 | extern void sh64_teardown_tlb_slot(unsigned long long config_addr); | ||
73 | |||
74 | #define tlb_start_vma(tlb, vma) \ | ||
75 | flush_cache_range(vma, vma->vm_start, vma->vm_end) | ||
76 | |||
77 | #define tlb_end_vma(tlb, vma) \ | ||
78 | flush_tlb_range(vma, vma->vm_start, vma->vm_end) | ||
79 | |||
80 | #define __tlb_remove_tlb_entry(tlb, pte, address) do { } while (0) | ||
81 | |||
82 | /* | ||
83 | * Flush whole TLBs for MM | ||
84 | */ | ||
85 | #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) | ||
86 | |||
87 | #include <asm-generic/tlb.h> | ||
88 | |||
89 | #endif /* __ASSEMBLY__ */ | ||
90 | |||
91 | #endif /* __ASM_SH64_TLB_H */ | ||
92 | |||