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
这个提交包含在:
@@ -688,8 +688,9 @@ static inline int check_x86_paddr(struct dp_soc *dp_soc, qdf_nbuf_t *rx_netbuf,
|
||||
* dp_rx_cookie_2_link_desc_va() - Converts cookie to a virtual address of
|
||||
* the MSDU Link Descriptor
|
||||
* @soc: core txrx main context
|
||||
* @buf_info: buf_info include cookie that used to lookup virtual address of
|
||||
* link descriptor Normally this is just an index into a per SOC array.
|
||||
* @buf_info: buf_info includes cookie that is used to lookup
|
||||
* virtual address of link descriptor after deriving the page id
|
||||
* and the offset or index of the desc on the associatde page.
|
||||
*
|
||||
* This is the VA of the link descriptor, that HAL layer later uses to
|
||||
* retrieve the list of MSDU's for a given MPDU.
|
||||
@@ -701,16 +702,16 @@ void *dp_rx_cookie_2_link_desc_va(struct dp_soc *soc,
|
||||
struct hal_buf_info *buf_info)
|
||||
{
|
||||
void *link_desc_va;
|
||||
uint32_t bank_id = LINK_DESC_COOKIE_BANK_ID(buf_info->sw_cookie);
|
||||
|
||||
|
||||
/* TODO */
|
||||
/* Add sanity for cookie */
|
||||
|
||||
link_desc_va = soc->link_desc_banks[bank_id].base_vaddr +
|
||||
(buf_info->paddr -
|
||||
soc->link_desc_banks[bank_id].base_paddr);
|
||||
struct qdf_mem_multi_page_t *pages;
|
||||
uint16_t page_id = LINK_DESC_COOKIE_PAGE_ID(buf_info->sw_cookie);
|
||||
|
||||
pages = &soc->link_desc_pages;
|
||||
if (!pages)
|
||||
return NULL;
|
||||
if (qdf_unlikely(page_id >= pages->num_pages))
|
||||
return NULL;
|
||||
link_desc_va = pages->dma_pages[page_id].page_v_addr_start +
|
||||
(buf_info->paddr - pages->dma_pages[page_id].page_p_addr);
|
||||
return link_desc_va;
|
||||
}
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户