summaryrefslogtreecommitdiff
path: root/include/linux/mhi_ep.h
diff options
context:
space:
mode:
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2023-10-18 17:58:12 +0530
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2023-12-14 11:58:45 +0530
commit62210a26cd4f8ad52683a71c0226dfe85de1144d (patch)
tree90a1ccbfe35a9f8d31dab080560217bc66e05293 /include/linux/mhi_ep.h
parenteff9704f5332a13b08fbdbe0f84059c9e7051d5f (diff)
bus: mhi: ep: Use slab allocator where applicable
Use slab allocator for allocating the memory for objects used frequently and are of fixed size. This reduces the overheard associated with kmalloc(). Suggested-by: Alex Elder <elder@linaro.org> Link: https://lore.kernel.org/r/20231018122812.47261-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Diffstat (limited to 'include/linux/mhi_ep.h')
-rw-r--r--include/linux/mhi_ep.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mhi_ep.h b/include/linux/mhi_ep.h
index f198a8ac7ee7..ce85d42b685d 100644
--- a/include/linux/mhi_ep.h
+++ b/include/linux/mhi_ep.h
@@ -128,6 +128,9 @@ struct mhi_ep_cntrl {
struct work_struct reset_work;
struct work_struct cmd_ring_work;
struct work_struct ch_ring_work;
+ struct kmem_cache *ring_item_cache;
+ struct kmem_cache *ev_ring_el_cache;
+ struct kmem_cache *tre_buf_cache;
void (*raise_irq)(struct mhi_ep_cntrl *mhi_cntrl, u32 vector);
int (*alloc_map)(struct mhi_ep_cntrl *mhi_cntrl, u64 pci_addr, phys_addr_t *phys_ptr,