X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fxen%2Fevents.c;h=65f8637d13cf1fa555825824d71c5a4c30e39828;hb=5377a4160bb65ee4dd11b4b1d081d86d56d92bff;hp=31af0ac31a98bffc310cfb79bcaa2d7e03393e81;hpb=a3383e8372c0c11238f9bb9777929bfc3a2d320a;p=karo-tx-linux.git diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 31af0ac31a98..65f8637d13cf 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -355,7 +355,7 @@ static void unmask_evtchn(int port) struct evtchn_unmask unmask = { .port = port }; (void)HYPERVISOR_event_channel_op(EVTCHNOP_unmask, &unmask); } else { - struct vcpu_info *vcpu_info = __get_cpu_var(xen_vcpu); + struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu); sync_clear_bit(port, &s->evtchn_mask[0]); @@ -1101,7 +1101,7 @@ static void __xen_evtchn_do_upcall(void) { int cpu = get_cpu(); struct shared_info *s = HYPERVISOR_shared_info; - struct vcpu_info *vcpu_info = __get_cpu_var(xen_vcpu); + struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu); unsigned count; do { @@ -1109,7 +1109,7 @@ static void __xen_evtchn_do_upcall(void) vcpu_info->evtchn_upcall_pending = 0; - if (__get_cpu_var(xed_nesting_count)++) + if (__this_cpu_inc_return(xed_nesting_count) - 1) goto out; #ifndef CONFIG_X86 /* No need for a barrier -- XCHG is a barrier on x86. */ @@ -1141,8 +1141,8 @@ static void __xen_evtchn_do_upcall(void) BUG_ON(!irqs_disabled()); - count = __get_cpu_var(xed_nesting_count); - __get_cpu_var(xed_nesting_count) = 0; + count = __this_cpu_read(xed_nesting_count); + __this_cpu_write(xed_nesting_count, 0); } while (count != 1 || vcpu_info->evtchn_upcall_pending); out: