From ad42de859ff14c079e966e61cbcba85265b982e1 Mon Sep 17 00:00:00 2001 From: Michael Neuling Date: Fri, 24 Jun 2016 08:47:07 +0200 Subject: cxl: Add set and get private data to context struct This provides AFU drivers a means to associate private data with a cxl context. This is particularly intended for make the new callbacks for driver specific events easier for AFU drivers to use, as they can easily get back to any private data structures they may use. Signed-off-by: Michael Neuling Signed-off-by: Ian Munsie Signed-off-by: Philippe Bergheaud Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman --- include/misc/cxl.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/misc/cxl.h') diff --git a/include/misc/cxl.h b/include/misc/cxl.h index 17419f61e611..b6d040f31f76 100644 --- a/include/misc/cxl.h +++ b/include/misc/cxl.h @@ -85,6 +85,13 @@ struct cxl_context *cxl_dev_context_init(struct pci_dev *dev); */ int cxl_release_context(struct cxl_context *ctx); +/* + * Set and get private data associated with a context. Allows drivers to have a + * back pointer to some useful structure. + */ +int cxl_set_priv(struct cxl_context *ctx, void *priv); +void *cxl_get_priv(struct cxl_context *ctx); + /* * Allocate AFU interrupts for this context. num=0 will allocate the default * for this AFU as given in the AFU descriptor. This number doesn't include the -- cgit v1.2.3-59-g8ed1b