diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2020-02-25 13:41:48 +0100 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-02-25 13:41:48 +0100 |
| commit | 9e264985ff0bc86927b44b334bd504687f78659d (patch) | |
| tree | 0e0cf83ea14b7cd84f255eedb15ffbf4c395d1ed /hw/dma/rc4030.c | |
| parent | ca6155c0f2bd39b4b4162533be401c98bd960820 (diff) | |
| parent | adeefe01671fb06a930beba624dc3db8367901a3 (diff) | |
| download | focaccia-qemu-9e264985ff0bc86927b44b334bd504687f78659d.tar.gz focaccia-qemu-9e264985ff0bc86927b44b334bd504687f78659d.zip | |
Merge branch 'exec_rw_const_v4' of https://github.com/philmd/qemu into HEAD
Diffstat (limited to 'hw/dma/rc4030.c')
| -rw-r--r-- | hw/dma/rc4030.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c index c4cf8236f4..21e2c360ac 100644 --- a/hw/dma/rc4030.c +++ b/hw/dma/rc4030.c @@ -513,8 +513,8 @@ static IOMMUTLBEntry rc4030_dma_translate(IOMMUMemoryRegion *iommu, hwaddr addr, if (i < s->dma_tl_limit / sizeof(entry)) { entry_address = (s->dma_tl_base & 0x7fffffff) + i * sizeof(entry); if (address_space_read(ret.target_as, entry_address, - MEMTXATTRS_UNSPECIFIED, (unsigned char *)&entry, - sizeof(entry)) == MEMTX_OK) { + MEMTXATTRS_UNSPECIFIED, &entry, sizeof(entry)) + == MEMTX_OK) { ret.translated_addr = entry.frame & ~(DMA_PAGESIZE - 1); ret.perm = IOMMU_RW; } @@ -590,7 +590,7 @@ static const VMStateDescription vmstate_rc4030 = { }; static void rc4030_do_dma(void *opaque, int n, uint8_t *buf, - int len, int is_write) + int len, bool is_write) { rc4030State *s = opaque; hwaddr dma_addr; @@ -630,13 +630,13 @@ struct rc4030DMAState { void rc4030_dma_read(void *dma, uint8_t *buf, int len) { rc4030_dma s = dma; - rc4030_do_dma(s->opaque, s->n, buf, len, 0); + rc4030_do_dma(s->opaque, s->n, buf, len, false); } void rc4030_dma_write(void *dma, uint8_t *buf, int len) { rc4030_dma s = dma; - rc4030_do_dma(s->opaque, s->n, buf, len, 1); + rc4030_do_dma(s->opaque, s->n, buf, len, true); } static rc4030_dma *rc4030_allocate_dmas(void *opaque, int n) |