Skip to content

Commit

Permalink
[S390] qdio: remove enhanced SIGA
Browse files Browse the repository at this point in the history
HiperSocket devices only use one SBAL per qdio call without the enhanced SIGA
feature. Since that feature is currently not used remove it from the qdio code
so the compiler can generate better code for the HiperSocket outbound path.
While at it mark the SIGA error conditions as unlikely.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Jan Glauber authored and Martin Schwidefsky committed Jan 5, 2011
1 parent 958c0ba commit 110da31
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 44 deletions.
2 changes: 0 additions & 2 deletions drivers/s390/cio/qdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,6 @@ struct qdio_input_q {
struct qdio_output_q {
/* PCIs are enabled for the queue */
int pci_out_enabled;
/* IQDIO: output multiple buffers (enhanced SIGA) */
int use_enh_siga;
/* timer to check for more outbound work */
struct timer_list timer;
/* used SBALs before tasklet schedule */
Expand Down
57 changes: 15 additions & 42 deletions drivers/s390/cio/qdio_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ static inline int qdio_siga_sync(struct qdio_q *q, unsigned int output,
}

cc = do_siga_sync(schid, output, input, fc);
if (cc)
if (unlikely(cc))
DBF_ERROR("%4x SIGA-S:%2d", SCH_NO(q), cc);
return cc;
}
Expand Down Expand Up @@ -328,9 +328,6 @@ static int qdio_siga_output(struct qdio_q *q, unsigned int *busy_bit)
u64 start_time = 0;
int cc;

if (q->u.out.use_enh_siga)
fc = 3;

if (is_qebsm(q)) {
schid = q->irq_ptr->sch_token;
fc |= QDIO_SIGA_QEBSM_FLAG;
Expand All @@ -339,7 +336,7 @@ static int qdio_siga_output(struct qdio_q *q, unsigned int *busy_bit)
cc = do_siga_output(schid, q->mask, busy_bit, fc);

/* hipersocket busy condition */
if (*busy_bit) {
if (unlikely(*busy_bit)) {
WARN_ON(queue_type(q) != QDIO_IQDIO_QFMT || cc != 2);

if (!start_time) {
Expand Down Expand Up @@ -367,7 +364,7 @@ static inline int qdio_siga_input(struct qdio_q *q)
}

cc = do_siga_input(schid, q->mask, fc);
if (cc)
if (unlikely(cc))
DBF_ERROR("%4x SIGA-R:%2d", SCH_NO(q), cc);
return cc;
}
Expand Down Expand Up @@ -1288,7 +1285,6 @@ int qdio_establish(struct qdio_initialize *init_data)
}

qdio_setup_ssqd_info(irq_ptr);
DBF_EVENT("qDmmwc:%2x", irq_ptr->ssqd_desc.mmwc);
DBF_EVENT("qib ac:%4x", irq_ptr->qib.ac);

/* qebsm is now setup if available, initialize buffer states */
Expand Down Expand Up @@ -1466,48 +1462,25 @@ static int handle_outbound(struct qdio_q *q, unsigned int callflags,
if (callflags & QDIO_FLAG_PCI_OUT) {
q->u.out.pci_out_enabled = 1;
qperf_inc(q, pci_request_int);
}
else
} else
q->u.out.pci_out_enabled = 0;

if (queue_type(q) == QDIO_IQDIO_QFMT) {
if (multicast_outbound(q))
/* One SIGA-W per buffer required for unicast HiperSockets. */
WARN_ON_ONCE(count > 1 && !multicast_outbound(q));

rc = qdio_kick_outbound_q(q);
} else if (unlikely(need_siga_sync(q))) {
rc = qdio_siga_sync_q(q);
} else {
/* try to fast requeue buffers */
get_buf_state(q, prev_buf(bufnr), &state, 0);
if (state != SLSB_CU_OUTPUT_PRIMED)
rc = qdio_kick_outbound_q(q);
else
if ((q->irq_ptr->ssqd_desc.mmwc > 1) &&
(count > 1) &&
(count <= q->irq_ptr->ssqd_desc.mmwc)) {
/* exploit enhanced SIGA */
q->u.out.use_enh_siga = 1;
rc = qdio_kick_outbound_q(q);
} else {
/*
* One siga-w per buffer required for unicast
* HiperSockets.
*/
q->u.out.use_enh_siga = 0;
while (count--) {
rc = qdio_kick_outbound_q(q);
if (rc)
goto out;
}
}
goto out;
qperf_inc(q, fast_requeue);
}

if (need_siga_sync(q)) {
qdio_siga_sync_q(q);
goto out;
}

/* try to fast requeue buffers */
get_buf_state(q, prev_buf(bufnr), &state, 0);
if (state != SLSB_CU_OUTPUT_PRIMED)
rc = qdio_kick_outbound_q(q);
else
qperf_inc(q, fast_requeue);

out:
/* in case of SIGA errors we must process the error immediately */
if (used >= q->u.out.scan_threshold || rc)
tasklet_schedule(&q->tasklet);
Expand Down

0 comments on commit 110da31

Please sign in to comment.