0001 #ifndef _ASM_POWERPC_DTL_H
0002 #define _ASM_POWERPC_DTL_H
0003
0004 #include <asm/lppaca.h>
0005 #include <linux/spinlock_types.h>
0006
0007
0008
0009
0010 struct dtl_entry {
0011 u8 dispatch_reason;
0012 u8 preempt_reason;
0013 __be16 processor_id;
0014 __be32 enqueue_to_dispatch_time;
0015 __be32 ready_to_enqueue_time;
0016 __be32 waiting_to_ready_time;
0017 __be64 timebase;
0018 __be64 fault_addr;
0019 __be64 srr0;
0020 __be64 srr1;
0021 };
0022
0023 #define DISPATCH_LOG_BYTES 4096
0024 #define N_DISPATCH_LOG (DISPATCH_LOG_BYTES / sizeof(struct dtl_entry))
0025
0026
0027
0028
0029
0030
0031
0032 #define DTL_LOG_CEDE 0x1
0033 #define DTL_LOG_PREEMPT 0x2
0034 #define DTL_LOG_FAULT 0x4
0035 #define DTL_LOG_ALL (DTL_LOG_CEDE | DTL_LOG_PREEMPT | DTL_LOG_FAULT)
0036
0037 extern struct kmem_cache *dtl_cache;
0038 extern rwlock_t dtl_access_lock;
0039
0040
0041
0042
0043
0044
0045
0046 extern void (*dtl_consumer)(struct dtl_entry *entry, u64 index);
0047
0048 extern void register_dtl_buffer(int cpu);
0049 extern void alloc_dtl_buffers(unsigned long *time_limit);
0050 extern long hcall_vphn(unsigned long cpu, u64 flags, __be32 *associativity);
0051
0052 #endif