dtl.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef _ASM_POWERPC_DTL_H
  2. #define _ASM_POWERPC_DTL_H
  3. #include <asm/lppaca.h>
  4. #include <linux/spinlock_types.h>
  5. /*
  6. * Layout of entries in the hypervisor's dispatch trace log buffer.
  7. */
  8. struct dtl_entry {
  9. u8 dispatch_reason;
  10. u8 preempt_reason;
  11. __be16 processor_id;
  12. __be32 enqueue_to_dispatch_time;
  13. __be32 ready_to_enqueue_time;
  14. __be32 waiting_to_ready_time;
  15. __be64 timebase;
  16. __be64 fault_addr;
  17. __be64 srr0;
  18. __be64 srr1;
  19. };
  20. #define DISPATCH_LOG_BYTES 4096 /* bytes per cpu */
  21. #define N_DISPATCH_LOG (DISPATCH_LOG_BYTES / sizeof(struct dtl_entry))
  22. /*
  23. * Dispatch trace log event enable mask:
  24. * 0x1: voluntary virtual processor waits
  25. * 0x2: time-slice preempts
  26. * 0x4: virtual partition memory page faults
  27. */
  28. #define DTL_LOG_CEDE 0x1
  29. #define DTL_LOG_PREEMPT 0x2
  30. #define DTL_LOG_FAULT 0x4
  31. #define DTL_LOG_ALL (DTL_LOG_CEDE | DTL_LOG_PREEMPT | DTL_LOG_FAULT)
  32. extern struct kmem_cache *dtl_cache;
  33. extern rwlock_t dtl_access_lock;
  34. extern void register_dtl_buffer(int cpu);
  35. extern void alloc_dtl_buffers(unsigned long *time_limit);
  36. extern long hcall_vphn(unsigned long cpu, u64 flags, __be32 *associativity);
  37. #endif /* _ASM_POWERPC_DTL_H */