qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bernhard Beschow <shentey@gmail.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	jsnow@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [PATCH 5/5] cmd646: move device-specific BMDMA registers to separate memory region
Date: Tue, 13 Jun 2023 10:07:30 +0200	[thread overview]
Message-ID: <CAG4p6K66SoZERUDKEWvWigrqygvZ=N6GaGfYkXYtx7Ze0izZAA@mail.gmail.com> (raw)
In-Reply-To: <b2226d76-7c93-3623-69f0-5029ddc42aa3@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1561 bytes --]

On Tue, Jun 13, 2023 at 12:39 AM Philippe Mathieu-Daudé <philmd@linaro.org>
wrote:

> On 12/6/23 21:28, Bernhard Beschow wrote:
> >
> >
> > Am 9. Juni 2023 18:51:19 UTC schrieb Mark Cave-Ayland <
> mark.cave-ayland@ilande.co.uk>:
> >> The aim here is to eliminate any device-specific registers from the
> main BMDMA
> >> bar memory region so it can potentially be moved into the shared PCI
> IDE device.
> >>
> >> For each BMDMA bus create a new cmd646-bmdma-specific memory region
> representing
> >> the device-specific BMDMA registers and then map them using aliases
> onto the
> >> existing BMDMAState memory region.
> >>
> >> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> >> ---
> >> hw/ide/cmd646.c         | 111 +++++++++++++++++++++++++++++++---------
> >> include/hw/ide/cmd646.h |   4 ++
> >> 2 files changed, 90 insertions(+), 25 deletions(-)
>
>
> >> struct CMD646IDEState {
> >>      PCIIDEState parent_obj;
> >> +
> >> +    MemoryRegion bmdma_mem[2];
> >> +    MemoryRegion bmdma_mem_alias[2][2];
> >
> > The added complexity of a two-dimensional alias array seems like a tough
> call for me. I'm not totally against it but I'm reluctant.
>
> Alternative:
>
>          struct {
>              MemoryRegion mem;
>              MemoryRegion mem_alias[2];
>

If `mem_alias` became an anonymous struct as well we could avoid fiddling
with two indices in a matrix, lowering the complexity.

Best regards,
Bernhard

>          } bmdma[2];
>
> >> };
> >>
> >> #endif
> >
>
>

[-- Attachment #2: Type: text/html, Size: 2441 bytes --]

      reply	other threads:[~2023-06-13  8:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 18:51 [PATCH 0/5] cmd646: move device-specific BMDMA registers to separate memory region Mark Cave-Ayland
2023-06-09 18:51 ` [PATCH 1/5] cmd646: checkpatch fixes Mark Cave-Ayland
2023-06-12 12:49   ` Philippe Mathieu-Daudé
2023-06-09 18:51 ` [PATCH 2/5] cmd646: create separate header and QOM type for CMD646_IDE Mark Cave-Ayland
2023-06-12  9:21   ` Bernhard Beschow
2023-06-12 18:56     ` Mark Cave-Ayland
2023-06-09 18:51 ` [PATCH 3/5] cmd646: use TYPE_CMD646_IDE instead of hardcoded "cmd646-ide" string Mark Cave-Ayland
2023-06-09 18:51 ` [PATCH 4/5] cmd646: rename cmd646_bmdma_ops to bmdma_ops Mark Cave-Ayland
2023-06-12 12:49   ` Philippe Mathieu-Daudé
2023-06-09 18:51 ` [PATCH 5/5] cmd646: move device-specific BMDMA registers to separate memory region Mark Cave-Ayland
2023-06-12 19:28   ` Bernhard Beschow
2023-06-12 22:39     ` Philippe Mathieu-Daudé
2023-06-13  8:07       ` Bernhard Beschow [this message]

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='CAG4p6K66SoZERUDKEWvWigrqygvZ=N6GaGfYkXYtx7Ze0izZAA@mail.gmail.com' \
    --to=shentey@gmail.com \
    --cc=jsnow@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --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).