summary refs log tree commit diff stats
path: root/softmmu/dma-helpers.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-01-20 11:43:28 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-01-20 11:43:28 +0000
commit47fa1ad5349bee5c2b47f8b1dc3be13f180c89ba (patch)
tree7ef4edd2caa8a8bd72d97c1101081e76dc1afde9 /softmmu/dma-helpers.c
parentb10d00d8811fa4eed4862963273d7353ce310c82 (diff)
parente48b140eef9775986cc18038c7bc68f8d2b7fe1d (diff)
downloadfocaccia-qemu-47fa1ad5349bee5c2b47f8b1dc3be13f180c89ba.tar.gz
focaccia-qemu-47fa1ad5349bee5c2b47f8b1dc3be13f180c89ba.zip
Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-7.0-pull-request' into staging
m68k pull request 20220120

Fix virt-m68k reboot

# gpg: Signature made Thu 20 Jan 2022 08:35:50 GMT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier/tags/m68k-for-7.0-pull-request:
  m68k: virt: correctly set the initial PC
  hw/elf_ops: clear uninitialized segment space
  exec/memory: Extract address_space_set() from dma_memory_set()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'softmmu/dma-helpers.c')
-rw-r--r--softmmu/dma-helpers.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/softmmu/dma-helpers.c b/softmmu/dma-helpers.c
index 1c6fba6a11..160095e4ba 100644
--- a/softmmu/dma-helpers.c
+++ b/softmmu/dma-helpers.c
@@ -23,20 +23,7 @@ MemTxResult dma_memory_set(AddressSpace *as, dma_addr_t addr,
 {
     dma_barrier(as, DMA_DIRECTION_FROM_DEVICE);
 
-#define FILLBUF_SIZE 512
-    uint8_t fillbuf[FILLBUF_SIZE];
-    int l;
-    MemTxResult error = MEMTX_OK;
-
-    memset(fillbuf, c, FILLBUF_SIZE);
-    while (len > 0) {
-        l = len < FILLBUF_SIZE ? len : FILLBUF_SIZE;
-        error |= address_space_write(as, addr, attrs, fillbuf, l);
-        len -= l;
-        addr += l;
-    }
-
-    return error;
+    return address_space_set(as, addr, c, len, attrs);
 }
 
 void qemu_sglist_init(QEMUSGList *qsg, DeviceState *dev, int alloc_hint,