From: Peter Maydell <peter.maydell@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: qemu-arm <qemu-arm@nongnu.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [PATCH 2/2] hw/arm/palm.c: Encapsulate misc GPIO handling in a device
Date: Mon, 13 Jul 2020 11:31:06 +0100 [thread overview]
Message-ID: <CAFEAcA_wrzBj_YNSehG8fDy-0et9gaE98eMuw6agsmkDJ0MoEA@mail.gmail.com> (raw)
In-Reply-To: <c9fe0637-9870-b155-3b50-0da3f03d279f@amsat.org>
On Mon, 13 Jul 2020 at 11:21, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> On 7/13/20 12:05 PM, Peter Maydell wrote:
> > On Mon, 13 Jul 2020 at 09:57, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> >> Why not make it a generic container in the MachineState and create
> >> the container in hw/core/machine.c::machine_initfn()?
> >
> > I don't think we create containers like that for any other
> > machine, do we?
>
> No but maybe we could. Most boards have some GPIO/LED/reset switch
> button. Do all machines have a NUMA memory device? Do all machines
> have a dtb? Do all machines use NVDIMM devices? I think we have
> more machines using GPIOs than machine using NVDIMM. Anyway I don't
> mind, I was just trying to figure where this container belong on QOM.
I think that if machines were qdev objects with the usual
reset/gpio/etc capabilities, I might have just implemented
this as part of the machine object; but they aren't, and
it didn't really seem like the right approach to create an
ad-hoc "container that sort of corresponds to the whole
machine". Also, since these machines are largely orphan
I tend to favour smaller-scale interventions that push them
in a better direction rather than more sweeping changes.
thanks
-- PMM
next prev parent reply other threads:[~2020-07-13 10:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-28 21:42 [PATCH 0/2] hw/arm/palm.c: Fix Coverity issue CID 1421944 Peter Maydell
2020-06-28 21:42 ` [PATCH 1/2] hw/arm/palm.c: Detabify Peter Maydell
2020-07-12 0:18 ` Li Qiang
2020-07-13 10:49 ` Philippe Mathieu-Daudé
2020-06-28 21:42 ` [PATCH 2/2] hw/arm/palm.c: Encapsulate misc GPIO handling in a device Peter Maydell
2020-07-12 0:22 ` Li Qiang
2020-07-13 8:57 ` Philippe Mathieu-Daudé
2020-07-13 10:05 ` Peter Maydell
2020-07-13 10:21 ` Philippe Mathieu-Daudé
2020-07-13 10:31 ` Peter Maydell [this message]
2020-07-13 10:52 ` Philippe Mathieu-Daudé
2020-07-11 18:33 ` [PATCH 0/2] hw/arm/palm.c: Fix Coverity issue CID 1421944 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=CAFEAcA_wrzBj_YNSehG8fDy-0et9gaE98eMuw6agsmkDJ0MoEA@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=ehabkost@redhat.com \
--cc=f4bug@amsat.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@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).