mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
dma: Let dma_buf_write() take MemTxAttrs argument
Let devices specify transaction attributes when calling dma_buf_write(). Keep the default MEMTXATTRS_UNSPECIFIED in the few callers. Reviewed-by: Klaus Jensen <k.jensen@samsung.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20211223115554.3155328-12-philmd@redhat.com>
This commit is contained in:
parent
959384e74e
commit
392e48af34
6 changed files with 11 additions and 9 deletions
|
@ -1381,8 +1381,10 @@ static void ahci_pio_transfer(const IDEDMA *dma)
|
|||
has_sglist ? "" : "o");
|
||||
|
||||
if (has_sglist && size) {
|
||||
const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED;
|
||||
|
||||
if (is_write) {
|
||||
dma_buf_write(s->data_ptr, size, &s->sg);
|
||||
dma_buf_write(s->data_ptr, size, &s->sg, attrs);
|
||||
} else {
|
||||
dma_buf_read(s->data_ptr, size, &s->sg);
|
||||
}
|
||||
|
@ -1479,7 +1481,7 @@ static int ahci_dma_rw_buf(const IDEDMA *dma, bool is_write)
|
|||
if (is_write) {
|
||||
dma_buf_read(p, l, &s->sg);
|
||||
} else {
|
||||
dma_buf_write(p, l, &s->sg);
|
||||
dma_buf_write(p, l, &s->sg, MEMTXATTRS_UNSPECIFIED);
|
||||
}
|
||||
|
||||
/* free sglist, update byte count */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue