[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/2] x86/vpic: rename irq to pin in vpic_ioport_write
The irq variable is wrongly named, as it's used to store the pin on the 8259 chip, but not the global irq value. While renaming reduce it's scope and make it unsigned. No functional change intended. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/arch/x86/hvm/vpic.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c index 936c7b27c6..feb1db2ee3 100644 --- a/xen/arch/x86/hvm/vpic.c +++ b/xen/arch/x86/hvm/vpic.c @@ -184,7 +184,7 @@ static int vpic_intack(struct hvm_hw_vpic *vpic) static void vpic_ioport_write( struct hvm_hw_vpic *vpic, uint32_t addr, uint32_t val) { - int priority, cmd, irq; + int priority, cmd; uint8_t mask, unmasked = 0; vpic_lock(vpic); @@ -230,6 +230,8 @@ static void vpic_ioport_write( } else { + unsigned int pin; + /* OCW2 */ cmd = val >> 5; switch ( cmd ) @@ -246,22 +248,22 @@ static void vpic_ioport_write( priority = vpic_get_priority(vpic, mask); if ( priority == VPIC_PRIO_NONE ) break; - irq = (priority + vpic->priority_add) & 7; - vpic->isr &= ~(1 << irq); + pin = (priority + vpic->priority_add) & 7; + vpic->isr &= ~(1 << pin); if ( cmd == 5 ) - vpic->priority_add = (irq + 1) & 7; + vpic->priority_add = (pin + 1) & 7; break; case 3: /* Specific EOI */ case 7: /* Specific EOI & Rotate */ - irq = val & 7; - vpic->isr &= ~(1 << irq); + pin = val & 7; + vpic->isr &= ~(1 << pin); if ( cmd == 7 ) - vpic->priority_add = (irq + 1) & 7; + vpic->priority_add = (pin + 1) & 7; /* Release lock and EOI the physical interrupt (if any). */ vpic_update_int_output(vpic); vpic_unlock(vpic); hvm_dpci_eoi(current->domain, - hvm_isa_irq_to_gsi((addr >> 7) ? (irq|8) : irq), + hvm_isa_irq_to_gsi((addr >> 7) ? (pin | 8) : pin), NULL); return; /* bail immediately */ case 6: /* Set Priority */ -- 2.28.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |