op_impl.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /**
  2. * @file arch/alpha/oprofile/op_impl.h
  3. *
  4. * @remark Copyright 2002 OProfile authors
  5. * @remark Read the file COPYING
  6. *
  7. * @author Richard Henderson <rth@twiddle.net>
  8. */
  9. #ifndef OP_IMPL_H
  10. #define OP_IMPL_H 1
  11. /* Per-counter configuration as set via oprofilefs. */
  12. struct op_counter_config {
  13. unsigned long enabled;
  14. unsigned long event;
  15. unsigned long count;
  16. /* Dummies because I am too lazy to hack the userspace tools. */
  17. unsigned long kernel;
  18. unsigned long user;
  19. unsigned long unit_mask;
  20. };
  21. /* System-wide configuration as set via oprofilefs. */
  22. struct op_system_config {
  23. unsigned long enable_pal;
  24. unsigned long enable_kernel;
  25. unsigned long enable_user;
  26. };
  27. /* Cached values for the various performance monitoring registers. */
  28. struct op_register_config {
  29. unsigned long enable;
  30. unsigned long mux_select;
  31. unsigned long proc_mode;
  32. unsigned long freq;
  33. unsigned long reset_values;
  34. unsigned long need_reset;
  35. };
  36. /* Per-architecture configuration and hooks. */
  37. struct op_axp_model {
  38. void (*reg_setup) (struct op_register_config *,
  39. struct op_counter_config *,
  40. struct op_system_config *);
  41. void (*cpu_setup) (void *);
  42. void (*reset_ctr) (struct op_register_config *, unsigned long);
  43. void (*handle_interrupt) (unsigned long, struct pt_regs *,
  44. struct op_counter_config *);
  45. char *cpu_type;
  46. unsigned char num_counters;
  47. unsigned char can_set_proc_mode;
  48. };
  49. #endif