Changeset 8cc4ddb in mainline for kernel/arch/amd64/include/asm.h
- Timestamp:
- 2011-08-28T21:16:54Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0f0f8bc
- Parents:
- 1a5b252 (diff), 36e2b55 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/asm.h
r1a5b252 r8cc4ddb 41 41 #include <trace.h> 42 42 43 #define IO_SPACE_BOUNDARY ((void *) (64 * 1024)) 44 43 45 /** Return base address of current stack. 44 46 * … … 77 79 } 78 80 79 #define IO_SPACE_BOUNDARY ((void *) (64 * 1024))80 81 81 /** Byte from port 82 82 * … … 91 91 if (port < (ioport8_t *) IO_SPACE_BOUNDARY) { 92 92 uint8_t val; 93 93 94 asm volatile ( 94 95 "inb %w[port], %b[val]\n" … … 96 97 : [port] "d" (port) 97 98 ); 99 98 100 return val; 99 } else {101 } else 100 102 return (uint8_t) *port; 101 }102 103 } 103 104 … … 114 115 if (port < (ioport16_t *) IO_SPACE_BOUNDARY) { 115 116 uint16_t val; 117 116 118 asm volatile ( 117 119 "inw %w[port], %w[val]\n" … … 119 121 : [port] "d" (port) 120 122 ); 123 121 124 return val; 122 } else {125 } else 123 126 return (uint16_t) *port; 124 }125 127 } 126 128 … … 137 139 if (port < (ioport32_t *) IO_SPACE_BOUNDARY) { 138 140 uint32_t val; 141 139 142 asm volatile ( 140 143 "inl %w[port], %[val]\n" … … 142 145 : [port] "d" (port) 143 146 ); 147 144 148 return val; 145 } else {149 } else 146 150 return (uint32_t) *port; 147 }148 151 } 149 152 … … 163 166 :: [val] "a" (val), [port] "d" (port) 164 167 ); 165 } else {168 } else 166 169 *port = val; 167 }168 170 } 169 171 … … 183 185 :: [val] "a" (val), [port] "d" (port) 184 186 ); 185 } else {187 } else 186 188 *port = val; 187 }188 189 } 189 190 … … 203 204 :: [val] "a" (val), [port] "d" (port) 204 205 ); 205 } else {206 } else 206 207 *port = val; 207 }208 208 } 209 209
Note:
See TracChangeset
for help on using the changeset viewer.