[PATCH 0/5] hw/timer/i8254: Un-inline and simplify IRQs

Philippe Mathieu-Daudé posted 5 patches 1 year, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230215174353.37097-1-philmd@linaro.org
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Sergio Lopez <slp@redhat.com>, "Hervé Poussineau" <hpoussin@reactos.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Aurelien Jarno <aurelien@aurel32.net>, Huacai Chen <chenhuacai@kernel.org>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Marcelo Tosatti <mtosatti@redhat.com>
hw/i386/kvm/i8254.c        | 18 ++++++++++++++
hw/i386/microvm.c          |  6 +----
hw/i386/pc.c               | 15 +++++-------
hw/isa/i82378.c            |  2 +-
hw/isa/piix4.c             |  4 ++--
hw/isa/vt82c686.c          |  2 +-
hw/mips/jazz.c             |  2 +-
hw/timer/hpet.c            |  1 +
hw/timer/i8254.c           | 16 +++++++++++++
include/hw/timer/i8254.h   | 48 +++++++++++++-------------------------
target/i386/kvm/kvm-stub.c |  6 +++++
11 files changed, 69 insertions(+), 51 deletions(-)
[PATCH 0/5] hw/timer/i8254: Un-inline and simplify IRQs
Posted by Philippe Mathieu-Daudé 1 year, 2 months ago
i8254_pit_init() uses a odd pattern of "use this IRQ output
line if non-NULL, otherwise use the ISA IRQ #number as output".

Rework as simply "Use this IRQ output".

Un-inline/rename/document functions.

Based-on: <20230215161641.32663-1-philmd@linaro.org>
          "hw/ide: Untangle ISA/PCI abuses of ide_init_ioport" v2
https://lore.kernel.org/qemu-devel/20230215161641.32663-1-philmd@linaro.org/

Philippe Mathieu-Daudé (5):
  hw/timer/hpet: Include missing 'hw/qdev-properties.h' header
  hw/timer/i8254: Factor i8254_pit_create() out and document
  hw/i386/pc: Un-inline i8254_pit_init()
  hw/timer/i8254: Really inline i8254_pit_init()
  hw/i386/kvm: Factor i8254_pit_create_try_kvm() out

 hw/i386/kvm/i8254.c        | 18 ++++++++++++++
 hw/i386/microvm.c          |  6 +----
 hw/i386/pc.c               | 15 +++++-------
 hw/isa/i82378.c            |  2 +-
 hw/isa/piix4.c             |  4 ++--
 hw/isa/vt82c686.c          |  2 +-
 hw/mips/jazz.c             |  2 +-
 hw/timer/hpet.c            |  1 +
 hw/timer/i8254.c           | 16 +++++++++++++
 include/hw/timer/i8254.h   | 48 +++++++++++++-------------------------
 target/i386/kvm/kvm-stub.c |  6 +++++
 11 files changed, 69 insertions(+), 51 deletions(-)

-- 
2.38.1


Re: [PATCH 0/5] hw/timer/i8254: Un-inline and simplify IRQs
Posted by Michael S. Tsirkin 1 year, 2 months ago
On Wed, Feb 15, 2023 at 06:43:48PM +0100, Philippe Mathieu-Daudé wrote:
> i8254_pit_init() uses a odd pattern of "use this IRQ output
> line if non-NULL, otherwise use the ISA IRQ #number as output".
> 
> Rework as simply "Use this IRQ output".


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


Given it also affects KVM I will let Paolo merge this.

> Un-inline/rename/document functions.
> 
> Based-on: <20230215161641.32663-1-philmd@linaro.org>
>           "hw/ide: Untangle ISA/PCI abuses of ide_init_ioport" v2
> https://lore.kernel.org/qemu-devel/20230215161641.32663-1-philmd@linaro.org/
> 
> Philippe Mathieu-Daudé (5):
>   hw/timer/hpet: Include missing 'hw/qdev-properties.h' header
>   hw/timer/i8254: Factor i8254_pit_create() out and document
>   hw/i386/pc: Un-inline i8254_pit_init()
>   hw/timer/i8254: Really inline i8254_pit_init()
>   hw/i386/kvm: Factor i8254_pit_create_try_kvm() out
> 
>  hw/i386/kvm/i8254.c        | 18 ++++++++++++++
>  hw/i386/microvm.c          |  6 +----
>  hw/i386/pc.c               | 15 +++++-------
>  hw/isa/i82378.c            |  2 +-
>  hw/isa/piix4.c             |  4 ++--
>  hw/isa/vt82c686.c          |  2 +-
>  hw/mips/jazz.c             |  2 +-
>  hw/timer/hpet.c            |  1 +
>  hw/timer/i8254.c           | 16 +++++++++++++
>  include/hw/timer/i8254.h   | 48 +++++++++++++-------------------------
>  target/i386/kvm/kvm-stub.c |  6 +++++
>  11 files changed, 69 insertions(+), 51 deletions(-)
> 
> -- 
> 2.38.1