Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-08 Thread Cédric Le Goater
On 8/6/22 11:38, BALATON Zoltan wrote: On Fri, 5 Aug 2022, BALATON Zoltan wrote: On Fri, 5 Aug 2022, Peter Maydell wrote: On Fri, 5 Aug 2022 at 17:50, BALATON Zoltan wrote: This also allows to get the cpu without a link with something like: PPC4XX_MACHINE(current_machine /* or

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-06 Thread BALATON Zoltan
On Fri, 5 Aug 2022, BALATON Zoltan wrote: On Fri, 5 Aug 2022, Peter Maydell wrote: On Fri, 5 Aug 2022 at 17:50, BALATON Zoltan 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

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-05 Thread BALATON Zoltan
On Fri, 5 Aug 2022, BALATON Zoltan wrote: On Fri, 5 Aug 2022, Peter Maydell wrote: On Fri, 5 Aug 2022 at 17:50, BALATON Zoltan 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

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-05 Thread BALATON Zoltan
On Fri, 5 Aug 2022, Peter Maydell wrote: On Fri, 5 Aug 2022 at 17:50, BALATON Zoltan 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

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-05 Thread Peter Maydell
On Fri, 5 Aug 2022 at 17:50, BALATON Zoltan 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. Just

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-05 Thread BALATON Zoltan
On Fri, 5 Aug 2022, Peter Maydell wrote: On Fri, 5 Aug 2022 at 13:55, BALATON Zoltan wrote: I know this is a mess curently but QOM is full of boilerplate code which is confusing for new people and makes it hard to undestand the code. So cutting down the boilerplate and making things simpler

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-05 Thread Peter Maydell
On Fri, 5 Aug 2022 at 13:55, BALATON Zoltan wrote: > I know this is a mess curently but QOM is full of boilerplate code which > is confusing for new people and makes it hard to undestand the code. So > cutting down the boilerplate and making things simpler would help people > who want to get

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-05 Thread BALATON Zoltan
On Fri, 5 Aug 2022, Cédric Le Goater wrote: On 8/4/22 21:26, BALATON Zoltan wrote: On Thu, 4 Aug 2022, Peter Maydell wrote: On Thu, 4 Aug 2022 at 19:03, BALATON Zoltan wrote: I was trying to find out how to do it but I don't understand QOM enough to answer the simple question of how to get

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-05 Thread Cédric Le Goater
On 8/4/22 21:26, BALATON Zoltan wrote: On Thu, 4 Aug 2022, Peter Maydell wrote: On Thu, 4 Aug 2022 at 19:03, BALATON Zoltan wrote: I was trying to find out how to do it but I don't understand QOM enough to answer the simple question of how to get the cpu object from QOM. My guesses are:

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-04 Thread BALATON Zoltan
On Thu, 4 Aug 2022, Peter Maydell wrote: On Thu, 4 Aug 2022 at 19:03, BALATON Zoltan wrote: I was trying to find out how to do it but I don't understand QOM enough to answer the simple question of how to get the cpu object from QOM. My guesses are: object_resolve_path_type("/machine",

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-04 Thread Peter Maydell
On Thu, 4 Aug 2022 at 19:03, BALATON Zoltan wrote: > I was trying to find out how to do it but I don't understand QOM enough to > answer the simple question of how to get the cpu object from QOM. My > guesses are: > > object_resolve_path_type("/machine", TYPE_POWERPC_CPU, NULL) > > or maybe > >

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-04 Thread BALATON Zoltan
On Thu, 4 Aug 2022, Cédric Le Goater wrote: [ Replying to all ] On 8/4/22 16:26, BALATON Zoltan wrote: On Thu, 4 Aug 2022, Cédric Le Goater wrote: On 8/4/22 14:09, BALATON Zoltan wrote: On Thu, 4 Aug 2022, Cédric Le Goater wrote: On 8/4/22 01:36, Daniel Henrique Barboza wrote: Cedric, On

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-04 Thread Cédric Le Goater
[ Replying to all ] On 8/4/22 16:26, BALATON Zoltan wrote: On Thu, 4 Aug 2022, Cédric Le Goater wrote: On 8/4/22 14:09, BALATON Zoltan wrote: On Thu, 4 Aug 2022, Cédric Le Goater wrote: On 8/4/22 01:36, Daniel Henrique Barboza wrote: Cedric, On 8/3/22 10:28, Cédric Le Goater wrote:

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-04 Thread Cédric Le Goater
[ Resending to all ] On 8/4/22 14:09, BALATON Zoltan wrote: On Thu, 4 Aug 2022, Cédric Le Goater wrote: On 8/4/22 01:36, Daniel Henrique Barboza wrote: Cedric, On 8/3/22 10:28, Cédric Le Goater wrote: Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater ---  

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-04 Thread BALATON Zoltan
On Thu, 4 Aug 2022, Cédric Le Goater wrote: On 8/4/22 01:36, Daniel Henrique Barboza wrote: Cedric, On 8/3/22 10:28, Cédric Le Goater wrote: Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater ---   hw/ppc/ppc405.h    | 16 +++   hw/ppc/ppc405_uc.c | 71

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-04 Thread BALATON Zoltan
On Thu, 4 Aug 2022, Mark Cave-Ayland wrote: On 04/08/2022 00:04, BALATON Zoltan wrote: On Wed, 3 Aug 2022, Cédric Le Goater wrote: Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h    | 16 +++ hw/ppc/ppc405_uc.c | 71

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-04 Thread Mark Cave-Ayland
On 04/08/2022 00:04, BALATON Zoltan wrote: On Wed, 3 Aug 2022, Cédric Le Goater wrote: Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h    | 16 +++ hw/ppc/ppc405_uc.c | 71 +++--- 2 files changed, 64

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-03 Thread Cédric Le Goater
On 8/4/22 01:36, Daniel Henrique Barboza wrote: Cedric, On 8/3/22 10:28, Cédric Le Goater wrote: Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater ---   hw/ppc/ppc405.h    | 16 +++   hw/ppc/ppc405_uc.c | 71 +++---   2 files

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-03 Thread Daniel Henrique Barboza
Cedric, On 8/3/22 10:28, Cédric Le Goater wrote: Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 16 +++ hw/ppc/ppc405_uc.c | 71 +++--- 2 files changed, 64 insertions(+), 23 deletions(-) diff

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-03 Thread BALATON Zoltan
On Wed, 3 Aug 2022, Cédric Le Goater wrote: Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 16 +++ hw/ppc/ppc405_uc.c | 71 +++--- 2 files changed, 64 insertions(+), 23 deletions(-) diff --git

[PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-03 Thread Cédric Le Goater
Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 16 +++ hw/ppc/ppc405_uc.c | 71 +++--- 2 files changed, 64 insertions(+), 23 deletions(-) diff --git a/hw/ppc/ppc405.h b/hw/ppc/ppc405.h index