On Fri, 5 Aug 2022, Peter Maydell wrote:
On Fri, 5 Aug 2022 at 17:50, BALATON Zoltan <bala...@eik.bme.hu> wrote:
This also
allows to get the cpu without a link with something like:
PPC4XX_MACHINE(current_machine /* or qdev_get_machine() */)->soc.cpu
...and now you have device code that's making assumptions about
the machine and SoC it's in.
Since these devices are strictly part of this SoC making this asumption
should be OK. Making assumption about the machine may be a valid argument
although this series already makes that asumption for 405 machines by
introducing the machine state class. We need a way to share these device
models between 4xx mahines so I think some assumptions will proabbly be
needed.
Just do this the same standard way we do it elsewhere, please.
OK looks like I could not convince you so I let you and Cédric decide what
you do and leave this alone. Thanks for sharing insights it was a useful
discussion.
Regards,
BALATON Zoltan