Lines Matching refs:cmdq_pages

56 #define CMDQ_BASE_VADDR(cmdq_pages, wq) \  argument
57 ((void *)((cmdq_pages)->page_vaddr) \
60 #define CMDQ_BASE_PADDR(cmdq_pages, wq) \ argument
61 ((cmdq_pages)->page_paddr \
64 #define CMDQ_BASE_ADDR(cmdq_pages, wq) \ argument
65 ((void *)((cmdq_pages)->shadow_page_vaddr) \
167 static int cmdq_allocate_page(struct hinic_cmdq_pages *cmdq_pages) in cmdq_allocate_page() argument
169 return queue_alloc_page(cmdq_pages->hwif, &cmdq_pages->page_vaddr, in cmdq_allocate_page()
170 &cmdq_pages->page_paddr, in cmdq_allocate_page()
171 &cmdq_pages->shadow_page_vaddr, in cmdq_allocate_page()
181 static void cmdq_free_page(struct hinic_cmdq_pages *cmdq_pages) in cmdq_free_page() argument
183 struct hinic_hwif *hwif = cmdq_pages->hwif; in cmdq_free_page()
187 cmdq_pages->page_vaddr, in cmdq_free_page()
188 (dma_addr_t)cmdq_pages->page_paddr); in cmdq_free_page()
189 vfree(cmdq_pages->shadow_page_vaddr); in cmdq_free_page()
601 int hinic_wqs_cmdq_alloc(struct hinic_cmdq_pages *cmdq_pages, in hinic_wqs_cmdq_alloc() argument
636 cmdq_pages->hwif = hwif; in hinic_wqs_cmdq_alloc()
638 err = cmdq_allocate_page(cmdq_pages); in hinic_wqs_cmdq_alloc()
657 wq[i].block_vaddr = CMDQ_BASE_VADDR(cmdq_pages, &wq[i]); in hinic_wqs_cmdq_alloc()
658 wq[i].shadow_block_vaddr = CMDQ_BASE_ADDR(cmdq_pages, &wq[i]); in hinic_wqs_cmdq_alloc()
659 wq[i].block_paddr = CMDQ_BASE_PADDR(cmdq_pages, &wq[i]); in hinic_wqs_cmdq_alloc()
661 err = alloc_wq_pages(&wq[i], cmdq_pages->hwif, in hinic_wqs_cmdq_alloc()
678 free_wq_pages(&wq[j], cmdq_pages->hwif, wq[j].num_q_pages); in hinic_wqs_cmdq_alloc()
680 cmdq_free_page(cmdq_pages); in hinic_wqs_cmdq_alloc()
690 void hinic_wqs_cmdq_free(struct hinic_cmdq_pages *cmdq_pages, in hinic_wqs_cmdq_free() argument
696 free_wq_pages(&wq[i], cmdq_pages->hwif, wq[i].num_q_pages); in hinic_wqs_cmdq_free()
698 cmdq_free_page(cmdq_pages); in hinic_wqs_cmdq_free()