Changeset b00fdde in mainline for arch/sparc64/include/mm/tlb.h
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.