qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/8] hw/ppc: Convert UIC device to QOM


From: David Gibson
Subject: Re: [PATCH 0/8] hw/ppc: Convert UIC device to QOM
Date: Mon, 14 Dec 2020 17:00:26 +1100

On Sat, Dec 12, 2020 at 12:15:29AM +0000, Peter Maydell wrote:
> This patchseries converts the PPC UIC "Universal Interrupt
> Controller" to a QOM device.  My main reason for doing it is that
> this fixes a couple of long-standing trivial Coverity issues -- the
> current ppcuic_init() function allocates an array of qemu_irqs which
> the callers then leak.  (The leak is trivial because it happens once
> when QEMU starts.)
> 
> The patchseries converts the UIC to a QOM device but initially leaves
> the old ppcuic_init() creation function with its old API intact.  It
> then goes through converting the various boards that were using
> ppcuic_init() to instead directly create the UIC using the usual qdev
> APIs, so that it can delete the ppcuic_init() function entirely.
> 
> The patchset includes one patch which deletes 350 lines of dead code
> -- the ppc405cr_init() function seems to have never been used since
> it was added in 2007, so rather than converting this user of
> ppcuic_init() it seemed more sensible to delete it.
> 
> I have tested with 'make check' and 'make check-acceptance' but I
> don't think the latter really exercises the affected boards, which
> are:
> 
>  bamboo
>  ref405ep
>  sam460ex
>  taihu
>  virtex-ml507
> 
> I found instructions on how to boot an AROS image on sam460ex, so I
> have tested that: it works as well after this series as it did before
> (gets to "Libs/workbench.library" and stops); it does seem to
> successfully do things like scanning the USB bus and responding to
> keyboard input at the boot menu, which suggests that IRQs must be
> working.
> 
> Side note: the 'irq_inputs' hacks in the PPC CPU I think would really
> benefit from conversion to being qdev gpio inputs now that CPUs are
> real devices. There are also a lot of non-QOM devices in this
> ppc4xx code if anybody is interested in working on more QOM
> conversions for these boards.
> 
> thanks
> -- PMM

1..4 applied to my tree.  Looks like there are some comments needing
review on 5, so I'll leave the rest for another spin.

> 
> Peter Maydell (8):
>   hw/ppc/ppc4xx_devs: Make code style fixes to UIC code
>   ppc: Convert PPC UIC to a QOM device
>   hw/ppc/virtex_ml507: Drop use of ppcuic_init()
>   hw/ppc/ppc440_bamboo: Drop use of ppcuic_init()
>   hw/ppc/sam460ex: Drop use of ppcuic_init()
>   hw/ppc: Delete unused ppc405cr_init() code
>   hw/ppc/ppc405_uc: Drop use of ppcuic_init()
>   hw/ppc: Remove unused ppcuic_init()
> 
>  hw/ppc/ppc405.h           |   8 +-
>  include/hw/intc/ppc-uic.h |  80 ++++++++
>  include/hw/ppc/ppc4xx.h   |   9 -
>  hw/intc/ppc-uic.c         | 321 +++++++++++++++++++++++++++++
>  hw/ppc/ppc405_boards.c    |   8 +-
>  hw/ppc/ppc405_uc.c        | 415 ++++----------------------------------
>  hw/ppc/ppc440_bamboo.c    |  38 +++-
>  hw/ppc/ppc4xx_devs.c      | 246 +---------------------
>  hw/ppc/sam460ex.c         |  70 +++++--
>  hw/ppc/virtex_ml507.c     |  21 +-
>  MAINTAINERS               |   2 +
>  hw/intc/Kconfig           |   3 +
>  hw/intc/meson.build       |   1 +
>  hw/ppc/Kconfig            |   1 +
>  14 files changed, 555 insertions(+), 668 deletions(-)
>  create mode 100644 include/hw/intc/ppc-uic.h
>  create mode 100644 hw/intc/ppc-uic.c
> 

-- 
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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]