1 #ifndef _ASM_POWERPC_DTL_H
2 #define _ASM_POWERPC_DTL_H
4 #include <asm/lppaca.h>
5 #include <linux/spinlock_types.h>
8 * Layout of entries in the hypervisor's dispatch trace log buffer.
14 __be32 enqueue_to_dispatch_time
;
15 __be32 ready_to_enqueue_time
;
16 __be32 waiting_to_ready_time
;
23 #define DISPATCH_LOG_BYTES 4096 /* bytes per cpu */
24 #define N_DISPATCH_LOG (DISPATCH_LOG_BYTES / sizeof(struct dtl_entry))
27 * Dispatch trace log event enable mask:
28 * 0x1: voluntary virtual processor waits
29 * 0x2: time-slice preempts
30 * 0x4: virtual partition memory page faults
32 #define DTL_LOG_CEDE 0x1
33 #define DTL_LOG_PREEMPT 0x2
34 #define DTL_LOG_FAULT 0x4
35 #define DTL_LOG_ALL (DTL_LOG_CEDE | DTL_LOG_PREEMPT | DTL_LOG_FAULT)
37 extern struct kmem_cache
*dtl_cache
;
38 extern rwlock_t dtl_access_lock
;
41 * When CONFIG_VIRT_CPU_ACCOUNTING_NATIVE = y, the cpu accounting code controls
42 * reading from the dispatch trace log. If other code wants to consume
43 * DTL entries, it can set this pointer to a function that will get
44 * called once for each DTL entry that gets processed.
46 extern void (*dtl_consumer
)(struct dtl_entry
*entry
, u64 index
);
48 extern void register_dtl_buffer(int cpu
);
49 extern void alloc_dtl_buffers(unsigned long *time_limit
);
50 extern long hcall_vphn(unsigned long cpu
, u64 flags
, __be32
*associativity
);
52 #endif /* _ASM_POWERPC_DTL_H */