[Qemu-devel] [PATCH 0/7] mac_dbdma: tidy-up and QOMify

Mark Cave-Ayland posted 7 patches 6 years, 7 months ago
Failed in applying to current master (apply log)
hw/ide/macio.c             |   26 ++++++++++-----
hw/misc/macio/mac_dbdma.c  |   79 +++++++++++++++++++++++++++++---------------
hw/misc/macio/macio.c      |   20 ++++++++---
hw/ppc/mac.h               |    4 +--
include/hw/ppc/mac_dbdma.h |   22 ++++++------
5 files changed, 97 insertions(+), 54 deletions(-)
[Qemu-devel] [PATCH 0/7] mac_dbdma: tidy-up and QOMify
Posted by Mark Cave-Ayland 6 years, 7 months ago
Whilst looking at implementing another DBDMA device for the Mac machines
I noticed a couple of things: firstly there were some unused fields still
in DBDMAState, and secondly the existing code still used global functions
to register DMA channels and handle the relationship between macio IDE and
DBDMA.

This patchset removes the now-unused fields from DBDMA state, QOMifys the
DBDMA device, uses a QOM object link to allow the macio IDE object to
reference the DBDMA device, and then finally removes the global DBDMA_*
functions substituting them instead for QOM methods.

Note: this patchset does not apply to master but on top of David's
ppc-for-2.11 branch since there are merge conflicts with my previous
patchset. Hopefully the Based-On line below is enough to keep patchew
happy, even though it wasn't the final version applied to the ppc-for-2.11
branch.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Based-on: 1505668548-16616-1-git-send-email-mark.cave-ayland@ilande.co.uk (ppc: more Mac-related fixups)


Mark Cave-Ayland (7):
  mac_dbdma: remove unused IO fields from DBDMAState
  mac_dbdma: QOMify
  mac_dbdma: remove DBDMA_init() function
  macio: pass channel into MACIOIDEState via qdev property
  macio: use object link between MACIO_IDE and MAC_DBDMA object
  mac_dbdma: change DBDMA_register_channel to a MAC_DBDMA type method
  mac_dbdma: change DBDMA_kick to a MAC_DBDMA type method

 hw/ide/macio.c             |   26 ++++++++++-----
 hw/misc/macio/mac_dbdma.c  |   79 +++++++++++++++++++++++++++++---------------
 hw/misc/macio/macio.c      |   20 ++++++++---
 hw/ppc/mac.h               |    4 +--
 include/hw/ppc/mac_dbdma.h |   22 ++++++------
 5 files changed, 97 insertions(+), 54 deletions(-)

-- 
1.7.10.4


Re: [Qemu-devel] [PATCH 0/7] mac_dbdma: tidy-up and QOMify
Posted by David Gibson 6 years, 7 months ago
On Sun, Sep 24, 2017 at 03:47:39PM +0100, Mark Cave-Ayland wrote:
> Whilst looking at implementing another DBDMA device for the Mac machines
> I noticed a couple of things: firstly there were some unused fields still
> in DBDMAState, and secondly the existing code still used global functions
> to register DMA channels and handle the relationship between macio IDE and
> DBDMA.
> 
> This patchset removes the now-unused fields from DBDMA state, QOMifys the
> DBDMA device, uses a QOM object link to allow the macio IDE object to
> reference the DBDMA device, and then finally removes the global DBDMA_*
> functions substituting them instead for QOM methods.
> 
> Note: this patchset does not apply to master but on top of David's
> ppc-for-2.11 branch since there are merge conflicts with my previous
> patchset. Hopefully the Based-On line below is enough to keep patchew
> happy, even though it wasn't the final version applied to the ppc-for-2.11
> branch.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Based-on: 1505668548-16616-1-git-send-email-mark.cave-ayland@ilande.co.uk (ppc: more Mac-related fixups)

I've applied 1-5/7.  There are a couple of details I'm not 100%
convinced on, but it's still better than what was there before.  6 & 7
I'm still thinking about.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson