Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8b5621f183f7e56958b0a0aae689af5af2efeda7
Commit:     8b5621f183f7e56958b0a0aae689af5af2efeda7
Parent:     c481887f2b74f87f714e2b76b8b834e57912bd0a
Author:     Milton Miller <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 14 15:52:10 2007 +1100
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Thu Dec 20 16:15:39 2007 +1100

    [POWERPC] Use __get_cpu_var in time.c
    
    Use __get_cpu_var(x) instead of per_cpu(x, smp_processor_id()), as it
    is optimized on ppc64 to access the current cpu's per-cpu offset directly;
    it's local_paca.offset instead of 
TOC->paca[local_paca->processor_id].offset.
    
    This is the trivial portion, two functions with one use each.
    
    Signed-off-by: Milton Miller <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/kernel/time.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index cc82fd6..888c657 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -327,7 +327,7 @@ void calculate_steal_time(void)
 
        if (!cpu_has_feature(CPU_FTR_PURR))
                return;
-       pme = &per_cpu(cpu_purr_data, smp_processor_id());
+       pme = &__get_cpu_var(cpu_purr_data);
        if (!pme->initialized)
                return;         /* this can happen in early boot */
        tb = mftb();
@@ -352,7 +352,7 @@ static void snapshot_purr(void)
        if (!cpu_has_feature(CPU_FTR_PURR))
                return;
        local_irq_save(flags);
-       pme = &per_cpu(cpu_purr_data, smp_processor_id());
+       pme = &__get_cpu_var(cpu_purr_data);
        pme->tb = mftb();
        pme->purr = mfspr(SPRN_PURR);
        pme->initialized = 1;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to