hv-gpci.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef LINUX_POWERPC_PERF_HV_GPCI_H_
  2. #define LINUX_POWERPC_PERF_HV_GPCI_H_
  3. #include <linux/types.h>
  4. /* From the document "H_GetPerformanceCounterInfo Interface" v1.07 */
  5. /* H_GET_PERF_COUNTER_INFO argument */
  6. struct hv_get_perf_counter_info_params {
  7. __be32 counter_request; /* I */
  8. __be32 starting_index; /* IO */
  9. __be16 secondary_index; /* IO */
  10. __be16 returned_values; /* O */
  11. __be32 detail_rc; /* O, only needed when called via *_norets() */
  12. /*
  13. * O, size each of counter_value element in bytes, only set for version
  14. * >= 0x3
  15. */
  16. __be16 cv_element_size;
  17. /* I, 0 (zero) for versions < 0x3 */
  18. __u8 counter_info_version_in;
  19. /* O, 0 (zero) if version < 0x3. Must be set to 0 when making hcall */
  20. __u8 counter_info_version_out;
  21. __u8 reserved[0xC];
  22. __u8 counter_value[];
  23. } __packed;
  24. /*
  25. * counter info version => fw version/reference (spec version)
  26. *
  27. * 8 => power8 (1.07)
  28. * [7 is skipped by spec 1.07]
  29. * 6 => TLBIE (1.07)
  30. * 5 => v7r7m0.phyp (1.05)
  31. * [4 skipped]
  32. * 3 => v7r6m0.phyp (?)
  33. * [1,2 skipped]
  34. * 0 => v7r{2,3,4}m0.phyp (?)
  35. */
  36. #define COUNTER_INFO_VERSION_CURRENT 0x8
  37. /* capability mask masks. */
  38. enum {
  39. HV_GPCI_CM_GA = (1 << 7),
  40. HV_GPCI_CM_EXPANDED = (1 << 6),
  41. HV_GPCI_CM_LAB = (1 << 5)
  42. };
  43. #define REQUEST_FILE "../hv-gpci-requests.h"
  44. #define NAME_LOWER hv_gpci
  45. #define NAME_UPPER HV_GPCI
  46. #include "req-gen/perf.h"
  47. #undef REQUEST_FILE
  48. #undef NAME_LOWER
  49. #undef NAME_UPPER
  50. #endif