init.c 525 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * @file init.c
  3. *
  4. * @remark Copyright 2004 Oprofile Authors
  5. * @remark Read the file COPYING
  6. *
  7. * @author Zwane Mwaikambo
  8. */
  9. #include <linux/oprofile.h>
  10. #include <linux/init.h>
  11. #include <linux/errno.h>
  12. #include "op_arm_model.h"
  13. int __init oprofile_arch_init(struct oprofile_operations *ops)
  14. {
  15. int ret = -ENODEV;
  16. #ifdef CONFIG_CPU_XSCALE
  17. ret = pmu_init(ops, &op_xscale_spec);
  18. #endif
  19. ops->backtrace = arm_backtrace;
  20. return ret;
  21. }
  22. void oprofile_arch_exit(void)
  23. {
  24. #ifdef CONFIG_CPU_XSCALE
  25. pmu_exit();
  26. #endif
  27. }