aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/events.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 3df7e477694a..74681478100a 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -358,7 +358,7 @@ static void unmask_evtchn(int port)
358 struct evtchn_unmask unmask = { .port = port }; 358 struct evtchn_unmask unmask = { .port = port };
359 (void)HYPERVISOR_event_channel_op(EVTCHNOP_unmask, &unmask); 359 (void)HYPERVISOR_event_channel_op(EVTCHNOP_unmask, &unmask);
360 } else { 360 } else {
361 struct vcpu_info *vcpu_info = __get_cpu_var(xen_vcpu); 361 struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
362 362
363 sync_clear_bit(port, &s->evtchn_mask[0]); 363 sync_clear_bit(port, &s->evtchn_mask[0]);
364 364
@@ -1110,7 +1110,7 @@ static void __xen_evtchn_do_upcall(void)
1110{ 1110{
1111 int cpu = get_cpu(); 1111 int cpu = get_cpu();
1112 struct shared_info *s = HYPERVISOR_shared_info; 1112 struct shared_info *s = HYPERVISOR_shared_info;
1113 struct vcpu_info *vcpu_info = __get_cpu_var(xen_vcpu); 1113 struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
1114 unsigned count; 1114 unsigned count;
1115 1115
1116 do { 1116 do {
@@ -1118,7 +1118,7 @@ static void __xen_evtchn_do_upcall(void)
1118 1118
1119 vcpu_info->evtchn_upcall_pending = 0; 1119 vcpu_info->evtchn_upcall_pending = 0;
1120 1120
1121 if (__get_cpu_var(xed_nesting_count)++) 1121 if (__this_cpu_inc_return(xed_nesting_count) - 1)
1122 goto out; 1122 goto out;
1123 1123
1124#ifndef CONFIG_X86 /* No need for a barrier -- XCHG is a barrier on x86. */ 1124#ifndef CONFIG_X86 /* No need for a barrier -- XCHG is a barrier on x86. */
@@ -1150,8 +1150,8 @@ static void __xen_evtchn_do_upcall(void)
1150 1150
1151 BUG_ON(!irqs_disabled()); 1151 BUG_ON(!irqs_disabled());
1152 1152
1153 count = __get_cpu_var(xed_nesting_count); 1153 count = __this_cpu_read(xed_nesting_count);
1154 __get_cpu_var(xed_nesting_count) = 0; 1154 __this_cpu_write(xed_nesting_count, 0);
1155 } while (count != 1 || vcpu_info->evtchn_upcall_pending); 1155 } while (count != 1 || vcpu_info->evtchn_upcall_pending);
1156 1156
1157out: 1157out: