Changeset b00fdde in mainline
- Timestamp:
- 2005-12-08T22:43:39Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0d04024
- Parents:
- 944b15c
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/include/mm/tlb.h
r944b15c rb00fdde 30 30 #define __amd64_TLB_H__ 31 31 32 #define tlb_init_arch() 32 #define tlb_arch_init() 33 #define tlb_print() 33 34 34 35 #endif -
arch/ia32/include/mm/tlb.h
r944b15c rb00fdde 30 30 #define __ia32_TLB_H__ 31 31 32 #define tlb_init_arch() 32 #define tlb_arch_init() 33 #define tlb_print() 33 34 34 35 #endif -
arch/ia64/include/mm/tlb.h
r944b15c rb00fdde 30 30 #define __ia64_TLB_H__ 31 31 32 #define tlb_init_arch() 32 #define tlb_arch_init() 33 #define tlb_print() 33 34 34 35 #endif -
arch/mips32/src/mm/tlb.c
r944b15c rb00fdde 54 54 * Invalidate all entries and mark wired entries. 55 55 */ 56 void tlb_ init_arch(void)56 void tlb_arch_init(void) 57 57 { 58 58 int i; … … 399 399 hi->asid = asid; 400 400 } 401 402 void tlb_print(void) 403 { 404 } -
arch/ppc32/include/mm/tlb.h
r944b15c rb00fdde 30 30 #define __ppc32_TLB_H__ 31 31 32 #define tlb_init_arch() 32 #define tlb_arch_init() 33 #define tlb_print() 33 34 34 35 #endif -
arch/sparc64/Makefile.inc
r944b15c rb00fdde 54 54 arch/$(ARCH)/src/mm/frame.c \ 55 55 arch/$(ARCH)/src/mm/page.c \ 56 arch/$(ARCH)/src/mm/tlb.c \ 56 57 arch/$(ARCH)/src/sparc64.c \ 57 58 arch/$(ARCH)/src/start.S \ -
arch/sparc64/include/asm.h
r944b15c rb00fdde 108 108 } 109 109 110 /** Load __u64 from alternate space. 111 * 112 * @param asi ASI determining the alternate space. 113 * @param va Virtual address within the ASI. 114 * 115 * @return Value read from the virtual address in the specified address space. 116 */ 117 static inline __u64 asi_u64_read(asi_t asi, __address va) 118 { 119 __u64 v; 120 121 __asm__ volatile ("ldxa [%1] %2, %0\n" : "=r" (v) : "r" (va), "i" (asi)); 122 123 return v; 124 } 125 126 /** Store __u64 to alternate space. 127 * 128 * @param asi ASI determining the alternate space. 129 * @param va Virtual address within the ASI. 130 * @param v Value to be written. 131 */ 132 static inline void asi_u64_write(asi_t asi, __address va, __u64 v) 133 { 134 __asm__ volatile ("stxa %0, [%1] %2\n" : : "r" (v), "r" (va), "i" (asi)); 135 } 136 110 137 111 138 void cpu_halt(void); -
arch/sparc64/include/barrier.h
r944b15c rb00fdde 40 40 #define write_barrier() 41 41 42 #define flush() __asm__ volatile ("flush\n" ::: "memory") 43 42 44 #endif -
arch/sparc64/include/mm/tlb.h
r944b15c rb00fdde 31 31 32 32 #include <arch/mm/tte.h> 33 #include <arch/asm.h> 34 #include <arch/types.h> 35 #include <typedefs.h> 36 37 #define ITLB_ENTRY_COUNT 64 38 #define DTLB_ENTRY_COUNT 64 33 39 34 40 /** I-MMU ASIs. */ … … 71 77 typedef tte_data_t tlb_data_t; 72 78 73 #define tlb_init_arch() 79 /** I-/D-TLB Data Access Address in Alternate Space. */ 80 union tlb_data_access_addr { 81 __u64 value; 82 struct { 83 __u64 : 55; 84 unsigned tlb_entry : 6; 85 unsigned : 3; 86 } __attribute__ ((packed)); 87 }; 88 typedef union tlb_data_access_addr tlb_data_access_addr_t; 89 typedef union tlb_data_access_addr tlb_tag_read_addr_t; 90 91 /** I-/D-TLB Tag Read Register. */ 92 union tlb_tag_read_reg { 93 __u64 value; 94 struct { 95 __u64 va : 51; /**< Virtual Address. */ 96 unsigned context : 13; /**< Context identifier. */ 97 } __attribute__ ((packed)); 98 }; 99 typedef union tlb_tag_read_reg tlb_tag_read_reg_t; 100 101 /** Read IMMU TLB Data Access Register. 102 * 103 * @param entry TLB Entry index. 104 * 105 * @return Current value of specified IMMU TLB Data Access Register. 106 */ 107 static inline __u64 itlb_data_access_read(index_t entry) 108 { 109 tlb_data_access_addr_t reg; 110 111 reg.value = 0; 112 reg.tlb_entry = entry; 113 return asi_u64_read(ASI_ITLB_DATA_ACCESS_REG, reg.value); 114 } 115 116 /** Read DMMU TLB Data Access Register. 117 * 118 * @param entry TLB Entry index. 119 * 120 * @return Current value of specified DMMU TLB Data Access Register. 121 */ 122 static inline __u64 dtlb_data_access_read(index_t entry) 123 { 124 tlb_data_access_addr_t reg; 125 126 reg.value = 0; 127 reg.tlb_entry = entry; 128 return asi_u64_read(ASI_DTLB_DATA_ACCESS_REG, reg.value); 129 } 130 131 /** Read IMMU TLB Tag Read Register. 132 * 133 * @param entry TLB Entry index. 134 * 135 * @return Current value of specified IMMU TLB Tag Read Register. 136 */ 137 static inline __u64 itlb_tag_read(index_t entry) 138 { 139 tlb_tag_read_addr_t tag; 140 141 tag.value = 0; 142 tag.tlb_entry = entry; 143 return asi_u64_read(ASI_ITLB_TAG_READ_REG, tag.value); 144 } 145 146 /** Read DMMU TLB Tag Read Register. 147 * 148 * @param entry TLB Entry index. 149 * 150 * @return Current value of specified DMMU TLB Tag Read Register. 151 */ 152 static inline __u64 dtlb_tag_read(index_t entry) 153 { 154 tlb_tag_read_addr_t tag; 155 156 tag.value = 0; 157 tag.tlb_entry = entry; 158 return asi_u64_read(ASI_DTLB_TAG_READ_REG, tag.value); 159 } 74 160 75 161 #endif -
arch/sparc64/include/types.h
r944b15c rb00fdde 47 47 typedef __u64 pte_t; 48 48 49 typedef __u8 asi_t; 50 49 51 #endif -
generic/include/mm/tlb.h
r944b15c rb00fdde 45 45 46 46 /* Export TLB interface that each architecture must implement. */ 47 extern void tlb_init_arch(void); 47 extern void tlb_arch_init(void); 48 extern void tlb_print(void); 48 49 extern void tlb_invalidate(asid_t asid); 49 50 extern void tlb_shootdown_ipi_send(void); -
generic/src/mm/tlb.c
r944b15c rb00fdde 46 46 spinlock_initialize(&tlblock, "tlb_lock"); 47 47 48 tlb_ init_arch();48 tlb_arch_init(); 49 49 } 50 50
Note:
See TracChangeset
for help on using the changeset viewer.