From: David Gibson <david@gibson.dropbear.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: qemu-ppc@nongnu.org, Greg Kurz <groug@kaod.org>, qemu-devel@nongnu.org
Subject: Re: [PATCH] ppc/pnv: Introduce common PNV_SETFIELD() and PNV_GETFIELD() macros
Date: Fri, 3 Apr 2020 16:12:40 +1100 [thread overview]
Message-ID: <20200403051240.GV47772@umbus.fritz.box> (raw)
In-Reply-To: <d58b2e61-8245-ecbb-6f0a-31b2ea64835f@kaod.org>
[-- Attachment #1: Type: text/plain, Size: 1870 bytes --]
On Thu, Apr 02, 2020 at 09:18:09AM +0200, Cédric Le Goater wrote:
> On 4/2/20 8:50 AM, David Gibson wrote:
> > On Thu, Apr 02, 2020 at 08:41:24AM +0200, Cédric Le Goater wrote:
> >> On 4/2/20 2:31 AM, David Gibson wrote:
> >>> On Wed, Apr 01, 2020 at 05:26:33PM +0200, Cédric Le Goater wrote:
> >>>> Most of QEMU definitions of the register fields of the PowerNV machine
> >>>> come from skiboot and the models duplicate a set of macros for this
> >>>> purpose. Make them common under the pnv_utils.h file.
> >>>>
> >>>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> >>>
> >>> Hrm. If we're touching these, would it make sense to rewrite them in
> >>> terms of the cross-qemu generic extract64() and deposit64()?
> >>
> >> I won't do that because we will loose compatibility with skiboot.
> >
> > Uh.. how so?
>
> What would be very nice is to use the QEMU FIELD() from "hw/registerfields.h".
>
> But that's a complete different approach from what skiboot does and it would
> mean rewriting all the register definitions we include in QEMU for the powernv
> models and the code using the fields. It is a major change and I would rather
> have the same files on both side (without tabs on the QEMU side). I think
> it is safer.
>
> Using extract64() and deposit64() raises the same kind of problem AFAICT.
> If we find a clean way to keep the register definition files the same, I am
> OK with any changes.
So, I wasn't suggesting changing all the users to use
extract64()/deposit64()/FIELD(). I was suggesting making the skiboot
like versions a wrapper than translates the arguments into the right
form for FIELD() or whatever.
--
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2020-04-03 6:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 15:26 [PATCH] ppc/pnv: Introduce common PNV_SETFIELD() and PNV_GETFIELD() macros Cédric Le Goater
2020-04-01 16:00 ` Greg Kurz
2020-04-02 0:31 ` David Gibson
2020-04-02 6:41 ` Cédric Le Goater
2020-04-02 6:50 ` David Gibson
2020-04-02 7:18 ` Cédric Le Goater
2020-04-03 5:12 ` David Gibson [this message]
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=20200403051240.GV47772@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=clg@kaod.org \
--cc=groug@kaod.org \
--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).