qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v4 05/12] isa: Allow to un-associate an IRQ


From: Markus Armbruster
Subject: Re: [Qemu-devel] [RFC v4 05/12] isa: Allow to un-associate an IRQ
Date: Thu, 09 Jun 2011 17:12:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Markus Armbruster <address@hidden> writes:

> Andreas Färber <address@hidden> writes:
>
>> Signed-off-by: Andreas Färber <address@hidden>
>> ---
>>  hw/isa-bus.c |   14 ++++++++++++++
>>  hw/isa.h     |    1 +
>>  2 files changed, 15 insertions(+), 0 deletions(-)
>>
>> diff --git a/hw/isa-bus.c b/hw/isa-bus.c
>> index 1f64673..6ac3e61 100644
>> --- a/hw/isa-bus.c
>> +++ b/hw/isa-bus.c
>> @@ -80,6 +80,20 @@ void isa_init_irq(ISADevice *dev, qemu_irq *p, int isairq)
>>      dev->nirqs++;
>>  }
>>  
>> +void isa_discard_irq(ISADevice *dev, int isairq)
>> +{
>> +    int i, j;
>> +    for (i = 0; i < dev->nirqs; i++) {
>> +        if (dev->isairq[i] == isairq) {
>> +            for (j = i + 1; j < dev->nirqs; j++) {
>> +                dev->isairq[j - 1] = dev->isairq[j];
>> +            }
>> +            dev->nirqs--;
>> +            break;
>> +        }
>> +    }
>> +}
>
> Comment to 04/12 applies.

Sorry, misleading.

The comment about the naming applies.

The comment about the use of the function doesn't apply: isa_init_irq()
does the complete job, unlike isa_init_ioport_range().

Your isa_discard_irq() keeps the qemu_irq that was set by isa_init_irq()
around, which is perhaps not perfectly clean, but should work.

> [...]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]