[Intel-gfx] [PATCH v2 2/5] drm: Add private data field to trace control block

Patrik Jakobsson patrik.jakobsson at linux.intel.com
Thu Jun 18 01:42:42 PDT 2015


This field can be used by the decode functions of a syscall. The main
usecase for now is to allow storing the driver name for drm devices
across the lifetime of a trace control block. This allows us to do the
driver identification once and reuse the information in all the decode
stages of the ioctl.

* defs.h: Add private data field in struct tcb

Signed-off-by: Patrik Jakobsson <patrik.jakobsson at linux.intel.com>
---
 defs.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/defs.h b/defs.h
index c02f810..5b0670e 100644
--- a/defs.h
+++ b/defs.h
@@ -266,6 +266,13 @@ struct tcb {
 	int u_error;		/* Error code */
 	long scno;		/* System call number */
 	long u_arg[MAX_ARGS];	/* System call arguments */
+
+	/*
+	 * Private data for the decoding functions of the syscall. TCB core does
+	 * _not_ handle allocation / deallocation of this data.
+	 */
+	void *priv_data;
+
 #if defined(LINUX_MIPSN32) || defined(X32)
 	long long ext_arg[MAX_ARGS];
 	long long u_lrval;	/* long long return value */
-- 
2.1.4



More information about the Intel-gfx mailing list