All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] hw/ide: Clean up hw/ide/qdev.c and include/hw/ide/internal.h
@ 2024-02-19 10:49 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
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Thomas Huth @ 2024-02-19 10:49 UTC (permalink / raw)
  To: John Snow, qemu-devel
  Cc: BALATON Zoltan, Philippe Mathieu-Daudé, qemu-block

While trying to make it possible to compile-out the CompactFlash IDE device
in downstream distributions (first patch), we noticed that there are more
things in the IDE code that could use a proper clean up:

First, hw/ide/qdev.c is quite a mix between IDE BUS specific functions
and (disk) device specific functions. Thus the second patch splits qdev.c
into two new separate files to make it more obvious which part belongs
to which kind of devices.

The remaining patches unentangle include/hw/ide/internal.h, which is meant
as a header that should only be used internally to the IDE subsystem, but
which is currently exposed to the world since include/hw/ide/pci.h includes
this header, too. Thus we move the definitions that are also required for
non-IDE code to other new header files, so we can finally change pci.h to
stop including internal.h. After these changes, internal.h is only included
by files in hw/ide/ as it should be.

Thomas Huth (7):
  hw/ide: Add the possibility to disable the CompactFlash device in the
    build
  hw/ide: Split qdev.c into ide-bus.c and ide-dev.c
  hw/ide: Move IDE device related definitions to ide-dev.h
  hw/ide: Move IDE bus related definitions to a new header ide-bus.h
  hw/ide: Move IDE DMA related definitions to a separate header
    ide-dma.h
  hw/ide: Remove the include/hw/ide.h legacy file
  hw/ide: Stop exposing internal.h to non-IDE files

 include/hw/ide.h             |   9 --
 include/hw/ide/ide-bus.h     |  41 +++++++
 include/hw/ide/ide-dev.h     | 186 +++++++++++++++++++++++++++++++
 include/hw/ide/ide-dma.h     |  30 +++++
 include/hw/ide/internal.h    | 209 +----------------------------------
 include/hw/ide/pci.h         |   3 +-
 hw/i386/pc.c                 |   2 +-
 hw/ide/cf.c                  |  58 ++++++++++
 hw/ide/cmd646.c              |   1 +
 hw/ide/ide-bus.c             | 111 +++++++++++++++++++
 hw/ide/{qdev.c => ide-dev.c} | 137 +----------------------
 hw/ide/pci.c                 |   1 +
 hw/ide/piix.c                |   1 +
 hw/ide/sii3112.c             |   1 +
 hw/ide/via.c                 |   1 +
 hw/arm/Kconfig               |   2 +
 hw/ide/Kconfig               |  32 ++++--
 hw/ide/meson.build           |   4 +-
 18 files changed, 465 insertions(+), 364 deletions(-)
 delete mode 100644 include/hw/ide.h
 create mode 100644 include/hw/ide/ide-bus.h
 create mode 100644 include/hw/ide/ide-dev.h
 create mode 100644 include/hw/ide/ide-dma.h
 create mode 100644 hw/ide/cf.c
 create mode 100644 hw/ide/ide-bus.c
 rename hw/ide/{qdev.c => ide-dev.c} (67%)

-- 
2.43.2



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-02-20  7:18 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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é

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.