[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCHv2 01/12] cuda: do not use old_mmio accesses
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCHv2 01/12] cuda: do not use old_mmio accesses |
Date: |
Sat, 10 Feb 2018 18:22:08 +1100 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
On Fri, Feb 09, 2018 at 06:51:31PM +0000, Mark Cave-Ayland wrote:
> Signed-off-by: Mark Cave-Ayland <address@hidden>
Applied, thanks.
> ---
> 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)
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-ppc] [PATCHv2 08/12] cuda: factor out timebase-derived counter value and load time, (continued)
[Qemu-ppc] [PATCHv2 01/12] cuda: do not use old_mmio accesses, Mark Cave-Ayland, 2018/02/09
[Qemu-ppc] [PATCHv2 04/12] cuda: introduce CUDAState parameter to get_counter(), Mark Cave-Ayland, 2018/02/09
[Qemu-ppc] [PATCHv2 09/12] misc: introduce new mos6522 VIA device and enable it for ppc builds, Mark Cave-Ayland, 2018/02/09
[Qemu-ppc] [PATCHv2 11/12] ppc: move CUDAState and other CUDA-related definitions into separate cuda.h file, Mark Cave-Ayland, 2018/02/09
[Qemu-ppc] [PATCHv2 12/12] cuda: convert to trace-events, Mark Cave-Ayland, 2018/02/09