diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/cputime.h | 7 | ||||
-rw-r--r-- | arch/powerpc/kernel/time.c | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h index fa19f3fe05ff..8bdc6a9e5773 100644 --- a/arch/powerpc/include/asm/cputime.h +++ b/arch/powerpc/include/asm/cputime.h | |||
@@ -73,10 +73,9 @@ static inline unsigned long cputime_to_jiffies(const cputime_t ct) | |||
73 | static inline cputime_t cputime_to_scaled(const cputime_t ct) | 73 | static inline cputime_t cputime_to_scaled(const cputime_t ct) |
74 | { | 74 | { |
75 | if (cpu_has_feature(CPU_FTR_SPURR) && | 75 | if (cpu_has_feature(CPU_FTR_SPURR) && |
76 | per_cpu(cputime_last_delta, smp_processor_id())) | 76 | __get_cpu_var(cputime_last_delta)) |
77 | return ct * | 77 | return ct * __get_cpu_var(cputime_scaled_last_delta) / |
78 | per_cpu(cputime_scaled_last_delta, smp_processor_id())/ | 78 | __get_cpu_var(cputime_last_delta); |
79 | per_cpu(cputime_last_delta, smp_processor_id()); | ||
80 | return ct; | 79 | return ct; |
81 | } | 80 | } |
82 | 81 | ||
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 6c6093d67f30..0a5b1081a50e 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -265,8 +265,8 @@ void account_system_vtime(struct task_struct *tsk) | |||
265 | account_system_time(tsk, 0, delta, deltascaled); | 265 | account_system_time(tsk, 0, delta, deltascaled); |
266 | else | 266 | else |
267 | account_idle_time(delta); | 267 | account_idle_time(delta); |
268 | per_cpu(cputime_last_delta, smp_processor_id()) = delta; | 268 | __get_cpu_var(cputime_last_delta) = delta; |
269 | per_cpu(cputime_scaled_last_delta, smp_processor_id()) = deltascaled; | 269 | __get_cpu_var(cputime_scaled_last_delta) = deltascaled; |
270 | local_irq_restore(flags); | 270 | local_irq_restore(flags); |
271 | } | 271 | } |
272 | EXPORT_SYMBOL_GPL(account_system_vtime); | 272 | EXPORT_SYMBOL_GPL(account_system_vtime); |