powerpc/pseries: Factor out DTL buffer allocation and registration routines
[linux-2.6-block.git] / arch / powerpc / include / asm / lppaca.h
index 7c23ce8a5a4c4fd405577e54a3b537fb14852ed7..a8ac2b8988d484b1c18df37bfaeba24ec7383fc8 100644 (file)
@@ -154,6 +154,17 @@ struct dtl_entry {
 #define DISPATCH_LOG_BYTES     4096    /* bytes per cpu */
 #define N_DISPATCH_LOG         (DISPATCH_LOG_BYTES / sizeof(struct dtl_entry))
 
+/*
+ * Dispatch trace log event enable mask:
+ *   0x1: voluntary virtual processor waits
+ *   0x2: time-slice preempts
+ *   0x4: virtual partition memory page faults
+ */
+#define DTL_LOG_CEDE           0x1
+#define DTL_LOG_PREEMPT                0x2
+#define DTL_LOG_FAULT          0x4
+#define DTL_LOG_ALL            (DTL_LOG_CEDE | DTL_LOG_PREEMPT | DTL_LOG_FAULT)
+
 extern struct kmem_cache *dtl_cache;
 
 /*
@@ -164,6 +175,9 @@ extern struct kmem_cache *dtl_cache;
  */
 extern void (*dtl_consumer)(struct dtl_entry *entry, u64 index);
 
+extern void register_dtl_buffer(int cpu);
+extern void alloc_dtl_buffers(void);
+
 #endif /* CONFIG_PPC_BOOK3S */
 #endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_LPPACA_H */