[PATCH-for-6.1 0/3] hw/sparc/sun4m: Introduce Sun4mMachineClass to access sun4m_hwdefs

Philippe Mathieu-Daudé posted 3 patches 2 years, 11 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210407175305.1771069-1-f4bug@amsat.org
There is a newer version of this series
hw/sparc/sun4m.c | 178 ++++++++++++++++++-----------------------------
1 file changed, 69 insertions(+), 109 deletions(-)
[PATCH-for-6.1 0/3] hw/sparc/sun4m: Introduce Sun4mMachineClass to access sun4m_hwdefs
Posted by Philippe Mathieu-Daudé 2 years, 11 months ago
Hi Mark,

This series QOM'ify a bit more the sun4m machines.
I need it for a further memory maxsize check.
It is mostly code movement (and the diff-stat is good).

Philippe Mathieu-Daudé (3):
  hw/sparc/sun4m: Introduce TYPE_SUN4M_MACHINE and Sun4mMachineClass
  hw/sparc/sun4m: Factor out sun4m_machine_class_common_init()
  hw/sparc/sun4m: Make sun4m_hwdefs a Sun4mMachineClass field

 hw/sparc/sun4m.c | 178 ++++++++++++++++++-----------------------------
 1 file changed, 69 insertions(+), 109 deletions(-)

-- 
2.26.3

Re: [PATCH-for-6.1 0/3] hw/sparc/sun4m: Introduce Sun4mMachineClass to access sun4m_hwdefs
Posted by Mark Cave-Ayland 2 years, 11 months ago
On 07/04/2021 18:53, Philippe Mathieu-Daudé wrote:

> Hi Mark,
> 
> This series QOM'ify a bit more the sun4m machines.
> I need it for a further memory maxsize check.
> It is mostly code movement (and the diff-stat is good).
> 
> Philippe Mathieu-Daudé (3):
>    hw/sparc/sun4m: Introduce TYPE_SUN4M_MACHINE and Sun4mMachineClass
>    hw/sparc/sun4m: Factor out sun4m_machine_class_common_init()
>    hw/sparc/sun4m: Make sun4m_hwdefs a Sun4mMachineClass field
> 
>   hw/sparc/sun4m.c | 178 ++++++++++++++++++-----------------------------
>   1 file changed, 69 insertions(+), 109 deletions(-)

Hi Phil,

Possibly it might be worth having an abstract TYPE_SUN4M_MACHINE and then for each 
sun4m machine to have that as a parent type? This would allow you to move 
sun4m_machine_class_common_init() directly into the abstract 
sun4m_machine_class_init() rather than having to call a function from within each 
individual class init function.

No objection to the cleanup though :)


ATB,

Mark.

Re: [PATCH-for-6.1 0/3] hw/sparc/sun4m: Introduce Sun4mMachineClass to access sun4m_hwdefs
Posted by Philippe Mathieu-Daudé 2 years, 11 months ago
On 5/2/21 1:20 PM, Mark Cave-Ayland wrote:
> On 07/04/2021 18:53, Philippe Mathieu-Daudé wrote:
> 
>> Hi Mark,
>>
>> This series QOM'ify a bit more the sun4m machines.
>> I need it for a further memory maxsize check.
>> It is mostly code movement (and the diff-stat is good).
>>
>> Philippe Mathieu-Daudé (3):
>>    hw/sparc/sun4m: Introduce TYPE_SUN4M_MACHINE and Sun4mMachineClass
>>    hw/sparc/sun4m: Factor out sun4m_machine_class_common_init()
>>    hw/sparc/sun4m: Make sun4m_hwdefs a Sun4mMachineClass field
>>
>>   hw/sparc/sun4m.c | 178 ++++++++++++++++++-----------------------------
>>   1 file changed, 69 insertions(+), 109 deletions(-)
> 
> Hi Phil,
> 
> Possibly it might be worth having an abstract TYPE_SUN4M_MACHINE and
> then for each sun4m machine to have that as a parent type?

This is what this series does...

> This would
> allow you to move sun4m_machine_class_common_init() directly into the
> abstract sun4m_machine_class_init() rather than having to call a
> function from within each individual class init function.

OK, can do that.

Regards,

Phil.