WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [HVM] Remove a duplicated range checking

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [HVM] Remove a duplicated range checking in vioapic_set_irq.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Nov 2006 12:20:13 +0000
Delivery-date: Fri, 10 Nov 2006 04:20:05 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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 <=