Skip to content

Commit

Permalink
dmaengine: idxd: Add wq private data accessors
Browse files Browse the repository at this point in the history
Add the accessors idxd_wq_set_private() and idxd_wq_get_private()
allowing users to set and retrieve a private void * associated with an
idxd_wq.

The private data is stored in the idxd_dev.conf_dev associated with
each idxd_wq.

Signed-off-by: Tom Zanussi <[email protected]>
Reviewed-by: Fenghua Yu <[email protected]>
Acked-by: Vinod Koul <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
tzanussi authored and herbertx committed Dec 15, 2023
1 parent 86d3a34 commit 786d0e7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/dma/idxd/idxd.h
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,16 @@ static inline int idxd_wq_refcount(struct idxd_wq *wq)
return wq->client_count;
};

static inline void idxd_wq_set_private(struct idxd_wq *wq, void *private)
{
dev_set_drvdata(wq_confdev(wq), private);
}

static inline void *idxd_wq_get_private(struct idxd_wq *wq)
{
return dev_get_drvdata(wq_confdev(wq));
}

/*
* Intel IAA does not support batch processing.
* The max batch size of device, max batch size of wq and
Expand Down

0 comments on commit 786d0e7

Please sign in to comment.