Linux 2.6.25.3
[linux/fpc-iii.git] / include / asm-sh / tlb_64.h
blob0308e05fc57be27a1fd48f3bfeaccee9a7b0a305
1 /*
2 * include/asm-sh/tlb_64.h
4 * Copyright (C) 2003 Paul Mundt
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
13 /* ITLB defines */
14 #define ITLB_FIXED 0x00000000 /* First fixed ITLB, see head.S */
15 #define ITLB_LAST_VAR_UNRESTRICTED 0x000003F0 /* Last ITLB */
17 /* DTLB defines */
18 #define DTLB_FIXED 0x00800000 /* First fixed DTLB, see head.S */
19 #define DTLB_LAST_VAR_UNRESTRICTED 0x008003F0 /* Last DTLB */
21 #ifndef __ASSEMBLY__
23 /**
24 * for_each_dtlb_entry
26 * @tlb: TLB entry
28 * Iterate over free (non-wired) DTLB entries
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)
35 /**
36 * for_each_itlb_entry
38 * @tlb: TLB entry
40 * Iterate over free (non-wired) ITLB entries
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)
47 /**
48 * __flush_tlb_slot
50 * @slot: Address of TLB slot.
52 * Flushes TLB slot @slot.
54 static inline void __flush_tlb_slot(unsigned long long slot)
56 __asm__ __volatile__ ("putcfg %0, 0, r63\n" : : "r" (slot));
59 /* arch/sh64/mm/tlb.c */
60 int sh64_tlb_init(void);
61 unsigned long long sh64_next_free_dtlb_entry(void);
62 unsigned long long sh64_get_wired_dtlb_entry(void);
63 int sh64_put_wired_dtlb_entry(unsigned long long entry);
64 void sh64_setup_tlb_slot(unsigned long long config_addr, unsigned long eaddr,
65 unsigned long asid, unsigned long paddr);
66 void sh64_teardown_tlb_slot(unsigned long long config_addr);
68 #endif /* __ASSEMBLY__ */
69 #endif /* __ASM_SH_TLB_64_H */