All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] hw/ppc: Convert UIC device to QOM
@ 2020-12-12  0:15 Peter Maydell
  2020-12-12  0:15 ` [PATCH 1/8] hw/ppc/ppc4xx_devs: Make code style fixes to UIC code Peter Maydell
                   ` (9 more replies)
  0 siblings, 10 replies; 39+ messages in thread
From: Peter Maydell @ 2020-12-12  0:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Edgar E. Iglesias, qemu-ppc, David Gibson

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

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

-- 
2.20.1



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

end of thread, other threads:[~2021-02-03 16:37 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-12  0:15 [PATCH 0/8] hw/ppc: Convert UIC device to QOM Peter Maydell
2020-12-12  0:15 ` [PATCH 1/8] hw/ppc/ppc4xx_devs: Make code style fixes to UIC code Peter Maydell
2020-12-13 12:09   ` Philippe Mathieu-Daudé
2020-12-13 14:33   ` Edgar E. Iglesias
2020-12-14  5:43   ` David Gibson
2020-12-14  9:15   ` Thomas Huth
2020-12-12  0:15 ` [PATCH 2/8] ppc: Convert PPC UIC to a QOM device Peter Maydell
2020-12-12 16:57   ` BALATON Zoltan via
2020-12-12 18:27   ` BALATON Zoltan via
2020-12-12 18:33     ` Peter Maydell
2020-12-12 19:53       ` BALATON Zoltan via
2020-12-13 14:34   ` Edgar E. Iglesias
2020-12-14  5:54   ` David Gibson
2020-12-14  9:12   ` BALATON Zoltan via
2020-12-12  0:15 ` [PATCH 3/8] hw/ppc/virtex_ml507: Drop use of ppcuic_init() Peter Maydell
2020-12-13 14:32   ` Edgar E. Iglesias
2020-12-14  5:55   ` David Gibson
2021-01-11 19:04   ` BALATON Zoltan
2020-12-12  0:15 ` [PATCH 4/8] hw/ppc/ppc440_bamboo: " Peter Maydell
2020-12-14  5:56   ` David Gibson
2021-01-11  1:00   ` Nathan Chancellor
2021-01-11 17:14     ` Peter Maydell
2021-01-11 18:22       ` Mark Cave-Ayland
2021-02-03 16:35     ` Philippe Mathieu-Daudé
2020-12-12  0:15 ` [PATCH 5/8] hw/ppc/sam460ex: " Peter Maydell
2020-12-12 17:17   ` BALATON Zoltan via
2020-12-12 18:11     ` Peter Maydell
2020-12-12 20:35       ` BALATON Zoltan via
2020-12-12 19:53   ` BALATON Zoltan via
2020-12-12 19:55     ` Peter Maydell
2020-12-12  0:15 ` [PATCH 6/8] hw/ppc: Delete unused ppc405cr_init() code Peter Maydell
2020-12-12  0:15 ` [PATCH 7/8] hw/ppc/ppc405_uc: Drop use of ppcuic_init() Peter Maydell
2021-01-11 19:09   ` BALATON Zoltan
2020-12-12  0:15 ` [PATCH 8/8] hw/ppc: Remove unused ppcuic_init() Peter Maydell
2020-12-13 14:35   ` Edgar E. Iglesias
2020-12-12 17:43 ` [PATCH 0/8] hw/ppc: Convert UIC device to QOM BALATON Zoltan via
2020-12-12 18:13   ` Peter Maydell
2020-12-14  6:00 ` David Gibson
2020-12-14 10:04   ` Peter Maydell

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.