diff options
Diffstat (limited to 'arch/powerpc/kernel/time.c')
-rw-r--r-- | arch/powerpc/kernel/time.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 7505599c2593..9f8ea617ff2c 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -458,9 +458,9 @@ static inline void clear_irq_work_pending(void) | |||
458 | 458 | ||
459 | DEFINE_PER_CPU(u8, irq_work_pending); | 459 | DEFINE_PER_CPU(u8, irq_work_pending); |
460 | 460 | ||
461 | #define set_irq_work_pending_flag() __get_cpu_var(irq_work_pending) = 1 | 461 | #define set_irq_work_pending_flag() __this_cpu_write(irq_work_pending, 1) |
462 | #define test_irq_work_pending() __get_cpu_var(irq_work_pending) | 462 | #define test_irq_work_pending() __this_cpu_read(irq_work_pending) |
463 | #define clear_irq_work_pending() __get_cpu_var(irq_work_pending) = 0 | 463 | #define clear_irq_work_pending() __this_cpu_write(irq_work_pending, 0) |
464 | 464 | ||
465 | #endif /* 32 vs 64 bit */ | 465 | #endif /* 32 vs 64 bit */ |
466 | 466 | ||
@@ -482,8 +482,8 @@ void arch_irq_work_raise(void) | |||
482 | static void __timer_interrupt(void) | 482 | static void __timer_interrupt(void) |
483 | { | 483 | { |
484 | struct pt_regs *regs = get_irq_regs(); | 484 | struct pt_regs *regs = get_irq_regs(); |
485 | u64 *next_tb = &__get_cpu_var(decrementers_next_tb); | 485 | u64 *next_tb = this_cpu_ptr(&decrementers_next_tb); |
486 | struct clock_event_device *evt = &__get_cpu_var(decrementers); | 486 | struct clock_event_device *evt = this_cpu_ptr(&decrementers); |
487 | u64 now; | 487 | u64 now; |
488 | 488 | ||
489 | trace_timer_interrupt_entry(regs); | 489 | trace_timer_interrupt_entry(regs); |
@@ -498,7 +498,7 @@ static void __timer_interrupt(void) | |||
498 | *next_tb = ~(u64)0; | 498 | *next_tb = ~(u64)0; |
499 | if (evt->event_handler) | 499 | if (evt->event_handler) |
500 | evt->event_handler(evt); | 500 | evt->event_handler(evt); |
501 | __get_cpu_var(irq_stat).timer_irqs_event++; | 501 | __this_cpu_inc(irq_stat.timer_irqs_event); |
502 | } else { | 502 | } else { |
503 | now = *next_tb - now; | 503 | now = *next_tb - now; |
504 | if (now <= DECREMENTER_MAX) | 504 | if (now <= DECREMENTER_MAX) |
@@ -506,13 +506,13 @@ static void __timer_interrupt(void) | |||
506 | /* We may have raced with new irq work */ | 506 | /* We may have raced with new irq work */ |
507 | if (test_irq_work_pending()) | 507 | if (test_irq_work_pending()) |
508 | set_dec(1); | 508 | set_dec(1); |
509 | __get_cpu_var(irq_stat).timer_irqs_others++; | 509 | __this_cpu_inc(irq_stat.timer_irqs_others); |
510 | } | 510 | } |
511 | 511 | ||
512 | #ifdef CONFIG_PPC64 | 512 | #ifdef CONFIG_PPC64 |
513 | /* collect purr register values often, for accurate calculations */ | 513 | /* collect purr register values often, for accurate calculations */ |
514 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) { | 514 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) { |
515 | struct cpu_usage *cu = &__get_cpu_var(cpu_usage_array); | 515 | struct cpu_usage *cu = this_cpu_ptr(&cpu_usage_array); |
516 | cu->current_tb = mfspr(SPRN_PURR); | 516 | cu->current_tb = mfspr(SPRN_PURR); |
517 | } | 517 | } |
518 | #endif | 518 | #endif |
@@ -527,7 +527,7 @@ static void __timer_interrupt(void) | |||
527 | void timer_interrupt(struct pt_regs * regs) | 527 | void timer_interrupt(struct pt_regs * regs) |
528 | { | 528 | { |
529 | struct pt_regs *old_regs; | 529 | struct pt_regs *old_regs; |
530 | u64 *next_tb = &__get_cpu_var(decrementers_next_tb); | 530 | u64 *next_tb = this_cpu_ptr(&decrementers_next_tb); |
531 | 531 | ||
532 | /* Ensure a positive value is written to the decrementer, or else | 532 | /* Ensure a positive value is written to the decrementer, or else |
533 | * some CPUs will continue to take decrementer exceptions. | 533 | * some CPUs will continue to take decrementer exceptions. |
@@ -813,7 +813,7 @@ static void __init clocksource_init(void) | |||
813 | static int decrementer_set_next_event(unsigned long evt, | 813 | static int decrementer_set_next_event(unsigned long evt, |
814 | struct clock_event_device *dev) | 814 | struct clock_event_device *dev) |
815 | { | 815 | { |
816 | __get_cpu_var(decrementers_next_tb) = get_tb_or_rtc() + evt; | 816 | __this_cpu_write(decrementers_next_tb, get_tb_or_rtc() + evt); |
817 | set_dec(evt); | 817 | set_dec(evt); |
818 | 818 | ||
819 | /* We may have raced with new irq work */ | 819 | /* We may have raced with new irq work */ |
@@ -833,7 +833,7 @@ static void decrementer_set_mode(enum clock_event_mode mode, | |||
833 | /* Interrupt handler for the timer broadcast IPI */ | 833 | /* Interrupt handler for the timer broadcast IPI */ |
834 | void tick_broadcast_ipi_handler(void) | 834 | void tick_broadcast_ipi_handler(void) |
835 | { | 835 | { |
836 | u64 *next_tb = &__get_cpu_var(decrementers_next_tb); | 836 | u64 *next_tb = this_cpu_ptr(&decrementers_next_tb); |
837 | 837 | ||
838 | *next_tb = get_tb_or_rtc(); | 838 | *next_tb = get_tb_or_rtc(); |
839 | __timer_interrupt(); | 839 | __timer_interrupt(); |