Re: [PATCH 04/13] ppc/pnv: Introduce PnvMachineClass and PnvMachineClass::compat

2019-12-16 Thread David Gibson
On Mon, Dec 16, 2019 at 07:07:43PM +0100, Greg Kurz wrote: > On Fri, 13 Dec 2019 13:44:48 +0100 > Cédric Le Goater wrote: > > > On 13/12/2019 12:59, Greg Kurz wrote: > > > The pnv_dt_create() function generates different contents for the > > > "compatible" property of the root node in the DT, dep

Re: [PATCH 04/13] ppc/pnv: Introduce PnvMachineClass and PnvMachineClass::compat

2019-12-16 Thread Greg Kurz
On Fri, 13 Dec 2019 13:44:48 +0100 Cédric Le Goater wrote: > On 13/12/2019 12:59, Greg Kurz wrote: > > The pnv_dt_create() function generates different contents for the > > "compatible" property of the root node in the DT, depending on the > > CPU type. This is open coded with multiple ifs using

Re: [PATCH 04/13] ppc/pnv: Introduce PnvMachineClass and PnvMachineClass::compat

2019-12-13 Thread Cédric Le Goater
On 13/12/2019 12:59, Greg Kurz wrote: > The pnv_dt_create() function generates different contents for the > "compatible" property of the root node in the DT, depending on the > CPU type. This is open coded with multiple ifs using pnv_is_powerXX() > helpers. > > It seems cleaner to achieve with QOM

[PATCH 04/13] ppc/pnv: Introduce PnvMachineClass and PnvMachineClass::compat

2019-12-13 Thread Greg Kurz
The pnv_dt_create() function generates different contents for the "compatible" property of the root node in the DT, depending on the CPU type. This is open coded with multiple ifs using pnv_is_powerXX() helpers. It seems cleaner to achieve with QOM. Introduce a base class for the powernv machine a