Updated TODO tags and struct hfi1_user_sdma_pkt_q

This commit is contained in:
Aram Santogidis
2017-08-02 09:46:42 +09:00
committed by Balazs Gerofi
parent 64e2639adc
commit 5cf884ef41
3 changed files with 17 additions and 9 deletions

View File

@ -93,7 +93,7 @@ struct iowait_work {
#ifdef __HFI1_ORIG__ #ifdef __HFI1_ORIG__
struct work_struct iowork; struct work_struct iowork;
#else #else
//TODO: //TODO: iowait_work
#endif /* __HFI1_ORIG__ */ #endif /* __HFI1_ORIG__ */
struct list_head tx_head; struct list_head tx_head;
struct iowait *iow; struct iowait *iow;
@ -151,7 +151,7 @@ struct iowait {
wait_queue_head_t wait_dma; wait_queue_head_t wait_dma;
wait_queue_head_t wait_pio; wait_queue_head_t wait_pio;
#else #else
//TODO: //TODO: wait
#endif /* __HFI1_ORIG__ */ #endif /* __HFI1_ORIG__ */
atomic_t sdma_busy; atomic_t sdma_busy;
atomic_t pio_busy; atomic_t pio_busy;

View File

@ -124,7 +124,7 @@ struct hfi1_user_sdma_pkt_q {
#ifdef __HFI1_ORIG__ #ifdef __HFI1_ORIG__
struct kmem_cache *txreq_cache; struct kmem_cache *txreq_cache;
#else #else
void *txreq_cache; //unused void *unused0;
#endif /* __HFI1_ORIG__ */ #endif /* __HFI1_ORIG__ */
struct user_sdma_request *reqs; struct user_sdma_request *reqs;
unsigned long *req_in_use; unsigned long *req_in_use;
@ -132,12 +132,20 @@ struct hfi1_user_sdma_pkt_q {
unsigned state; unsigned state;
#ifdef __HFI1_ORIG__ #ifdef __HFI1_ORIG__
wait_queue_head_t wait; wait_queue_head_t wait;
#else
//TODO: hfi1_user_sdma_pkt_q
#endif /* __HFI1_ORIG__ */
unsigned long unpinned; unsigned long unpinned;
#ifdef __HFI1_ORIG__
struct mmu_rb_handler *handler; struct mmu_rb_handler *handler;
#else
void *unused1;
#endif /* __HFI1_ORIG__ */
atomic_t n_locked; atomic_t n_locked;
#ifdef __HFI1_ORIG__
struct mm_struct *mm; struct mm_struct *mm;
#else #else
//TODO: void *unused2;
#endif /* __HFI1_ORIG__ */ #endif /* __HFI1_ORIG__ */
}; };

View File

@ -758,7 +758,7 @@ int hfi1_user_sdma_process_request(void *private_data, struct iovec *iovec,
dlid = be16_to_cpu(req->hdr.lrh[1]); dlid = be16_to_cpu(req->hdr.lrh[1]);
selector = dlid_to_selector(dlid); selector = dlid_to_selector(dlid);
selector += uctxt->ctxt + fd->subctxt; selector += uctxt->ctxt + fd->subctxt;
/* TODO: check the rcu stuff */ /* TODO: sdma_select_user_engine check the rcu stuff */
//req->sde = sdma_select_user_engine(dd, selector, vl); //req->sde = sdma_select_user_engine(dd, selector, vl);
if (!req->sde || !sdma_running(req->sde)) { if (!req->sde || !sdma_running(req->sde)) {
@ -947,7 +947,7 @@ static int user_sdma_send_pkts(struct user_sdma_request *req, unsigned maxpkts)
set_bit(SDMA_REQ_DONE_ERROR, &req->flags); set_bit(SDMA_REQ_DONE_ERROR, &req->flags);
return -EFAULT; return -EFAULT;
} }
//TODO: kmem_cache_alloc
#ifdef __HFI1_ORIG__ #ifdef __HFI1_ORIG__
tx = kmem_cache_alloc(pq->txreq_cache, GFP_KERNEL); tx = kmem_cache_alloc(pq->txreq_cache, GFP_KERNEL);
#else #else
@ -1600,7 +1600,7 @@ static inline void pq_update(struct hfi1_user_sdma_pkt_q *pq)
{ {
if (atomic_dec_and_test(&pq->n_reqs)) { if (atomic_dec_and_test(&pq->n_reqs)) {
xchg(&pq->state, SDMA_PKT_Q_INACTIVE); xchg(&pq->state, SDMA_PKT_Q_INACTIVE);
//TODO: wake_up //TODO: pq_update wake_up
//wake_up(&pq->wait); //wake_up(&pq->wait);
} }
} }
@ -1630,7 +1630,7 @@ static void user_sdma_free_request(struct user_sdma_request *req, bool unpin)
if (!node) if (!node)
continue; continue;
//TODO: //TODO: hfi1_mmu_rb_remove
#ifdef __HFI1_ORIG__ #ifdef __HFI1_ORIG__
if (unpin) if (unpin)
hfi1_mmu_rb_remove(req->pq->handler, hfi1_mmu_rb_remove(req->pq->handler,