Lines Matching full:as

27  * or less have to treat these as 64-bit always to cover all (or at
43 AddressSpace *as; member
46 static inline void dma_barrier(AddressSpace *as, DMADirection dir) in dma_barrier() argument
72 static inline bool dma_memory_valid(AddressSpace *as, in dma_memory_valid() argument
76 return address_space_access_valid(as, addr, len, in dma_memory_valid()
81 static inline MemTxResult dma_memory_rw_relaxed(AddressSpace *as, in dma_memory_rw_relaxed() argument
87 return address_space_rw(as, addr, attrs, in dma_memory_rw_relaxed()
91 static inline MemTxResult dma_memory_read_relaxed(AddressSpace *as, in dma_memory_read_relaxed() argument
95 return dma_memory_rw_relaxed(as, addr, buf, len, in dma_memory_read_relaxed()
100 static inline MemTxResult dma_memory_write_relaxed(AddressSpace *as, in dma_memory_write_relaxed() argument
105 return dma_memory_rw_relaxed(as, addr, (void *)buf, len, in dma_memory_write_relaxed()
117 * @as: #AddressSpace to be accessed
124 static inline MemTxResult dma_memory_rw(AddressSpace *as, dma_addr_t addr, in dma_memory_rw() argument
128 dma_barrier(as, dir); in dma_memory_rw()
130 return dma_memory_rw_relaxed(as, addr, buf, len, dir, attrs); in dma_memory_rw()
140 * @as: #AddressSpace to be accessed
146 static inline MemTxResult dma_memory_read(AddressSpace *as, dma_addr_t addr, in dma_memory_read() argument
150 return dma_memory_rw(as, addr, buf, len, in dma_memory_read()
161 * @as: #AddressSpace to be accessed
167 static inline MemTxResult dma_memory_write(AddressSpace *as, dma_addr_t addr, in dma_memory_write() argument
171 return dma_memory_rw(as, addr, (void *)buf, len, in dma_memory_write()
182 * @as: #AddressSpace to be accessed
188 MemTxResult dma_memory_set(AddressSpace *as, dma_addr_t addr,
199 * @as: #AddressSpace to be accessed
205 static inline void *dma_memory_map(AddressSpace *as, in dma_memory_map() argument
212 p = address_space_map(as, addr, &xlen, dir == DMA_DIRECTION_FROM_DEVICE, in dma_memory_map()
221 * Will also mark the memory as dirty if @dir == %DMA_DIRECTION_FROM_DEVICE.
225 * @as: #AddressSpace used
226 * @buffer: host pointer as returned by dma_memory_map()
227 * @len: buffer length as returned by dma_memory_map()
231 static inline void dma_memory_unmap(AddressSpace *as, in dma_memory_unmap() argument
235 address_space_unmap(as, buffer, (hwaddr)len, in dma_memory_unmap()
240 static inline MemTxResult ld##_lname##_##_end##_dma(AddressSpace *as, \
245 MemTxResult res = dma_memory_read(as, addr, pval, (_bits) / 8, attrs); \
249 static inline MemTxResult st##_sname##_##_end##_dma(AddressSpace *as, \
255 return dma_memory_write(as, addr, &val, (_bits) / 8, attrs); \
258 static inline MemTxResult ldub_dma(AddressSpace *as, dma_addr_t addr, in ldub_dma() argument
261 return dma_memory_read(as, addr, val, 1, attrs); in ldub_dma()
264 static inline MemTxResult stb_dma(AddressSpace *as, dma_addr_t addr, in stb_dma() argument
267 return dma_memory_write(as, addr, &val, 1, attrs); in stb_dma()
285 AddressSpace *as);