diff options
author | Milton Miller <miltonm@bga.com> | 2007-12-13 23:52:10 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-20 00:15:39 -0500 |
commit | 8b5621f183f7e56958b0a0aae689af5af2efeda7 (patch) | |
tree | 204cd5bc8d8bc2947d1de63d37b4d2837e1914df /arch/powerpc/kernel/time.c | |
parent | c481887f2b74f87f714e2b76b8b834e57912bd0a (diff) |
[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 <miltonm@bga.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/time.c')
-rw-r--r-- | 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 cc82fd675f91..888c65726ebd 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -327,7 +327,7 @@ void calculate_steal_time(void) | |||
327 | 327 | ||
328 | if (!cpu_has_feature(CPU_FTR_PURR)) | 328 | if (!cpu_has_feature(CPU_FTR_PURR)) |
329 | return; | 329 | return; |
330 | pme = &per_cpu(cpu_purr_data, smp_processor_id()); | 330 | pme = &__get_cpu_var(cpu_purr_data); |
331 | if (!pme->initialized) | 331 | if (!pme->initialized) |
332 | return; /* this can happen in early boot */ | 332 | return; /* this can happen in early boot */ |
333 | tb = mftb(); | 333 | tb = mftb(); |
@@ -352,7 +352,7 @@ static void snapshot_purr(void) | |||
352 | if (!cpu_has_feature(CPU_FTR_PURR)) | 352 | if (!cpu_has_feature(CPU_FTR_PURR)) |
353 | return; | 353 | return; |
354 | local_irq_save(flags); | 354 | local_irq_save(flags); |
355 | pme = &per_cpu(cpu_purr_data, smp_processor_id()); | 355 | pme = &__get_cpu_var(cpu_purr_data); |
356 | pme->tb = mftb(); | 356 | pme->tb = mftb(); |
357 | pme->purr = mfspr(SPRN_PURR); | 357 | pme->purr = mfspr(SPRN_PURR); |
358 | pme->initialized = 1; | 358 | pme->initialized = 1; |