qcacmn: try to allocate contiguous dma buffer

For some target like ROME, CE try to read more data than expected as
prefetch. For example in UDP TX case, when CE read a tx_desc(44 bytes)
located in host memory with SMMU mapped address 0x1025FFD4~0x1025FFFF,
SMMU will detect CE read beyond 0x1025FFFF to access 0x10260000. SMMU
fault will happen if 0x10260000 is not mapped to host memory.

To fix this issue, allocate contiguous dma buffer for all 1056 tx_descs,
which will map to contiguous SMMU address region.

CRs-Fixed: 3588459
Change-Id: Id0287b051f792f18d746baf39e1c66d076c9be3c
This commit is contained in:
Nijun Gong
2023-08-15 10:32:28 +08:00
کامیت شده توسط Rahul Choudhary
والد 8aa322295a
کامیت 4cadebf03f
2فایلهای تغییر یافته به همراه170 افزوده شده و 0 حذف شده

مشاهده پرونده

@@ -63,6 +63,7 @@ struct qdf_mem_dma_page_t {
* @cacheable_pages: page information storage in case of cacheable memory
* @page_size: page size
* @is_mem_prealloc: flag for multiple pages pre-alloc or not
* @contiguous_dma_pages: flag for contiguous dma pages or not
*/
struct qdf_mem_multi_page_t {
uint16_t num_element_per_page;
@@ -73,6 +74,9 @@ struct qdf_mem_multi_page_t {
#ifdef DP_MEM_PRE_ALLOC
uint8_t is_mem_prealloc;
#endif
#ifdef ALLOC_CONTIGUOUS_MULTI_PAGE
bool contiguous_dma_pages;
#endif
};