Real run test version (update_tail, kregbase+offset crash)
This commit is contained in:
committed by
Balazs Gerofi
parent
640dba627f
commit
7f03c18d4d
@@ -2371,8 +2371,6 @@ static inline u16 submit_tx(struct sdma_engine *sde, struct sdma_txreq *tx)
|
||||
for (i = 1; i < tx->num_desc; i++, descp++) {
|
||||
u64 qw1;
|
||||
TP("submitting descs qw[0] = %lu, qw[1] = %lu \n", descp->qw[0], descp->qw[1]);
|
||||
}
|
||||
#ifdef __HFI1_ORIG__
|
||||
sde->descq[tail].qw[0] = cpu_to_le64(descp->qw[0]);
|
||||
if (skip) {
|
||||
/* edits don't have generation */
|
||||
@@ -2396,11 +2394,9 @@ static inline u16 submit_tx(struct sdma_engine *sde, struct sdma_txreq *tx)
|
||||
#endif
|
||||
sde->tx_ring[sde->tx_tail++ & sde->sdma_mask] = tx;
|
||||
sde->desc_avail -= tx->num_desc;
|
||||
TP("-");
|
||||
hfi1_cdbg(AIOWRITE, "-");
|
||||
return tail;
|
||||
#endif /* __HFI1_ORIG__ */
|
||||
TP("-");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2539,10 +2535,9 @@ int sdma_send_txlist(struct sdma_engine *sde, struct iowait_work *wait,
|
||||
u32 submit_count = 0, flush_count = 0, total_count;
|
||||
TP("+");
|
||||
hfi1_cdbg(AIOWRITE, "+");
|
||||
spin_lock_irqsave(&sde->tail_lock, flags);
|
||||
// spin_lock_irqsave(&sde->tail_lock, flags);
|
||||
retry:
|
||||
list_for_each_entry_safe(tx, tx_next, tx_list, list) {
|
||||
#ifdef __HFI1_ORIG__
|
||||
tx->wait = iowait_ioww_to_iow(wait);
|
||||
if (unlikely(!__sdma_running(sde)))
|
||||
goto unlock_noconn;
|
||||
@@ -2552,32 +2547,31 @@ retry:
|
||||
ret = -EINVAL;
|
||||
goto update_tail;
|
||||
}
|
||||
#endif /* __HFI1_ORIG__ */
|
||||
list_del_init(&tx->list);
|
||||
tail = submit_tx(sde, tx);
|
||||
submit_count++;
|
||||
#ifdef __HFI1_ORIG__
|
||||
if (tail != INVALID_TAIL &&
|
||||
(submit_count & SDMA_TAIL_UPDATE_THRESH) == 0) {
|
||||
sdma_update_tail(sde, tail);
|
||||
tail = INVALID_TAIL;
|
||||
}
|
||||
#endif /* __HFI1_ORIG__ */
|
||||
}
|
||||
update_tail:
|
||||
TP("+ update_tail:");
|
||||
total_count = submit_count + flush_count;
|
||||
#ifdef __HFI1_ORIG__
|
||||
if (wait)
|
||||
iowait_sdma_add(iowait_ioww_to_iow(wait), total_count);
|
||||
#endif /* __HFI1_ORIG__ */
|
||||
if (tail != INVALID_TAIL)
|
||||
sdma_update_tail(sde, tail);
|
||||
#endif /* __HFI1_ORIG__ */
|
||||
spin_unlock_irqrestore(&sde->tail_lock, flags);
|
||||
// spin_unlock_irqrestore(&sde->tail_lock, flags);
|
||||
*count_out = total_count;
|
||||
hfi1_cdbg(AIOWRITE, "-");
|
||||
TP("-");
|
||||
return ret;
|
||||
unlock_noconn:
|
||||
TP("+ unlock_noconn:");
|
||||
spin_lock(&sde->flushlist_lock);
|
||||
list_for_each_entry_safe(tx, tx_next, tx_list, list) {
|
||||
tx->wait = iowait_ioww_to_iow(wait);
|
||||
@@ -2597,6 +2591,7 @@ unlock_noconn:
|
||||
ret = -ECOMM;
|
||||
goto update_tail;
|
||||
nodesc:
|
||||
TP("+ nodesc:");
|
||||
ret = sdma_check_progress(sde, wait, tx);
|
||||
if (ret == -EAGAIN) {
|
||||
ret = 0;
|
||||
|
||||
Reference in New Issue
Block a user