qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org, Greg Kurz <groug@kaod.org>, qemu-devel@nongnu.org
Subject: Re: [PATCH 2/5] ppc/pnv: Introduce a POWER10 PnvChip and a powernv10 machine
Date: Tue, 10 Dec 2019 09:52:05 +0100	[thread overview]
Message-ID: <ba99c545-fa33-fd34-0308-ed83f7ad62f4@kaod.org> (raw)
In-Reply-To: <20191210033454.GE207300@umbus.fritz.box>

On 10/12/2019 04:34, David Gibson wrote:
>> +static inline bool pnv_chip_is_power10(const PnvChip *chip)
>> +{
>> +    return PNV_CHIP_GET_CLASS(chip)->chip_type == PNV_CHIP_POWER10;
>> +}
>> +
>> +static inline bool pnv_is_power10(PnvMachineState *pnv)
>> +{
>> +    return pnv_chip_is_power10(pnv->chips[0]);
>> +}
>

I agree this is starting to be ugly.

> It's not in scope for this series, but now that we have P8/9/10
> specific chip object types and powernv8/powernv9, we should be able to
> remove the ugly chip_type field, and just do object class checks on
> the chip and or machine objects themselves.
 

So we would use object_class_dynamic_cast() instead of field chip_type ?

C.


  reply	other threads:[~2019-12-10  8:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 18:44 [PATCH 0/5] ppc/pnv: add " Cédric Le Goater
2019-12-05 18:44 ` [PATCH 1/5] target/ppc: Add POWER10 DD1.0 model information Cédric Le Goater
2019-12-05 18:44 ` [PATCH 2/5] ppc/pnv: Introduce a POWER10 PnvChip and a powernv10 machine Cédric Le Goater
2019-12-10  3:34   ` David Gibson
2019-12-10  8:52     ` Cédric Le Goater [this message]
2019-12-10 23:42       ` David Gibson
2019-12-05 18:44 ` [PATCH 3/5] ppc/psi: cleanup definitions Cédric Le Goater
2019-12-05 18:44 ` [PATCH 4/5] ppc/pnv: add a PSI bridge model for POWER10 Cédric Le Goater
2019-12-05 18:44 ` [PATCH 5/5] ppc/pnv: add a LPC Controller " Cédric Le Goater
2019-12-10  3:33 ` [PATCH 0/5] ppc/pnv: add a POWER10 PnvChip and a powernv10 machine David Gibson

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=ba99c545-fa33-fd34-0308-ed83f7ad62f4@kaod.org \
    --to=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --subject='Re: [PATCH 2/5] ppc/pnv: Introduce a POWER10 PnvChip and a powernv10 machine' \
    /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

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