qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: "John Snow" <jsnow@redhat.com>,
	qemu-devel@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	qemu-block@nongnu.org
Subject: Re: [PATCH 5/7] hw/ide: Move IDE DMA related definitions to a separate header ide-dma.h
Date: Mon, 19 Feb 2024 20:49:38 +0100	[thread overview]
Message-ID: <550bb146-57fb-43fe-8618-05af8a0c01b2@redhat.com> (raw)
In-Reply-To: <7294464f-c11d-ea4f-df55-117ae46b9d0c@eik.bme.hu>

On 19/02/2024 12.53, BALATON Zoltan wrote:
> On Mon, 19 Feb 2024, 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  | 30 ++++++++++++++++++++++++++++++
>> include/hw/ide/internal.h | 27 +--------------------------
>> 2 files changed, 31 insertions(+), 26 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..fb82966bdd
>> --- /dev/null
>> +++ b/include/hw/ide/ide-dma.h
>> @@ -0,0 +1,30 @@
>> +#ifndef HW_IDE_DMA_H
>> +#define HW_IDE_DMA_H
>> +
>> +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;
>> +    QEMUIOVector qiov;
>> +    BlockAIOCB *aiocb;
> 
> Doesn't this need to #include something to define QEMUIOVector and 
> BlockAIOCB and some of the DMA and IDE types not defined above?

Yes, it currently works by accident since the header is only included in 
spots where those things are already defined, but I'll better add some 
#include statements here so that this header can also be used stand-alone in 
other spots.

  Thomas



  reply	other threads:[~2024-02-19 19:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 10:49 [PATCH 0/7] hw/ide: Clean up hw/ide/qdev.c and include/hw/ide/internal.h Thomas Huth
2024-02-19 10:49 ` [PATCH 1/7] hw/ide: Add the possibility to disable the CompactFlash device in the build Thomas Huth
2024-02-19 10:49 ` [PATCH 2/7] hw/ide: Split qdev.c into ide-bus.c and ide-dev.c Thomas Huth
2024-02-19 11:45   ` BALATON Zoltan
2024-02-19 18:31     ` Thomas Huth
2024-02-19 10:49 ` [PATCH 3/7] hw/ide: Move IDE device related definitions to ide-dev.h Thomas Huth
2024-02-19 11:32   ` Philippe Mathieu-Daudé
2024-02-19 19:17     ` Thomas Huth
2024-02-20  7:18       ` Philippe Mathieu-Daudé
2024-02-19 10:49 ` [PATCH 4/7] hw/ide: Move IDE bus related definitions to a new header ide-bus.h Thomas Huth
2024-02-19 10:49 ` [PATCH 5/7] hw/ide: Move IDE DMA related definitions to a separate header ide-dma.h Thomas Huth
2024-02-19 11:53   ` BALATON Zoltan
2024-02-19 19:49     ` Thomas Huth [this message]
2024-02-19 10:49 ` [PATCH 6/7] hw/ide: Remove the include/hw/ide.h legacy file Thomas Huth
2024-02-19 10:49 ` [PATCH 7/7] hw/ide: Stop exposing internal.h to non-IDE files Thomas Huth
2024-02-19 11:32 ` [PATCH 0/7] hw/ide: Clean up hw/ide/qdev.c and include/hw/ide/internal.h Philippe Mathieu-Daudé

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=550bb146-57fb-43fe-8618-05af8a0c01b2@redhat.com \
    --to=thuth@redhat.com \
    --cc=balaton@eik.bme.hu \
    --cc=jsnow@redhat.com \
    --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).