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 <c...@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
signature.asc
Description: PGP signature