Changeset 7f1c620 in mainline for arch/sparc64/include/asm.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/sparc64/include/asm.h
r991779c5 r7f1c620 45 45 * @return Value of PSTATE register. 46 46 */ 47 static inline __u64pstate_read(void)48 { 49 __u64v;47 static inline uint64_t pstate_read(void) 48 { 49 uint64_t v; 50 50 51 51 __asm__ volatile ("rdpr %%pstate, %0\n" : "=r" (v)); … … 58 58 * @param v New value of PSTATE register. 59 59 */ 60 static inline void pstate_write( __u64v)60 static inline void pstate_write(uint64_t v) 61 61 { 62 62 __asm__ volatile ("wrpr %0, %1, %%pstate\n" : : "r" (v), "i" (0)); … … 67 67 * @return Value of TICK_comapre register. 68 68 */ 69 static inline __u64tick_compare_read(void)70 { 71 __u64v;69 static inline uint64_t tick_compare_read(void) 70 { 71 uint64_t v; 72 72 73 73 __asm__ volatile ("rd %%tick_cmpr, %0\n" : "=r" (v)); … … 80 80 * @param v New value of TICK_comapre register. 81 81 */ 82 static inline void tick_compare_write( __u64v)82 static inline void tick_compare_write(uint64_t v) 83 83 { 84 84 __asm__ volatile ("wr %0, %1, %%tick_cmpr\n" : : "r" (v), "i" (0)); … … 89 89 * @return Value of TICK register. 90 90 */ 91 static inline __u64tick_read(void)92 { 93 __u64v;91 static inline uint64_t tick_read(void) 92 { 93 uint64_t v; 94 94 95 95 __asm__ volatile ("rdpr %%tick, %0\n" : "=r" (v)); … … 102 102 * @param v New value of TICK register. 103 103 */ 104 static inline void tick_write( __u64v)104 static inline void tick_write(uint64_t v) 105 105 { 106 106 __asm__ volatile ("wrpr %0, %1, %%tick\n" : : "r" (v), "i" (0)); … … 111 111 * @return Value of SOFTINT register. 112 112 */ 113 static inline __u64softint_read(void)114 { 115 __u64v;113 static inline uint64_t softint_read(void) 114 { 115 uint64_t v; 116 116 117 117 __asm__ volatile ("rd %%softint, %0\n" : "=r" (v)); … … 124 124 * @param v New value of SOFTINT register. 125 125 */ 126 static inline void softint_write( __u64v)126 static inline void softint_write(uint64_t v) 127 127 { 128 128 __asm__ volatile ("wr %0, %1, %%softint\n" : : "r" (v), "i" (0)); … … 135 135 * @param v New value of CLEAR_SOFTINT register. 136 136 */ 137 static inline void clear_softint_write( __u64v)137 static inline void clear_softint_write(uint64_t v) 138 138 { 139 139 __asm__ volatile ("wr %0, %1, %%clear_softint\n" : : "r" (v), "i" (0)); … … 149 149 static inline ipl_t interrupts_enable(void) { 150 150 pstate_reg_t pstate; 151 __u64value;151 uint64_t value; 152 152 153 153 value = pstate_read(); … … 168 168 static inline ipl_t interrupts_disable(void) { 169 169 pstate_reg_t pstate; 170 __u64value;170 uint64_t value; 171 171 172 172 value = pstate_read(); … … 208 208 * The stack must start on page boundary. 209 209 */ 210 static inline __addressget_stack_base(void)211 { 212 __addressv;210 static inline uintptr_t get_stack_base(void) 211 { 212 uintptr_t v; 213 213 214 214 __asm__ volatile ("and %%sp, %1, %0\n" : "=r" (v) : "r" (~(STACK_SIZE-1))); … … 221 221 * @return Value of VER register. 222 222 */ 223 static inline __u64ver_read(void)224 { 225 __u64v;223 static inline uint64_t ver_read(void) 224 { 225 uint64_t v; 226 226 227 227 __asm__ volatile ("rdpr %%ver, %0\n" : "=r" (v)); … … 234 234 * @return Current value in TBA. 235 235 */ 236 static inline __u64tba_read(void)237 { 238 __u64v;236 static inline uint64_t tba_read(void) 237 { 238 uint64_t v; 239 239 240 240 __asm__ volatile ("rdpr %%tba, %0\n" : "=r" (v)); … … 247 247 * @return Current value in TPC. 248 248 */ 249 static inline __u64tpc_read(void)250 { 251 __u64v;249 static inline uint64_t tpc_read(void) 250 { 251 uint64_t v; 252 252 253 253 __asm__ volatile ("rdpr %%tpc, %0\n" : "=r" (v)); … … 260 260 * @return Current value in TL. 261 261 */ 262 static inline __u64tl_read(void)263 { 264 __u64v;262 static inline uint64_t tl_read(void) 263 { 264 uint64_t v; 265 265 266 266 __asm__ volatile ("rdpr %%tl, %0\n" : "=r" (v)); … … 273 273 * @param v New value of TBA. 274 274 */ 275 static inline void tba_write( __u64v)275 static inline void tba_write(uint64_t v) 276 276 { 277 277 __asm__ volatile ("wrpr %0, %1, %%tba\n" : : "r" (v), "i" (0)); 278 278 } 279 279 280 /** Load __u64from alternate space.280 /** Load uint64_t from alternate space. 281 281 * 282 282 * @param asi ASI determining the alternate space. … … 285 285 * @return Value read from the virtual address in the specified address space. 286 286 */ 287 static inline __u64 asi_u64_read(asi_t asi, __addressva)288 { 289 __u64v;287 static inline uint64_t asi_u64_read(asi_t asi, uintptr_t va) 288 { 289 uint64_t v; 290 290 291 291 __asm__ volatile ("ldxa [%1] %2, %0\n" : "=r" (v) : "r" (va), "i" (asi)); … … 294 294 } 295 295 296 /** Store __u64to alternate space.296 /** Store uint64_t to alternate space. 297 297 * 298 298 * @param asi ASI determining the alternate space. … … 300 300 * @param v Value to be written. 301 301 */ 302 static inline void asi_u64_write(asi_t asi, __address va, __u64v)302 static inline void asi_u64_write(asi_t asi, uintptr_t va, uint64_t v) 303 303 { 304 304 __asm__ volatile ("stxa %0, [%1] %2\n" : : "r" (v), "r" (va), "i" (asi) : "memory"); … … 309 309 void cpu_halt(void); 310 310 void cpu_sleep(void); 311 void asm_delay_loop( __u32t);311 void asm_delay_loop(uint32_t t); 312 312 313 313 #endif
Note:
See TracChangeset
for help on using the changeset viewer.