[PATCH v2 00/11] hw/acpi/piix4: remove legacy piix4_pm_init() function

Philippe Mathieu-Daudé posted 11 patches 1 year, 11 months ago
Failed in applying to current master (apply log)
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <ani@anisinha.ca>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Aurelien Jarno <aurelien@aurel32.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, "Hervé Poussineau" <hpoussin@reactos.org>
hw/acpi/piix4.c               | 77 ++++++-----------------------------
hw/i386/acpi-build.c          |  1 +
hw/i386/pc_piix.c             | 16 +++++---
hw/isa/piix4.c                | 11 +++--
include/hw/acpi/piix4.h       | 75 ++++++++++++++++++++++++++++++++++
include/hw/southbridge/piix.h |  6 ---
6 files changed, 107 insertions(+), 79 deletions(-)
create mode 100644 include/hw/acpi/piix4.h
[PATCH v2 00/11] hw/acpi/piix4: remove legacy piix4_pm_init() function
Posted by Philippe Mathieu-Daudé 1 year, 11 months ago
From: Philippe Mathieu-Daudé <f4bug@amsat.org>

This series moves the outstanding logic from piix4_pm_init() into
the relevant instance init() and realize() functions, changes the
IRQs to use qdev gpios, and then finally removes the now-unused
piix4_pm_initfn() function.

v2:
- Addressed Ani & Bernhard review comments

If no further comments I plan to queue this via mips-next end of
this week.

Regards,

Phil.

Mark Cave-Ayland (11):
  hw/acpi/piix4: move xen_enabled() logic from piix4_pm_init() to
    piix4_pm_realize()
  hw/acpi/piix4: change smm_enabled from int to bool
  hw/acpi/piix4: convert smm_enabled bool to qdev property
  hw/acpi/piix4: move PIIX4PMState into separate piix4.h header
  hw/acpi/piix4: alter piix4_pm_init() to return PIIX4PMState
  hw/acpi/piix4: rename piix4_pm_init() to piix4_pm_initfn()
  hw/acpi/piix4: use qdev gpio to wire up sci_irq
  hw/acpi/piix4: use qdev gpio to wire up smi_irq
  hw/i386/pc_piix: create PIIX4_PM device directly instead of using
    piix4_pm_initfn()
  hw/isa/piix4.c: create PIIX4_PM device directly instead of using
    piix4_pm_initfn()
  hw/acpi/piix4: remove unused piix4_pm_initfn() function

 hw/acpi/piix4.c               | 77 ++++++-----------------------------
 hw/i386/acpi-build.c          |  1 +
 hw/i386/pc_piix.c             | 16 +++++---
 hw/isa/piix4.c                | 11 +++--
 include/hw/acpi/piix4.h       | 75 ++++++++++++++++++++++++++++++++++
 include/hw/southbridge/piix.h |  6 ---
 6 files changed, 107 insertions(+), 79 deletions(-)
 create mode 100644 include/hw/acpi/piix4.h

-- 
2.36.1


Re: [PATCH v2 00/11] hw/acpi/piix4: remove legacy piix4_pm_init() function
Posted by Bernhard Beschow 1 year, 11 months ago
Am 30. Mai 2022 11:27:07 UTC schrieb "Philippe Mathieu-Daudé" <philippe.mathieu.daude@gmail.com>:
>From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
>This series moves the outstanding logic from piix4_pm_init() into
>the relevant instance init() and realize() functions, changes the
>IRQs to use qdev gpios, and then finally removes the now-unused
>piix4_pm_initfn() function.
>
>v2:
>- Addressed Ani & Bernhard review comments

Patch 4 still introduces the redundant include in acpi/piix4.c, and perhaps all includes already included in the new piix4.h could still be removed alrogether [1]. Anyway:
Reviewed-by: Bernhard Beschow <shentey@gmail.com>

[1] https://lists.nongnu.org/archive/html/qemu-devel/2022-05/msg05756.html

>
>If no further comments I plan to queue this via mips-next end of
>this week.
>
>Regards,
>
>Phil.
>
>Mark Cave-Ayland (11):
>  hw/acpi/piix4: move xen_enabled() logic from piix4_pm_init() to
>    piix4_pm_realize()
>  hw/acpi/piix4: change smm_enabled from int to bool
>  hw/acpi/piix4: convert smm_enabled bool to qdev property
>  hw/acpi/piix4: move PIIX4PMState into separate piix4.h header
>  hw/acpi/piix4: alter piix4_pm_init() to return PIIX4PMState
>  hw/acpi/piix4: rename piix4_pm_init() to piix4_pm_initfn()
>  hw/acpi/piix4: use qdev gpio to wire up sci_irq
>  hw/acpi/piix4: use qdev gpio to wire up smi_irq
>  hw/i386/pc_piix: create PIIX4_PM device directly instead of using
>    piix4_pm_initfn()
>  hw/isa/piix4.c: create PIIX4_PM device directly instead of using
>    piix4_pm_initfn()
>  hw/acpi/piix4: remove unused piix4_pm_initfn() function
>
> hw/acpi/piix4.c               | 77 ++++++-----------------------------
> hw/i386/acpi-build.c          |  1 +
> hw/i386/pc_piix.c             | 16 +++++---
> hw/isa/piix4.c                | 11 +++--
> include/hw/acpi/piix4.h       | 75 ++++++++++++++++++++++++++++++++++
> include/hw/southbridge/piix.h |  6 ---
> 6 files changed, 107 insertions(+), 79 deletions(-)
> create mode 100644 include/hw/acpi/piix4.h
>
Re: [PATCH v2 00/11] hw/acpi/piix4: remove legacy piix4_pm_init() function
Posted by Michael S. Tsirkin 1 year, 10 months ago
On Mon, May 30, 2022 at 01:27:07PM +0200, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
> 
> This series moves the outstanding logic from piix4_pm_init() into
> the relevant instance init() and realize() functions, changes the
> IRQs to use qdev gpios, and then finally removes the now-unused
> piix4_pm_initfn() function.


Looks ok

Acked-by: Michael S. Tsirkin <mst@redhat.com>

> v2:
> - Addressed Ani & Bernhard review comments
> 
> If no further comments I plan to queue this via mips-next end of
> this week.
> 
> Regards,
> 
> Phil.
> 
> Mark Cave-Ayland (11):
>   hw/acpi/piix4: move xen_enabled() logic from piix4_pm_init() to
>     piix4_pm_realize()
>   hw/acpi/piix4: change smm_enabled from int to bool
>   hw/acpi/piix4: convert smm_enabled bool to qdev property
>   hw/acpi/piix4: move PIIX4PMState into separate piix4.h header
>   hw/acpi/piix4: alter piix4_pm_init() to return PIIX4PMState
>   hw/acpi/piix4: rename piix4_pm_init() to piix4_pm_initfn()
>   hw/acpi/piix4: use qdev gpio to wire up sci_irq
>   hw/acpi/piix4: use qdev gpio to wire up smi_irq
>   hw/i386/pc_piix: create PIIX4_PM device directly instead of using
>     piix4_pm_initfn()
>   hw/isa/piix4.c: create PIIX4_PM device directly instead of using
>     piix4_pm_initfn()
>   hw/acpi/piix4: remove unused piix4_pm_initfn() function
> 
>  hw/acpi/piix4.c               | 77 ++++++-----------------------------
>  hw/i386/acpi-build.c          |  1 +
>  hw/i386/pc_piix.c             | 16 +++++---
>  hw/isa/piix4.c                | 11 +++--
>  include/hw/acpi/piix4.h       | 75 ++++++++++++++++++++++++++++++++++
>  include/hw/southbridge/piix.h |  6 ---
>  6 files changed, 107 insertions(+), 79 deletions(-)
>  create mode 100644 include/hw/acpi/piix4.h
> 
> -- 
> 2.36.1
Re: [PATCH v2 00/11] hw/acpi/piix4: remove legacy piix4_pm_init() function
Posted by Mark Cave-Ayland 1 year, 11 months ago
On 30/05/2022 12:27, Philippe Mathieu-Daudé wrote:

> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
> 
> This series moves the outstanding logic from piix4_pm_init() into
> the relevant instance init() and realize() functions, changes the
> IRQs to use qdev gpios, and then finally removes the now-unused
> piix4_pm_initfn() function.
> 
> v2:
> - Addressed Ani & Bernhard review comments
> 
> If no further comments I plan to queue this via mips-next end of
> this week.
> 
> Regards,
> 
> Phil.
> 
> Mark Cave-Ayland (11):
>    hw/acpi/piix4: move xen_enabled() logic from piix4_pm_init() to
>      piix4_pm_realize()
>    hw/acpi/piix4: change smm_enabled from int to bool
>    hw/acpi/piix4: convert smm_enabled bool to qdev property
>    hw/acpi/piix4: move PIIX4PMState into separate piix4.h header
>    hw/acpi/piix4: alter piix4_pm_init() to return PIIX4PMState
>    hw/acpi/piix4: rename piix4_pm_init() to piix4_pm_initfn()
>    hw/acpi/piix4: use qdev gpio to wire up sci_irq
>    hw/acpi/piix4: use qdev gpio to wire up smi_irq
>    hw/i386/pc_piix: create PIIX4_PM device directly instead of using
>      piix4_pm_initfn()
>    hw/isa/piix4.c: create PIIX4_PM device directly instead of using
>      piix4_pm_initfn()
>    hw/acpi/piix4: remove unused piix4_pm_initfn() function
> 
>   hw/acpi/piix4.c               | 77 ++++++-----------------------------
>   hw/i386/acpi-build.c          |  1 +
>   hw/i386/pc_piix.c             | 16 +++++---
>   hw/isa/piix4.c                | 11 +++--
>   include/hw/acpi/piix4.h       | 75 ++++++++++++++++++++++++++++++++++
>   include/hw/southbridge/piix.h |  6 ---
>   6 files changed, 107 insertions(+), 79 deletions(-)
>   create mode 100644 include/hw/acpi/piix4.h

Hi Phil,

I see that you haven't yet sent over the PR for this, so I wondering if it makes 
sense to add Bernhard's other series to mips-next first since they are good cleanups:

https://patchew.org/QEMU/20220603185045.143789-1-shentey@gmail.com/ (QOMify Sbridge)
https://patchew.org/QEMU/20220529184006.10712-1-shentey@gmail.com/  (RTC)
https://patchew.org/QEMU/20220520180109.8224-1-shentey@gmail.com/   (Random cleanups)
https://patchew.org/QEMU/20220605151908.30566-1-shentey@gmail.com/  (Werror fix)

Alternatively if you are busy, please let me know if you are happy for me to send a 
PR with Bernhard's fixes via qemu-sparc on your behalf.


ATB,

Mark.

Re: [PATCH v2 00/11] hw/acpi/piix4: remove legacy piix4_pm_init() function
Posted by Philippe Mathieu-Daudé via 1 year, 10 months ago
On 6/6/22 12:56, Mark Cave-Ayland wrote:
> On 30/05/2022 12:27, Philippe Mathieu-Daudé wrote:
> 
>> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>
>> This series moves the outstanding logic from piix4_pm_init() into
>> the relevant instance init() and realize() functions, changes the
>> IRQs to use qdev gpios, and then finally removes the now-unused
>> piix4_pm_initfn() function.
>>
>> v2:
>> - Addressed Ani & Bernhard review comments
>>
>> If no further comments I plan to queue this via mips-next end of
>> this week.
>>
>> Regards,
>>
>> Phil.
>>
>> Mark Cave-Ayland (11):
>>    hw/acpi/piix4: move xen_enabled() logic from piix4_pm_init() to
>>      piix4_pm_realize()
>>    hw/acpi/piix4: change smm_enabled from int to bool
>>    hw/acpi/piix4: convert smm_enabled bool to qdev property
>>    hw/acpi/piix4: move PIIX4PMState into separate piix4.h header
>>    hw/acpi/piix4: alter piix4_pm_init() to return PIIX4PMState
>>    hw/acpi/piix4: rename piix4_pm_init() to piix4_pm_initfn()
>>    hw/acpi/piix4: use qdev gpio to wire up sci_irq
>>    hw/acpi/piix4: use qdev gpio to wire up smi_irq
>>    hw/i386/pc_piix: create PIIX4_PM device directly instead of using
>>      piix4_pm_initfn()
>>    hw/isa/piix4.c: create PIIX4_PM device directly instead of using
>>      piix4_pm_initfn()
>>    hw/acpi/piix4: remove unused piix4_pm_initfn() function
>>
>>   hw/acpi/piix4.c               | 77 ++++++-----------------------------
>>   hw/i386/acpi-build.c          |  1 +
>>   hw/i386/pc_piix.c             | 16 +++++---
>>   hw/isa/piix4.c                | 11 +++--
>>   include/hw/acpi/piix4.h       | 75 ++++++++++++++++++++++++++++++++++
>>   include/hw/southbridge/piix.h |  6 ---
>>   6 files changed, 107 insertions(+), 79 deletions(-)
>>   create mode 100644 include/hw/acpi/piix4.h
> 
> Hi Phil,
> 
> I see that you haven't yet sent over the PR for this, so I wondering if 
> it makes sense to add Bernhard's other series to mips-next first since 
> they are good cleanups:
> 
> https://patchew.org/QEMU/20220603185045.143789-1-shentey@gmail.com/ 
> (QOMify Sbridge)
> https://patchew.org/QEMU/20220529184006.10712-1-shentey@gmail.com/  (RTC)
> https://patchew.org/QEMU/20220520180109.8224-1-shentey@gmail.com/   
> (Random cleanups)
> https://patchew.org/QEMU/20220605151908.30566-1-shentey@gmail.com/  
> (Werror fix)

Thanks for the head up :) All now queued via mips-next!

> Alternatively if you are busy, please let me know if you are happy for 
> me to send a PR with Bernhard's fixes via qemu-sparc on your behalf.
> 
> 
> ATB,
> 
> Mark.