diff options
author | Dave Jiang <dave.jiang@intel.com> | 2023-04-07 13:31:34 -0700 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-04-12 23:18:45 +0530 |
commit | c2f156bf168fb42cd6ecd0a8e2204dbe542b8516 (patch) | |
tree | 6235c17693d69f6f9fd45d35a451f20def17d059 /drivers/dma/idxd/idxd.h | |
parent | 2f30decd2f23a376d2ed73dfe4c601421edf501a (diff) | |
download | lwn-c2f156bf168fb42cd6ecd0a8e2204dbe542b8516.tar.gz lwn-c2f156bf168fb42cd6ecd0a8e2204dbe542b8516.zip |
dmaengine: idxd: create kmem cache for event log fault items
Add a kmem cache per device for allocating event log fault context. The
context allows an event log entry to be copied and passed to a software
workqueue to be processed. Due to each device can have different sized
event log entry depending on device type, it's not possible to have a
global kmem cache.
Tested-by: Tony Zhu <tony.zhu@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Co-developed-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link: https://lore.kernel.org/r/20230407203143.2189681-8-fenghua.yu@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/idxd/idxd.h')
-rw-r--r-- | drivers/dma/idxd/idxd.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h index 6e56361ae658..c5d99c179902 100644 --- a/drivers/dma/idxd/idxd.h +++ b/drivers/dma/idxd/idxd.h @@ -274,6 +274,15 @@ struct idxd_evl { u16 head; }; +struct idxd_evl_fault { + struct work_struct work; + struct idxd_wq *wq; + u8 status; + + /* make this last member always */ + struct __evl_entry entry[]; +}; + struct idxd_device { struct idxd_dev idxd_dev; struct idxd_driver_data *data; @@ -331,6 +340,7 @@ struct idxd_device { unsigned long *opcap_bmap; struct idxd_evl *evl; + struct kmem_cache *evl_cache; struct dentry *dbgfs_dir; struct dentry *dbgfs_evl_file; |