diff options
-rw-r--r-- | arch/powerpc/kernel/time.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 7cedef8f5f70..2c8564d54e4d 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -711,30 +711,15 @@ void wakeup_decrementer(void) | |||
711 | void __init smp_space_timers(unsigned int max_cpus) | 711 | void __init smp_space_timers(unsigned int max_cpus) |
712 | { | 712 | { |
713 | int i; | 713 | int i; |
714 | unsigned long half = tb_ticks_per_jiffy / 2; | ||
715 | unsigned long offset = tb_ticks_per_jiffy / max_cpus; | ||
716 | u64 previous_tb = per_cpu(last_jiffy, boot_cpuid); | 714 | u64 previous_tb = per_cpu(last_jiffy, boot_cpuid); |
717 | 715 | ||
718 | /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */ | 716 | /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */ |
719 | previous_tb -= tb_ticks_per_jiffy; | 717 | previous_tb -= tb_ticks_per_jiffy; |
720 | /* | 718 | |
721 | * The stolen time calculation for POWER5 shared-processor LPAR | ||
722 | * systems works better if the two threads' timebase interrupts | ||
723 | * are staggered by half a jiffy with respect to each other. | ||
724 | */ | ||
725 | for_each_possible_cpu(i) { | 719 | for_each_possible_cpu(i) { |
726 | if (i == boot_cpuid) | 720 | if (i == boot_cpuid) |
727 | continue; | 721 | continue; |
728 | if (i == (boot_cpuid ^ 1)) | 722 | per_cpu(last_jiffy, i) = previous_tb; |
729 | per_cpu(last_jiffy, i) = | ||
730 | per_cpu(last_jiffy, boot_cpuid) - half; | ||
731 | else if (i & 1) | ||
732 | per_cpu(last_jiffy, i) = | ||
733 | per_cpu(last_jiffy, i ^ 1) + half; | ||
734 | else { | ||
735 | previous_tb += offset; | ||
736 | per_cpu(last_jiffy, i) = previous_tb; | ||
737 | } | ||
738 | } | 723 | } |
739 | } | 724 | } |
740 | #endif | 725 | #endif |