]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc: Replace per_cpu(, smp_processor_id()) with __get_cpu_var()
authorAnton Blanchard <anton@samba.org>
Wed, 13 Jan 2010 12:04:11 +0000 (12:04 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 3 Feb 2010 06:39:48 +0000 (17:39 +1100)
The cputime code has a few places that do per_cpu(, smp_processor_id()).
Replace them with __get_cpu_var().

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/cputime.h
arch/powerpc/kernel/time.c

index fa19f3fe05ff95cf8a6b9e4e89c2d4d7dcbd7c57..8bdc6a9e57733109eb75ec47d664cd37be22e94f 100644 (file)
@@ -73,10 +73,9 @@ static inline unsigned long cputime_to_jiffies(const cputime_t ct)
 static inline cputime_t cputime_to_scaled(const cputime_t ct)
 {
        if (cpu_has_feature(CPU_FTR_SPURR) &&
-           per_cpu(cputime_last_delta, smp_processor_id()))
-               return ct *
-                       per_cpu(cputime_scaled_last_delta, smp_processor_id())/
-                       per_cpu(cputime_last_delta, smp_processor_id());
+           __get_cpu_var(cputime_last_delta))
+               return ct * __get_cpu_var(cputime_scaled_last_delta) /
+                           __get_cpu_var(cputime_last_delta);
        return ct;
 }
 
index 6c6093d67f30e7ae9137192410258a1568715441..0a5b1081a50ea9d536805347003353506d953c82 100644 (file)
@@ -265,8 +265,8 @@ void account_system_vtime(struct task_struct *tsk)
                account_system_time(tsk, 0, delta, deltascaled);
        else
                account_idle_time(delta);
-       per_cpu(cputime_last_delta, smp_processor_id()) = delta;
-       per_cpu(cputime_scaled_last_delta, smp_processor_id()) = deltascaled;
+       __get_cpu_var(cputime_last_delta) = delta;
+       __get_cpu_var(cputime_scaled_last_delta) = deltascaled;
        local_irq_restore(flags);
 }
 EXPORT_SYMBOL_GPL(account_system_vtime);