qcacmn: Break up DMA mem alloc for HW desc banks in multi pages

Break up the 2MB descriptor bank memory allocations for WBM
idle link ring. Use multiple page allocation and populate the
WBM idle link descriptor ring with physical addresses of each
DMA page allocated in the descriptor bank.
This is to ensure that no requests for contiguous memory
allocations are made that might result in allocation failures.

For MCL set the page size to 4KB and leave it to max_alloc_size
cfg ini param for WIN specific code.

Change-Id: Iec30321044827c0174366cc02df25a42d38309e0
CRs-Fixed: 2565817
This commit is contained in:
Nisha Menon
2019-12-05 17:36:41 -08:00
committed by nshrivas
parent 265b3cb98d
commit 3e5b005e4e
8 changed files with 193 additions and 212 deletions

View File

@@ -2054,4 +2054,34 @@ void dp_is_hw_dbs_enable(struct dp_soc *soc,
#if defined(WLAN_SUPPORT_RX_FISA)
void dp_rx_dump_fisa_table(struct dp_soc *soc);
#endif /* WLAN_SUPPORT_RX_FISA */
#ifdef MAX_ALLOC_PAGE_SIZE
/**
* dp_set_page_size() - Set the max page size for hw link desc.
* For MCL the page size is set to OS defined value and for WIN
* the page size is set to the max_alloc_size cfg ini
* param.
* This is to ensure that WIN gets contiguous memory allocations
* as per requirement.
* @pages: link desc page handle
* @max_alloc_size: max_alloc_size
*
* Return: None
*/
static inline
void dp_set_max_page_size(struct qdf_mem_multi_page_t *pages,
uint32_t max_alloc_size)
{
pages->page_size = qdf_page_size;
}
#else
static inline
void dp_set_max_page_size(struct qdf_mem_multi_page_t *pages,
uint32_t max_alloc_size)
{
pages->page_size = max_alloc_size;
}
#endif /* MAX_ALLOC_PAGE_SIZE */
#endif /* #ifndef _DP_INTERNAL_H_ */