[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/12] cuda: do not use old_mmio accesses
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 03/12] cuda: do not use old_mmio accesses |
Date: |
Mon, 12 Feb 2018 14:40:45 +1100 |
From: Mark Cave-Ayland <address@hidden>
Signed-off-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/misc/macio/cuda.c | 40 ++++++++--------------------------------
1 file changed, 8 insertions(+), 32 deletions(-)
diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c
index 008d8bd4d5..6631017ca2 100644
--- a/hw/misc/macio/cuda.c
+++ b/hw/misc/macio/cuda.c
@@ -275,7 +275,7 @@ static void cuda_delay_set_sr_int(CUDAState *s)
timer_mod(s->sr_delay_timer, expire);
}
-static uint32_t cuda_readb(void *opaque, hwaddr addr)
+static uint64_t cuda_read(void *opaque, hwaddr addr, unsigned size)
{
CUDAState *s = opaque;
uint32_t val;
@@ -350,7 +350,7 @@ static uint32_t cuda_readb(void *opaque, hwaddr addr)
return val;
}
-static void cuda_writeb(void *opaque, hwaddr addr, uint32_t val)
+static void cuda_write(void *opaque, hwaddr addr, uint64_t val, unsigned size)
{
CUDAState *s = opaque;
@@ -780,38 +780,14 @@ static void cuda_receive_packet_from_host(CUDAState *s,
}
}
-static void cuda_writew (void *opaque, hwaddr addr, uint32_t value)
-{
-}
-
-static void cuda_writel (void *opaque, hwaddr addr, uint32_t value)
-{
-}
-
-static uint32_t cuda_readw (void *opaque, hwaddr addr)
-{
- return 0;
-}
-
-static uint32_t cuda_readl (void *opaque, hwaddr addr)
-{
- return 0;
-}
-
static const MemoryRegionOps cuda_ops = {
- .old_mmio = {
- .write = {
- cuda_writeb,
- cuda_writew,
- cuda_writel,
- },
- .read = {
- cuda_readb,
- cuda_readw,
- cuda_readl,
- },
+ .read = cuda_read,
+ .write = cuda_write,
+ .endianness = DEVICE_BIG_ENDIAN,
+ .valid = {
+ .min_access_size = 1,
+ .max_access_size = 1,
},
- .endianness = DEVICE_NATIVE_ENDIAN,
};
static bool cuda_timer_exist(void *opaque, int version_id)
--
2.14.3
- [Qemu-devel] [PULL 00/12] ppc-for-2.12 queue 20180212, David Gibson, 2018/02/11
- [Qemu-devel] [PULL 02/12] hw/ppc: rename functions in comments, David Gibson, 2018/02/11
- [Qemu-devel] [PULL 05/12] spapr: set vsmt to MAX(8, smp_threads), David Gibson, 2018/02/11
- [Qemu-devel] [PULL 04/12] cuda: don't allow writes to port output pins, David Gibson, 2018/02/11
- [Qemu-devel] [PULL 01/12] spapr: add missing break in h_get_cpu_characteristics(), David Gibson, 2018/02/11
- [Qemu-devel] [PULL 09/12] cuda: don't call cuda_update() when writing to ACR register, David Gibson, 2018/02/11
- [Qemu-devel] [PULL 03/12] cuda: do not use old_mmio accesses,
David Gibson <=
- [Qemu-devel] [PULL 07/12] cuda: rename frequency property to tb_frequency, David Gibson, 2018/02/11
- [Qemu-devel] [PULL 11/12] cuda: factor out timebase-derived counter value and load time, David Gibson, 2018/02/11
- [Qemu-devel] [PULL 06/12] cuda: introduce CUDAState parameter to get_counter(), David Gibson, 2018/02/11
- [Qemu-devel] [PULL 08/12] cuda: minor cosmetic tidy-ups to get_next_irq_time(), David Gibson, 2018/02/11
- [Qemu-devel] [PULL 10/12] cuda: set timer 1 frequency property to CUDA_TIMER_FREQ, David Gibson, 2018/02/11
- [Qemu-devel] [PULL 12/12] misc: introduce new mos6522 VIA device and enable it for ppc builds, David Gibson, 2018/02/11
- Re: [Qemu-devel] [PULL 00/12] ppc-for-2.12 queue 20180212, Peter Maydell, 2018/02/12
- Re: [Qemu-devel] [PULL 00/12] ppc-for-2.12 queue 20180212, Laurent Vivier, 2018/02/12