diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-11 16:22:43 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-11 16:22:43 -0400 |
| commit | 4f0ac854167846bd55cd81dbc9a36e03708aa01c (patch) | |
| tree | 0eb34d18a667f8e68ad9255f791560b028fed2a6 /arch/powerpc/mm/stab.c | |
| parent | b9356c53ba2f593081e5aa45eb67adcce243d1c0 (diff) | |
| parent | 6b58e7f146f8d79c08f62087f928e1f01747de71 (diff) | |
Merge branch 'perfcounters-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perfcounters-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (60 commits)
perf tools: Avoid unnecessary work in directory lookups
perf stat: Clean up statistics calculations a bit more
perf stat: More advanced variance computation
perf stat: Use stddev_mean in stead of stddev
perf stat: Remove the limit on repeat
perf stat: Change noise calculation to use stddev
x86, perf_counter, bts: Do not allow kernel BTS tracing for now
x86, perf_counter, bts: Correct pointer-to-u64 casts
x86, perf_counter, bts: Fail if BTS is not available
perf_counter: Fix output-sharing error path
perf trace: Fix read_string()
perf trace: Print out in nanoseconds
perf tools: Seek to the end of the header area
perf trace: Fix parsing of perf.data
perf trace: Sample timestamps as well
perf_counter: Introduce new (non-)paranoia level to allow raw tracepoint access
perf trace: Sample the CPU too
perf tools: Work around strict aliasing related warnings
perf tools: Clean up warnings list in the Makefile
perf tools: Complete support for dynamic strings
...
Diffstat (limited to 'arch/powerpc/mm/stab.c')
| -rw-r--r-- | arch/powerpc/mm/stab.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c index 98cd1dc2ae75..ab5fb48b3e90 100644 --- a/arch/powerpc/mm/stab.c +++ b/arch/powerpc/mm/stab.c | |||
| @@ -164,7 +164,7 @@ void switch_stab(struct task_struct *tsk, struct mm_struct *mm) | |||
| 164 | { | 164 | { |
| 165 | struct stab_entry *stab = (struct stab_entry *) get_paca()->stab_addr; | 165 | struct stab_entry *stab = (struct stab_entry *) get_paca()->stab_addr; |
| 166 | struct stab_entry *ste; | 166 | struct stab_entry *ste; |
| 167 | unsigned long offset = __get_cpu_var(stab_cache_ptr); | 167 | unsigned long offset; |
| 168 | unsigned long pc = KSTK_EIP(tsk); | 168 | unsigned long pc = KSTK_EIP(tsk); |
| 169 | unsigned long stack = KSTK_ESP(tsk); | 169 | unsigned long stack = KSTK_ESP(tsk); |
| 170 | unsigned long unmapped_base; | 170 | unsigned long unmapped_base; |
| @@ -172,6 +172,15 @@ void switch_stab(struct task_struct *tsk, struct mm_struct *mm) | |||
| 172 | /* Force previous translations to complete. DRENG */ | 172 | /* Force previous translations to complete. DRENG */ |
| 173 | asm volatile("isync" : : : "memory"); | 173 | asm volatile("isync" : : : "memory"); |
| 174 | 174 | ||
| 175 | /* | ||
| 176 | * We need interrupts hard-disabled here, not just soft-disabled, | ||
| 177 | * so that a PMU interrupt can't occur, which might try to access | ||
| 178 | * user memory (to get a stack trace) and possible cause an STAB miss | ||
| 179 | * which would update the stab_cache/stab_cache_ptr per-cpu variables. | ||
| 180 | */ | ||
| 181 | hard_irq_disable(); | ||
| 182 | |||
| 183 | offset = __get_cpu_var(stab_cache_ptr); | ||
| 175 | if (offset <= NR_STAB_CACHE_ENTRIES) { | 184 | if (offset <= NR_STAB_CACHE_ENTRIES) { |
| 176 | int i; | 185 | int i; |
| 177 | 186 | ||
