aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/tlb_64.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-07-28 19:09:44 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-07-28 19:09:44 -0400
commitf15cbe6f1a4b4d9df59142fc8e4abb973302cf44 (patch)
tree774d7b11abaaf33561ab8268bf51ddd9ceb79025 /include/asm-sh/tlb_64.h
parent25326277d8d1393d1c66240e6255aca780f9e3eb (diff)
sh: migrate to arch/sh/include/
This follows the sparc changes a439fe51a1f8eb087c22dd24d69cebae4a3addac. Most of the moving about was done with Sam's directions at: http://marc.info/?l=linux-sh&m=121724823706062&w=2 with subsequent hacking and fixups entirely my fault. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/tlb_64.h')
-rw-r--r--include/asm-sh/tlb_64.h77
1 files changed, 0 insertions, 77 deletions
diff --git a/include/asm-sh/tlb_64.h b/include/asm-sh/tlb_64.h
deleted file mode 100644
index 0a96f3af69e3..000000000000
--- a/include/asm-sh/tlb_64.h
+++ /dev/null
@@ -1,77 +0,0 @@
1/*
2 * include/asm-sh/tlb_64.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#ifndef __ASM_SH_TLB_64_H
11#define __ASM_SH_TLB_64_H
12
13/* ITLB defines */
14#define ITLB_FIXED 0x00000000 /* First fixed ITLB, see head.S */
15#define ITLB_LAST_VAR_UNRESTRICTED 0x000003F0 /* Last ITLB */
16
17/* DTLB defines */
18#define DTLB_FIXED 0x00800000 /* First fixed DTLB, see head.S */
19#define DTLB_LAST_VAR_UNRESTRICTED 0x008003F0 /* Last DTLB */
20
21#ifndef __ASSEMBLY__
22
23/**
24 * for_each_dtlb_entry
25 *
26 * @tlb: TLB entry
27 *
28 * Iterate over free (non-wired) DTLB entries
29 */
30#define for_each_dtlb_entry(tlb) \
31 for (tlb = cpu_data->dtlb.first; \
32 tlb <= cpu_data->dtlb.last; \
33 tlb += cpu_data->dtlb.step)
34
35/**
36 * for_each_itlb_entry
37 *
38 * @tlb: TLB entry
39 *
40 * Iterate over free (non-wired) ITLB entries
41 */
42#define for_each_itlb_entry(tlb) \
43 for (tlb = cpu_data->itlb.first; \
44 tlb <= cpu_data->itlb.last; \
45 tlb += cpu_data->itlb.step)
46
47/**
48 * __flush_tlb_slot
49 *
50 * @slot: Address of TLB slot.
51 *
52 * Flushes TLB slot @slot.
53 */
54static inline void __flush_tlb_slot(unsigned long long slot)
55{
56 __asm__ __volatile__ ("putcfg %0, 0, r63\n" : : "r" (slot));
57}
58
59#ifdef CONFIG_MMU
60/* arch/sh64/mm/tlb.c */
61int sh64_tlb_init(void);
62unsigned long long sh64_next_free_dtlb_entry(void);
63unsigned long long sh64_get_wired_dtlb_entry(void);
64int sh64_put_wired_dtlb_entry(unsigned long long entry);
65void sh64_setup_tlb_slot(unsigned long long config_addr, unsigned long eaddr,
66 unsigned long asid, unsigned long paddr);
67void sh64_teardown_tlb_slot(unsigned long long config_addr);
68#else
69#define sh64_tlb_init() do { } while (0)
70#define sh64_next_free_dtlb_entry() (0)
71#define sh64_get_wired_dtlb_entry() (0)
72#define sh64_put_wired_dtlb_entry(entry) do { } while (0)
73#define sh64_setup_tlb_slot(conf, virt, asid, phys) do { } while (0)
74#define sh64_teardown_tlb_slot(addr) do { } while (0)
75#endif /* CONFIG_MMU */
76#endif /* __ASSEMBLY__ */
77#endif /* __ASM_SH_TLB_64_H */