]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
Merge branch 'core/stacktrace' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Jul 2008 17:31:35 +0000 (10:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Jul 2008 17:31:35 +0000 (10:31 -0700)
* 'core/stacktrace' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  generic-ipi: powerpc/generic-ipi tree build failure
  stacktrace: fix build failure on sparc64
  stacktrace: export save_stack_trace[_tsk]
  stacktrace: fix modular build, export print_stack_trace and save_stack_trace
  backtrace: replace timer with tasklet + completions
  stacktrace: add saved stack traces to backtrace self-test
  stacktrace: print_stack_trace() cleanup
  debugging: make stacktrace independent from DEBUG_KERNEL
  stacktrace: don't crash on invalid stack trace structs

1  2 
arch/arm/kernel/stacktrace.c
lib/Kconfig.debug

index 90e0c35ae60d24934b15fbd377c95ef3314c2c88,6b3ffde5deaa8e1edb5a772187a0a2618919aa8c..fc650f64df43ce00a83ad9f22e33e26b266d76ce
@@@ -65,31 -61,10 +65,32 @@@ void save_stack_trace_tsk(struct task_s
  
        data.trace = trace;
        data.skip = trace->skip;
 -      base = (unsigned long)task_stack_page(current);
 -      asm("mov %0, fp" : "=r" (fp));
 +      base = (unsigned long)task_stack_page(tsk);
 +
 +      if (tsk != current) {
 +#ifdef CONFIG_SMP
 +              /*
 +               * What guarantees do we have here that 'tsk'
 +               * is not running on another CPU?
 +               */
 +              BUG();
 +#else
 +              data.no_sched_functions = 1;
 +              fp = thread_saved_fp(tsk);
 +#endif
 +      } else {
 +              data.no_sched_functions = 0;
 +              asm("mov %0, fp" : "=r" (fp));
 +      }
  
        walk_stackframe(fp, base, base + THREAD_SIZE, save_trace, &data);
 +      if (trace->nr_entries < trace->max_entries)
 +              trace->entries[trace->nr_entries++] = ULONG_MAX;
 +}
 +
 +void save_stack_trace(struct stack_trace *trace)
 +{
 +      save_stack_trace_tsk(current, trace);
  }
+ EXPORT_SYMBOL_GPL(save_stack_trace);
  #endif
Simple merge