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

[Xen-devel] [PATCH 05/13] xen: introduce test_and_set_mask



Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 drivers/xen/events.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 93a3648..0fae3f9 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -345,6 +345,12 @@ static inline int test_evtchn(int port)
        return sync_test_bit(port, &s->evtchn_pending[0]);
 }
 
+static inline int test_and_set_mask(int port)
+{
+       struct shared_info *s = HYPERVISOR_shared_info;
+       return sync_test_and_set_bit(port, &s->evtchn_mask[0]);
+}
+
 
 /**
  * notify_remote_via_irq - send event to remote end of event channel via irq
@@ -1464,7 +1470,7 @@ int resend_irq_on_evtchn(unsigned int irq)
        if (!VALID_EVTCHN(evtchn))
                return 1;
 
-       masked = sync_test_and_set_bit(evtchn, s->evtchn_mask);
+       masked = test_and_set_mask(evtchn);
        sync_set_bit(evtchn, s->evtchn_pending);
        if (!masked)
                unmask_evtchn(evtchn);
@@ -1513,7 +1519,7 @@ static int retrigger_dynirq(struct irq_data *data)
        if (VALID_EVTCHN(evtchn)) {
                int masked;
 
-               masked = sync_test_and_set_bit(evtchn, sh->evtchn_mask);
+               masked = test_and_set_mask(evtchn);
                sync_set_bit(evtchn, sh->evtchn_pending);
                if (!masked)
                        unmask_evtchn(evtchn);
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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