qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Thomas Huth <thuth@redhat.com>, John Snow <jsnow@redhat.com>,
	qemu-devel@nongnu.org
Cc: BALATON Zoltan <balaton@eik.bme.hu>, qemu-block@nongnu.org
Subject: Re: [PATCH v2 3/7] hw/ide: Move IDE DMA related definitions to a separate header ide-dma.h
Date: Wed, 21 Feb 2024 19:37:10 +0100	[thread overview]
Message-ID: <8a67e4b9-df36-449a-ac74-e8da3a8b3af1@linaro.org> (raw)
In-Reply-To: <20240220085505.30255-4-thuth@redhat.com>

On 20/2/24 09:55, Thomas Huth wrote:
> These definitions are required outside of the hw/ide/ code, too,
> so lets's move them from internal.h to a new header called ide-dma.h.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   include/hw/ide/ide-dma.h  | 37 +++++++++++++++++++++++++++++++++++++
>   include/hw/ide/internal.h | 29 +----------------------------
>   2 files changed, 38 insertions(+), 28 deletions(-)
>   create mode 100644 include/hw/ide/ide-dma.h
> 
> diff --git a/include/hw/ide/ide-dma.h b/include/hw/ide/ide-dma.h
> new file mode 100644
> index 0000000000..3ac4c3c9fa
> --- /dev/null
> +++ b/include/hw/ide/ide-dma.h
> @@ -0,0 +1,37 @@
> +#ifndef HW_IDE_DMA_H
> +#define HW_IDE_DMA_H
> +
> +#include "block/aio.h"
> +#include "qemu/iov.h"
> +
> +typedef struct IDEState IDEState;
> +typedef struct IDEDMAOps IDEDMAOps;
> +typedef struct IDEDMA IDEDMA;
> +
> +typedef void DMAStartFunc(const IDEDMA *, IDEState *, BlockCompletionFunc *);
> +typedef void DMAVoidFunc(const IDEDMA *);
> +typedef int DMAIntFunc(const IDEDMA *, bool);
> +typedef int32_t DMAInt32Func(const IDEDMA *, int32_t len);
> +typedef void DMAu32Func(const IDEDMA *, uint32_t);
> +typedef void DMAStopFunc(const IDEDMA *, bool);
> +
> +struct IDEDMAOps {
> +    DMAStartFunc *start_dma;
> +    DMAVoidFunc *pio_transfer;
> +    DMAInt32Func *prepare_buf;
> +    DMAu32Func *commit_buf;
> +    DMAIntFunc *rw_buf;
> +    DMAVoidFunc *restart;
> +    DMAVoidFunc *restart_dma;
> +    DMAStopFunc *set_inactive;
> +    DMAVoidFunc *cmd_done;
> +    DMAVoidFunc *reset;
> +};
> +
> +struct IDEDMA {
> +    const struct IDEDMAOps *ops;

While here, let's use the typedef, otherwise:

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> +    QEMUIOVector qiov;
> +    BlockAIOCB *aiocb;
> +};




  reply	other threads:[~2024-02-21 18:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20  8:54 [PATCH v2 0/7] hw/ide: Clean up hw/ide/qdev.c and include/hw/ide/internal.h Thomas Huth
2024-02-20  8:54 ` [PATCH v2 1/7] hw/ide: Add the possibility to disable the CompactFlash device in the build Thomas Huth
2024-02-20  8:55 ` [PATCH v2 2/7] hw/ide: Split qdev.c into ide-bus.c and ide-dev.c Thomas Huth
2024-02-20  8:55 ` [PATCH v2 3/7] hw/ide: Move IDE DMA related definitions to a separate header ide-dma.h Thomas Huth
2024-02-21 18:37   ` Philippe Mathieu-Daudé [this message]
2024-02-20  8:55 ` [PATCH v2 4/7] hw/ide: Move IDE device related definitions to ide-dev.h Thomas Huth
2024-02-21 18:43   ` Philippe Mathieu-Daudé
2024-02-21 19:13     ` Thomas Huth
2024-02-21 20:52       ` Philippe Mathieu-Daudé
2024-02-20  8:55 ` [PATCH v2 5/7] hw/ide: Move IDE bus related definitions to a new header ide-bus.h Thomas Huth
2024-02-21 18:46   ` Philippe Mathieu-Daudé
2024-02-20  8:55 ` [PATCH v2 6/7] hw/ide: Remove the include/hw/ide.h legacy file Thomas Huth
2024-02-20  8:55 ` [PATCH v2 7/7] hw/ide: Stop exposing internal.h to non-IDE files Thomas Huth
2024-02-21 11:54 ` [PATCH v2 0/7] hw/ide: Clean up hw/ide/qdev.c and include/hw/ide/internal.h 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=8a67e4b9-df36-449a-ac74-e8da3a8b3af1@linaro.org \
    --to=philmd@linaro.org \
    --cc=balaton@eik.bme.hu \
    --cc=jsnow@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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).