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-devel

[Xen-devel] [PATCH] evtchn_do_upcall: Fix logic to start correctly at "l

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] evtchn_do_upcall: Fix logic to start correctly at "last processed port + 1"
From: Kaushik Kumar Ram <kaushik@xxxxxxxx>
Date: Thu, 28 Jan 2010 23:34:42 -0600
Delivery-date: Thu, 28 Jan 2010 21:35:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaushik
# Date 1264742860 21600
# Node ID de3e05e5eec28aa332ae1aa35a2edf97ded769f5
# Parent  91224343eeee460c9aafdaadc1bdedab54e92256
Fix the logic to start correctly at "last processed port + 1" in 
evtchn_do_upcall.

Signed-off-by: Kaushik Kumar Ram <kaushik@xxxxxxxx>

diff -r 91224343eeee -r de3e05e5eec2 drivers/xen/core/evtchn.c
--- a/drivers/xen/core/evtchn.c Thu Jan 21 15:05:02 2010 +0000
+++ b/drivers/xen/core/evtchn.c Thu Jan 28 23:27:40 2010 -0600
@@ -264,6 +264,9 @@ asmlinkage void evtchn_do_upcall(struct 
                l1i = per_cpu(last_processed_l1i, cpu);
                l2i = per_cpu(last_processed_l2i, cpu);
 
+               if(l2i == BITS_PER_LONG - 1)
+                       l1i = (l1i + 1) % BITS_PER_LONG;
+
                while (l1 != 0) {
 
                        l1i = (l1i + 1) % BITS_PER_LONG;
@@ -297,7 +300,7 @@ asmlinkage void evtchn_do_upcall(struct 
                                        evtchn_device_upcall(port);
 
                                /* if this is the final port processed, we'll 
pick up here+1 next time */
-                               per_cpu(last_processed_l1i, cpu) = l1i;
+                               per_cpu(last_processed_l1i, cpu) = l1i - 1;
                                per_cpu(last_processed_l2i, cpu) = l2i;
 
                        } while (l2i != BITS_PER_LONG - 1);

-Kaushik
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel