From: Laurent Vivier <lvivier@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 01/10] cuda: do not use old_mmio accesses
Date: Mon, 5 Feb 2018 15:17:00 +0100 [thread overview]
Message-ID: <1f833824-3bb4-3ac7-71c4-4d2db47b82f5@redhat.com> (raw)
In-Reply-To: <20180203103727.26457-2-mark.cave-ayland@ilande.co.uk>
On 03/02/2018 11:37, Mark Cave-Ayland wrote:
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
> 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..23b7e0f5b0 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_NATIVE_ENDIAN,
As CUDA Macintoshes are all big-endian, I think you should use
DEVICE_BIG_ENDIAN here, except if you are aware of a little-endian
machine using it in little-endian mode.
Thanks,
Laurent
next prev parent reply other threads:[~2018-02-05 14:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-03 10:37 [Qemu-devel] [PATCH 00/10] cuda: various fixes, and move 6522 to separate device Mark Cave-Ayland
2018-02-03 10:37 ` [Qemu-devel] [PATCH 01/10] cuda: do not use old_mmio accesses Mark Cave-Ayland
2018-02-05 14:17 ` Laurent Vivier [this message]
2018-02-06 21:40 ` Mark Cave-Ayland
2018-02-03 10:37 ` [Qemu-devel] [PATCH 02/10] cuda: don't allow writes to port output pins Mark Cave-Ayland
2018-02-05 14:27 ` Laurent Vivier
2018-02-05 19:53 ` Philippe Mathieu-Daudé
2018-02-03 10:37 ` [Qemu-devel] [PATCH 03/10] cuda: don't call cuda_update() when writing to ACR register Mark Cave-Ayland
2018-02-03 10:37 ` [Qemu-devel] [PATCH 04/10] cuda: introduce CUDAState parameter to get_counter() Mark Cave-Ayland
2018-02-05 19:44 ` Philippe Mathieu-Daudé
2018-02-03 10:37 ` [Qemu-devel] [PATCH 05/10] cuda: rename frequency property to tb_frequency Mark Cave-Ayland
2018-02-05 19:45 ` Philippe Mathieu-Daudé
2018-02-03 10:37 ` [Qemu-devel] [PATCH 06/10] cuda: minor cosmetic tidy-ups to get_next_irq_time() Mark Cave-Ayland
2018-02-05 19:39 ` Philippe Mathieu-Daudé
2018-02-03 10:37 ` [Qemu-devel] [PATCH 07/10] cuda: set timer 1 frequency property to CUDA_TIMER_FREQ Mark Cave-Ayland
2018-02-03 10:37 ` [Qemu-devel] [PATCH 08/10] cuda: factor out timebase-derived counter value and load time Mark Cave-Ayland
2018-02-05 19:44 ` Philippe Mathieu-Daudé
2018-02-06 21:44 ` Mark Cave-Ayland
2018-02-03 10:37 ` [Qemu-devel] [PATCH 09/10] misc: introduce new mos6522 VIA device and enable it for ppc builds Mark Cave-Ayland
2018-02-03 10:37 ` [Qemu-devel] [PATCH 10/10] cuda: convert to use the shared mos6522 device Mark Cave-Ayland
2018-02-03 11:11 ` [Qemu-devel] [PATCH 00/10] cuda: various fixes, and move 6522 to separate device no-reply
2018-02-03 11:14 ` Mark Cave-Ayland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1f833824-3bb4-3ac7-71c4-4d2db47b82f5@redhat.com \
--to=lvivier@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).