Changeset 756f475 in mainline
- Timestamp:
- 2008-10-11T17:39:26Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 338a8382
- Parents:
- c61d34b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/include/asm.h
rc61d34b r756f475 45 45 static inline void outb(uint64_t port,uint8_t v) 46 46 { 47 *((char *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))) = v; 48 49 asm volatile ("mf\n" ::: "memory"); 50 } 47 *((uint8_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))) = v; 48 49 asm volatile ("mf\n" ::: "memory"); 50 } 51 52 static inline void outw(uint64_t port,uint16_t v) 53 { 54 *((uint16_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))) = v; 55 56 asm volatile ("mf\n" ::: "memory"); 57 } 58 59 static inline void outl(uint64_t port,uint32_t v) 60 { 61 *((uint32_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))) = v; 62 63 asm volatile ("mf\n" ::: "memory"); 64 } 65 51 66 52 67 … … 55 70 asm volatile ("mf\n" ::: "memory"); 56 71 57 return *((char *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))); 72 return *((uint8_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))); 73 } 74 75 static inline uint16_t inw(uint64_t port) 76 { 77 asm volatile ("mf\n" ::: "memory"); 78 79 return *((uint16_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xffE) | ( (port >> 2) << 12 )))); 80 } 81 82 static inline uint32_t inl(uint64_t port) 83 { 84 asm volatile ("mf\n" ::: "memory"); 85 86 return *((uint32_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))); 58 87 } 59 88
Note:
See TracChangeset
for help on using the changeset viewer.