qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	qemu-devel@nongnu.org, hpoussin@reactos.org, famz@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/2] hw/mips/jazz: create ESP device directly via qdev
Date: Wed, 13 Jun 2018 13:19:45 +0200	[thread overview]
Message-ID: <4a2d3eca-95d0-c1ca-4769-7a06115cc2e5@redhat.com> (raw)
In-Reply-To: <2b146796-ade4-ec2c-34a9-6d6532d94175@ilande.co.uk>

On 13/06/2018 12:36, Mark Cave-Ayland wrote:
> Check out hw/dma/sparc32_dma.c for some ugly examples:
> espdma_memory_read()/espdma_memory_write() update the DMA address
> pointer register after each read/write, and
> ledma_memory_read()/ledma_memory_write() need to determine if the pcnet
> card has byte-swapping enabled: if so, then don't perform the required
> lance 16-bit swap and if not, do perform the 16-bit swap.

Heh, those are disgusting indeed. :)  So I guess it would have to stay,
only MIPS can use the pure MemoryRegion-based approach.

Regarding pcnet, is CSR_BSWP really a no-op on PCI cards?  If not, an
option could be to move that handling to pcnet.c - making the ledma swap
unconditional and removing the do_bswap argument.  The disadvantage is
that SPARC would swap twice, and you'd have to keep the callback because
of s->dmaregs[3], but maybe it's still worthwhile.

Thanks,

Paolo

  reply	other threads:[~2018-06-13 11:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-13  9:47 [Qemu-devel] [PATCH 0/2] scsi: remove legacy esp_init() function Mark Cave-Ayland
2018-06-13  9:47 ` [Qemu-devel] [PATCH 1/2] hw/mips/jazz: create ESP device directly via qdev Mark Cave-Ayland
2018-06-13 10:06   ` Paolo Bonzini
2018-06-13 10:36     ` Mark Cave-Ayland
2018-06-13 11:19       ` Paolo Bonzini [this message]
2018-06-13 13:06         ` Mark Cave-Ayland
2018-06-13 14:12           ` Paolo Bonzini
2018-06-13  9:47 ` [Qemu-devel] [PATCH 2/2] esp: remove legacy esp_init() function Mark Cave-Ayland
2018-06-27 20:01 ` [Qemu-devel] [PATCH 0/2] scsi: " Mark Cave-Ayland
2018-06-28  5:58   ` Hervé Poussineau
2018-06-28  7:04     ` Paolo Bonzini

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=4a2d3eca-95d0-c1ca-4769-7a06115cc2e5@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=famz@redhat.com \
    --cc=hpoussin@reactos.org \
    --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).