stacktrace.c 822 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Stack trace support for Microblaze.
  3. *
  4. * Copyright (C) 2009 Michal Simek <monstr@monstr.eu>
  5. * Copyright (C) 2009 PetaLogix
  6. *
  7. * This file is subject to the terms and conditions of the GNU General Public
  8. * License. See the file "COPYING" in the main directory of this archive
  9. * for more details.
  10. */
  11. #include <linux/export.h>
  12. #include <linux/sched.h>
  13. #include <linux/stacktrace.h>
  14. #include <linux/thread_info.h>
  15. #include <linux/ptrace.h>
  16. #include <asm/unwind.h>
  17. void save_stack_trace(struct stack_trace *trace)
  18. {
  19. /* Exclude our helper functions from the trace*/
  20. trace->skip += 2;
  21. microblaze_unwind(NULL, trace);
  22. }
  23. EXPORT_SYMBOL_GPL(save_stack_trace);
  24. void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
  25. {
  26. microblaze_unwind(tsk, trace);
  27. }
  28. EXPORT_SYMBOL_GPL(save_stack_trace_tsk);