|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 21/22] i8259_common.c: remove static irq_count and irq_level variables
On Wed, 16 Sept 2026 at 11:50, Mark Cave-Ayland
<mark.caveayland@xxxxxxxxxxx> wrote:
>
> Adjust the parameters to i8259_stat_update_irq() to allow passing in pointers
> to the irq_count and irq_level arrays, and then move the arrays into the
> corresponding i8259 PIC and KVM PIC devices.
>
> Doing this allows the statistics capture logic in i8259_set_irq() that handles
> incoming cascading interrupts to be removed.
>
> Signed-off-by: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
> diff --git a/hw/i386/kvm/i8259.c b/hw/i386/kvm/i8259.c
> index 421c9279cd..ca661afc02 100644
> --- a/hw/i386/kvm/i8259.c
> +++ b/hw/i386/kvm/i8259.c
> @@ -30,6 +30,9 @@ struct KVMI8259PICState {
>
> ISABus *isabus;
> I8259CommonState i8259[2];
> +
> + int irq_level[ISA_NUM_IRQS];
> + uint64_t irq_count[ISA_NUM_IRQS];
> };
> diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c
> index 3f10777036..ac43995ce4 100644
> --- a/hw/intc/i8259.c
> +++ b/hw/intc/i8259.c
> @@ -49,14 +49,16 @@ struct I8259PICState {
> ISABus *isabus;
> IRQState i8259_primary_out_irq;
> I8259CommonState i8259[2];
> +
> + int irq_level[ISA_NUM_IRQS];
> + uint64_t irq_count[ISA_NUM_IRQS];
> +#ifdef DEBUG_IRQ_LATENCY
> + int64_t irq_time[ISA_NUM_IRQS];
> +#endif
> };
Would it make sense for these two types to have a common base
class (where the stats stuff could then live)? AIUI they're
both intending to provide the same interface ("pair of i8259
devices cascaded together in the way that x86 does it").
-- PMM
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |