[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ppc/pnv: Introduce common PNV_SETFIELD() and PNV_GETFIELD()

From: Cédric Le Goater
Subject: Re: [PATCH] ppc/pnv: Introduce common PNV_SETFIELD() and PNV_GETFIELD() macros
Date: Thu, 2 Apr 2020 09:18:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

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 <address@hidden>
>>> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]