Changeset 7f1c620 in mainline for arch/ia64/include/mm/page.h
- Timestamp:
- 2006-07-04T17:17:56Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ffa3ef5
- Parents:
- 991779c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia64/include/mm/page.h
r991779c5 r7f1c620 28 28 */ 29 29 30 30 /** @addtogroup ia64mm 31 31 * @{ 32 32 */ … … 62 62 #define REGION_REGISTERS 8 63 63 64 #define KA2PA(x) (( __address) (x-(VRN_KERNEL<<VRN_SHIFT)))65 #define PA2KA(x) (( __address) (x+(VRN_KERNEL<<VRN_SHIFT)))64 #define KA2PA(x) ((uintptr_t) (x-(VRN_KERNEL<<VRN_SHIFT))) 65 #define PA2KA(x) ((uintptr_t) (x+(VRN_KERNEL<<VRN_SHIFT))) 66 66 67 67 #define VHPT_WIDTH 20 /* 1M */ … … 127 127 128 128 /* Word 3 */ 129 __u64ig3 : 64;129 uint64_t ig3 : 64; 130 130 } __attribute__ ((packed)); 131 131 … … 145 145 146 146 /* Word 3 */ 147 __u64ig3 : 64;147 uint64_t ig3 : 64; 148 148 } __attribute__ ((packed)); 149 149 … … 151 151 struct vhpt_entry_present present; 152 152 struct vhpt_entry_not_present not_present; 153 __u64word[4];153 uint64_t word[4]; 154 154 } vhpt_entry_t; 155 155 … … 178 178 typedef union pta_register { 179 179 struct pta_register_map map; 180 __u64word;180 uint64_t word; 181 181 } pta_register; 182 182 … … 190 190 * @return Address of the head of VHPT collision chain. 191 191 */ 192 static inline __u64 thash(__u64va)193 { 194 __u64ret;192 static inline uint64_t thash(uint64_t va) 193 { 194 uint64_t ret; 195 195 196 196 __asm__ volatile ("thash %0 = %1\n" : "=r" (ret) : "r" (va)); … … 208 208 * @return The unique tag for VPN and RID in the collision chain returned by thash(). 209 209 */ 210 static inline __u64 ttag(__u64va)211 { 212 __u64ret;210 static inline uint64_t ttag(uint64_t va) 211 { 212 uint64_t ret; 213 213 214 214 __asm__ volatile ("ttag %0 = %1\n" : "=r" (ret) : "r" (va)); … … 223 223 * @return Current contents of rr[i]. 224 224 */ 225 static inline __u64rr_read(index_t i)226 { 227 __u64ret;225 static inline uint64_t rr_read(index_t i) 226 { 227 uint64_t ret; 228 228 ASSERT(i < REGION_REGISTERS); 229 229 __asm__ volatile ("mov %0 = rr[%1]\n" : "=r" (ret) : "r" (i << VRN_SHIFT)); … … 236 236 * @param v Value to be written to rr[i]. 237 237 */ 238 static inline void rr_write(index_t i, __u64v)238 static inline void rr_write(index_t i, uint64_t v) 239 239 { 240 240 ASSERT(i < REGION_REGISTERS); … … 250 250 * @return Current value stored in PTA. 251 251 */ 252 static inline __u64pta_read(void)253 { 254 __u64ret;252 static inline uint64_t pta_read(void) 253 { 254 uint64_t ret; 255 255 256 256 __asm__ volatile ("mov %0 = cr.pta\n" : "=r" (ret)); … … 263 263 * @param v New value to be stored in PTA. 264 264 */ 265 static inline void pta_write( __u64v)265 static inline void pta_write(uint64_t v) 266 266 { 267 267 __asm__ volatile ("mov cr.pta = %0\n" : : "r" (v)); … … 270 270 extern void page_arch_init(void); 271 271 272 extern vhpt_entry_t *vhpt_hash( __addresspage, asid_t asid);273 extern bool vhpt_compare( __addresspage, asid_t asid, vhpt_entry_t *v);274 extern void vhpt_set_record(vhpt_entry_t *v, __address page, asid_t asid, __addressframe, int flags);272 extern vhpt_entry_t *vhpt_hash(uintptr_t page, asid_t asid); 273 extern bool vhpt_compare(uintptr_t page, asid_t asid, vhpt_entry_t *v); 274 extern void vhpt_set_record(vhpt_entry_t *v, uintptr_t page, asid_t asid, uintptr_t frame, int flags); 275 275 276 276 #endif /* __ASM__ */ … … 280 280 #endif 281 281 282 /** @} 283 */ 284 282 /** @} 283 */
Note:
See TracChangeset
for help on using the changeset viewer.