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] [XEN] Abstract setting of master event-pe

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Abstract setting of master event-pending flag into asm/event.h.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 14 Jun 2006 15:25:36 +0000
Delivery-date: Wed, 14 Jun 2006 08:28:53 -0700
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@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID 63967ff8d4594d93036e380af7457412e9aa3677
# Parent  578e306b0bd41eb0d2e5b4c904123eb730722212
[XEN] Abstract setting of master event-pending flag into asm/event.h.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/traps.c         |    2 +-
 xen/common/event_channel.c   |   14 ++++++--------
 xen/include/asm-ia64/event.h |    8 +++++++-
 xen/include/asm-x86/event.h  |    8 +++++++-
 4 files changed, 21 insertions(+), 11 deletions(-)

diff -r 578e306b0bd4 -r 63967ff8d459 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Wed Jun 14 13:31:38 2006 +0100
+++ b/xen/arch/x86/traps.c      Wed Jun 14 13:48:04 2006 +0100
@@ -1279,7 +1279,7 @@ static void nmi_softirq(void)
 static void nmi_softirq(void)
 {
     /* Only used to defer wakeup of dom0,vcpu0 to a safe (non-NMI) context. */
-    evtchn_notify(dom0->vcpu[0]);
+    vcpu_kick(dom0->vcpu[0]);
 }
 
 static void nmi_dom0_report(unsigned int reason_idx)
diff -r 578e306b0bd4 -r 63967ff8d459 xen/common/event_channel.c
--- a/xen/common/event_channel.c        Wed Jun 14 13:31:38 2006 +0100
+++ b/xen/common/event_channel.c        Wed Jun 14 13:48:04 2006 +0100
@@ -493,10 +493,9 @@ void evtchn_set_pending(struct vcpu *v, 
 
     if ( !test_bit        (port, s->evtchn_mask) &&
          !test_and_set_bit(port / BITS_PER_LONG,
-                           &v->vcpu_info->evtchn_pending_sel) &&
-         !test_and_set_bit(0, &v->vcpu_info->evtchn_upcall_pending) )
-    {
-        evtchn_notify(v);
+                           &v->vcpu_info->evtchn_pending_sel) )
+    {
+        vcpu_mark_events_pending(v);
     }
     
     /* Check if some VCPU might be polling for this event. */
@@ -682,10 +681,9 @@ static long evtchn_unmask(evtchn_unmask_
     if ( test_and_clear_bit(port, s->evtchn_mask) &&
          test_bit          (port, s->evtchn_pending) &&
          !test_and_set_bit (port / BITS_PER_LONG,
-                            &v->vcpu_info->evtchn_pending_sel) &&
-         !test_and_set_bit (0, &v->vcpu_info->evtchn_upcall_pending) )
-    {
-        evtchn_notify(v);
+                            &v->vcpu_info->evtchn_pending_sel) )
+    {
+        vcpu_mark_events_pending(v);
     }
 
     spin_unlock(&d->evtchn_lock);
diff -r 578e306b0bd4 -r 63967ff8d459 xen/include/asm-ia64/event.h
--- a/xen/include/asm-ia64/event.h      Wed Jun 14 13:31:38 2006 +0100
+++ b/xen/include/asm-ia64/event.h      Wed Jun 14 13:48:04 2006 +0100
@@ -12,7 +12,7 @@
 #include <public/arch-ia64.h>
 #include <asm/vcpu.h>
 
-static inline void evtchn_notify(struct vcpu *v)
+static inline void vcpu_kick(struct vcpu *v)
 {
     /*
      * NB1. 'vcpu_flags' and 'processor' must be checked /after/ update of
@@ -30,6 +30,12 @@ static inline void evtchn_notify(struct 
 
     if(!VMX_DOMAIN(v) && !v->arch.event_callback_ip)
         vcpu_pend_interrupt(v, v->domain->shared_info->arch.evtchn_vector);
+}
+
+static inline void vcpu_mark_events_pending(struct vcpu *v)
+{
+    if ( !test_and_set_bit(0, &v->vcpu_info->evtchn_upcall_pending) )
+        vcpu_kick(v);
 }
 
 /* Note: Bitwise operations result in fast code with no branches. */
diff -r 578e306b0bd4 -r 63967ff8d459 xen/include/asm-x86/event.h
--- a/xen/include/asm-x86/event.h       Wed Jun 14 13:31:38 2006 +0100
+++ b/xen/include/asm-x86/event.h       Wed Jun 14 13:48:04 2006 +0100
@@ -9,7 +9,7 @@
 #ifndef __ASM_EVENT_H__
 #define __ASM_EVENT_H__
 
-static inline void evtchn_notify(struct vcpu *v)
+static inline void vcpu_kick(struct vcpu *v)
 {
     /*
      * NB1. 'vcpu_flags' and 'processor' must be checked /after/ update of
@@ -24,6 +24,12 @@ static inline void evtchn_notify(struct 
     vcpu_unblock(v);
     if ( running )
         smp_send_event_check_cpu(v->processor);
+}
+
+static inline void vcpu_mark_events_pending(struct vcpu *v)
+{
+    if ( !test_and_set_bit(0, &v->vcpu_info->evtchn_upcall_pending) )
+        vcpu_kick(v);
 }
 
 static inline int local_events_need_delivery(void)

_______________________________________________
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] [XEN] Abstract setting of master event-pending flag into asm/event.h., Xen patchbot-unstable <=