|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] [HVM] Remove a duplicated range checking
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 2d20b54322535f8d64696e3b7f0feaf2207a244b
# Parent 814fbacfafc63d6e187560142a33d2d0d031b09d
[HVM] Remove a duplicated range checking in vioapic_set_irq.
Since irq range checking has already been done at the
beginning of this function.
Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>
---
xen/arch/x86/hvm/vioapic.c | 28 +++++++++++++---------------
1 files changed, 13 insertions(+), 15 deletions(-)
diff -r 814fbacfafc6 -r 2d20b5432253 xen/arch/x86/hvm/vioapic.c
--- a/xen/arch/x86/hvm/vioapic.c Fri Nov 10 10:30:38 2006 +0000
+++ b/xen/arch/x86/hvm/vioapic.c Fri Nov 10 10:31:29 2006 +0000
@@ -504,6 +504,7 @@ void vioapic_set_irq(struct domain *d, i
void vioapic_set_irq(struct domain *d, int irq, int level)
{
struct vioapic *vioapic = domain_vioapic(d);
+ uint32_t bit;
HVM_DBG_LOG(DBG_LEVEL_IOAPIC, "ioapic_set_irq "
"irq %x level %x\n", irq, level);
@@ -528,22 +529,19 @@ void vioapic_set_irq(struct domain *d, i
vioapic->redirtbl[irq].fields.mask,
vioapic->redirtbl[irq].fields.dest_id);
- if ( (irq >= 0) && (irq < VIOAPIC_NUM_PINS) )
- {
- uint32_t bit = 1 << irq;
- if ( vioapic->redirtbl[irq].fields.trig_mode == VIOAPIC_LEVEL_TRIG )
- {
- if ( level )
- vioapic->irr |= bit;
- else
- vioapic->irr &= ~bit;
- }
+ bit = 1 << irq;
+ if ( vioapic->redirtbl[irq].fields.trig_mode == VIOAPIC_LEVEL_TRIG )
+ {
+ if ( level )
+ vioapic->irr |= bit;
else
- {
- if ( level )
- /* XXX No irr clear for edge interrupt */
- vioapic->irr |= bit;
- }
+ vioapic->irr &= ~bit;
+ }
+ else
+ {
+ if ( level )
+ /* XXX No irr clear for edge interrupt */
+ vioapic->irr |= bit;
}
service_ioapic(vioapic);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] [HVM] Remove a duplicated range checking in vioapic_set_irq.,
Xen patchbot-unstable <=
|
|
|
|
|