summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/misc/cxl/cxl.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/misc/cxl/cxl.h')
-rw-r--r--kernel/drivers/misc/cxl/cxl.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/drivers/misc/cxl/cxl.h b/kernel/drivers/misc/cxl/cxl.h
index 0cfb9c129..a521bc72c 100644
--- a/kernel/drivers/misc/cxl/cxl.h
+++ b/kernel/drivers/misc/cxl/cxl.h
@@ -403,6 +403,18 @@ struct cxl_afu {
bool enabled;
};
+/* AFU refcount management */
+static inline struct cxl_afu *cxl_afu_get(struct cxl_afu *afu)
+{
+
+ return (get_device(&afu->dev) == NULL) ? NULL : afu;
+}
+
+static inline void cxl_afu_put(struct cxl_afu *afu)
+{
+ put_device(&afu->dev);
+}
+
struct cxl_irq_name {
struct list_head list;
@@ -433,6 +445,9 @@ struct cxl_context {
unsigned int sst_size, sst_lru;
wait_queue_head_t wq;
+ /* pid of the group leader associated with the pid */
+ struct pid *glpid;
+ /* use mm context associated with this pid for ds faults */
struct pid *pid;
spinlock_t lock; /* Protects pending_irq_mask, pending_fault and fault_addr */
/* Only used in PR mode */