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

[Xen-devel] [PATCH] evtchn_do_upcall: Fix logic to start correctly at "last processed port + 1"


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.