aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2010-12-06 12:16:29 -0500
committerTejun Heo <tj@kernel.org>2010-12-17 09:07:19 -0500
commit780f36d8b3fa9572f731d4fb85067b2e45e6f993 (patch)
tree26c2f80122cd863232de2e295e8435f06c9e2527 /drivers
parentc7b92516a9c68fa5403879225a5a19974a801ef6 (diff)
xen: Use this_cpu_ops
Use this_cpu_ops to reduce code size and simplify things in various places. V3->V4: Move instance of this_cpu_inc_return to a later patchset so that this patch can be applied without infrastructure changes. Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/xen/events.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 31af0ac31a98..a10c66dc9dda 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -355,7 +355,7 @@ static void unmask_evtchn(int port)
355 struct evtchn_unmask unmask = { .port = port }; 355 struct evtchn_unmask unmask = { .port = port };
356 (void)HYPERVISOR_event_channel_op(EVTCHNOP_unmask, &unmask); 356 (void)HYPERVISOR_event_channel_op(EVTCHNOP_unmask, &unmask);
357 } else { 357 } else {
358 struct vcpu_info *vcpu_info = __get_cpu_var(xen_vcpu); 358 struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
359 359
360 sync_clear_bit(port, &s->evtchn_mask[0]); 360 sync_clear_bit(port, &s->evtchn_mask[0]);
361 361
@@ -1101,7 +1101,7 @@ static void __xen_evtchn_do_upcall(void)
1101{ 1101{
1102 int cpu = get_cpu(); 1102 int cpu = get_cpu();
1103 struct shared_info *s = HYPERVISOR_shared_info; 1103 struct shared_info *s = HYPERVISOR_shared_info;
1104 struct vcpu_info *vcpu_info = __get_cpu_var(xen_vcpu); 1104 struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
1105 unsigned count; 1105 unsigned count;
1106 1106
1107 do { 1107 do {
@@ -1141,8 +1141,8 @@ static void __xen_evtchn_do_upcall(void)
1141 1141
1142 BUG_ON(!irqs_disabled()); 1142 BUG_ON(!irqs_disabled());
1143 1143
1144 count = __get_cpu_var(xed_nesting_count); 1144 count = __this_cpu_read(xed_nesting_count);
1145 __get_cpu_var(xed_nesting_count) = 0; 1145 __this_cpu_write(xed_nesting_count, 0);
1146 } while (count != 1 || vcpu_info->evtchn_upcall_pending); 1146 } while (count != 1 || vcpu_info->evtchn_upcall_pending);
1147 1147
1148out: 1148out: