From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
qemu-ppc@nongnu.org, David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 0/8] hw/ppc: Convert UIC device to QOM
Date: Sat, 12 Dec 2020 00:15:29 +0000 [thread overview]
Message-ID: <20201212001537.24520-1-peter.maydell@linaro.org> (raw)
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
next reply other threads:[~2020-12-12 1:11 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-12 0:15 Peter Maydell [this message]
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
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=20201212001537.24520-1-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=david@gibson.dropbear.id.au \
--cc=edgar.iglesias@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).