Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227261
b: refs/heads/master
c: 4f32518
h: refs/heads/master
i:
  227259: 06f1293
v: v3
  • Loading branch information
Jan Glauber authored and Martin Schwidefsky committed Jan 5, 2011
1 parent ec0cff1 commit 5811e5e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 50 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 078f8ecaa30718694d1e13d9f415b7ce75b3c968
refs/heads/master: 4f325184f2d4c1f2258873b2a333005dc4dfcbc0
4 changes: 2 additions & 2 deletions trunk/drivers/s390/cio/qdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ struct indicator_t {

extern struct indicator_t *q_indicators;

static inline int shared_ind(struct qdio_irq *irq_ptr)
static inline int shared_ind(u32 *dsci)
{
return irq_ptr->dsci == &q_indicators[TIQDIO_SHARED_IND].ind;
return dsci == &q_indicators[TIQDIO_SHARED_IND].ind;
}

/* prototypes for thin interrupt */
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/s390/cio/qdio_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,7 @@ int qdio_start_irq(struct ccw_device *cdev, int nr)

WARN_ON(queue_irqs_enabled(q));

if (!shared_ind(q->irq_ptr))
if (!shared_ind(q->irq_ptr->dsci))
xchg(q->irq_ptr->dsci, 0);

qdio_stop_polling(q);
Expand All @@ -1562,7 +1562,7 @@ int qdio_start_irq(struct ccw_device *cdev, int nr)
* We need to check again to not lose initiative after
* resetting the ACK state.
*/
if (!shared_ind(q->irq_ptr) && *q->irq_ptr->dsci)
if (!shared_ind(q->irq_ptr->dsci) && *q->irq_ptr->dsci)
goto rescan;
if (!qdio_inbound_q_done(q))
goto rescan;
Expand Down
54 changes: 9 additions & 45 deletions trunk/drivers/s390/cio/qdio_thinint.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,8 @@ static u8 *tiqdio_alsi;

struct indicator_t *q_indicators;

static int css_qdio_omit_svs;

static u64 last_ai_time;

static inline unsigned long do_clear_global_summary(void)
{
register unsigned long __fn asm("1") = 3;
register unsigned long __tmp asm("2");
register unsigned long __time asm("3");

asm volatile(
" .insn rre,0xb2650000,2,0"
: "+d" (__fn), "=d" (__tmp), "=d" (__time));
return __time;
}

/* returns addr for the device state change indicator */
static u32 *get_indicator(void)
{
Expand Down Expand Up @@ -84,10 +70,6 @@ void tiqdio_add_input_queues(struct qdio_irq *irq_ptr)
struct qdio_q *q;
int i;

/* No TDD facility? If we must use SIGA-s we can also omit SVS. */
if (!css_qdio_omit_svs && irq_ptr->siga_flag.sync)
css_qdio_omit_svs = 1;

mutex_lock(&tiq_list_lock);
for_each_input_queue(irq_ptr, q, i)
list_add_rcu(&q->entry, &tiq_list);
Expand All @@ -113,9 +95,9 @@ void tiqdio_remove_input_queues(struct qdio_irq *irq_ptr)
}
}

static inline int shared_ind_used(void)
static inline u32 shared_ind_set(void)
{
return atomic_read(&q_indicators[TIQDIO_SHARED_IND].count);
return q_indicators[TIQDIO_SHARED_IND].ind;
}

/**
Expand All @@ -125,30 +107,23 @@ static inline int shared_ind_used(void)
*/
static void tiqdio_thinint_handler(void *alsi, void *data)
{
u32 si_used = shared_ind_set();
struct qdio_q *q;

last_ai_time = S390_lowcore.int_clock;
kstat_cpu(smp_processor_id()).irqs[IOINT_QAI]++;

/*
* SVS only when needed: issue SVS to benefit from iqdio interrupt
* avoidance (SVS clears adapter interrupt suppression overwrite).
*/
if (!css_qdio_omit_svs)
do_clear_global_summary();

/* reset local summary indicator */
if (shared_ind_used())
xchg(tiqdio_alsi, 0);

/* protect tiq_list entries, only changed in activate or shutdown */
rcu_read_lock();

/* check for work on all inbound thinint queues */
list_for_each_entry_rcu(q, &tiq_list, entry) {

/* only process queues from changed sets */
if (!*q->irq_ptr->dsci)
if (unlikely(shared_ind(q->irq_ptr->dsci))) {
if (!si_used)
continue;
} else if (!*q->irq_ptr->dsci)
continue;

if (q->u.in.queue_start_poll) {
Expand All @@ -164,7 +139,7 @@ static void tiqdio_thinint_handler(void *alsi, void *data)
q->irq_ptr->int_parm);
} else {
/* only clear it if the indicator is non-shared */
if (!shared_ind(q->irq_ptr))
if (!shared_ind(q->irq_ptr->dsci))
xchg(q->irq_ptr->dsci, 0);
/*
* Call inbound processing but not directly
Expand All @@ -180,13 +155,8 @@ static void tiqdio_thinint_handler(void *alsi, void *data)
* If the shared indicator was used clear it now after all queues
* were processed.
*/
if (shared_ind_used()) {
if (si_used && shared_ind_set())
xchg(&q_indicators[TIQDIO_SHARED_IND].ind, 0);

/* prevent racing */
if (*tiqdio_alsi)
xchg(&q_indicators[TIQDIO_SHARED_IND].ind, 1 << 7);
}
}

static int set_subchannel_ind(struct qdio_irq *irq_ptr, int reset)
Expand Down Expand Up @@ -271,12 +241,6 @@ int qdio_establish_thinint(struct qdio_irq *irq_ptr)
{
if (!is_thinint_irq(irq_ptr))
return 0;

/* Check for aif time delay disablement. If installed,
* omit SVS even under LPAR
*/
if (css_general_characteristics.aif_tdd)
css_qdio_omit_svs = 1;
return set_subchannel_ind(irq_ptr, 0);
}

Expand Down

0 comments on commit 5811e5e

Please sign in to comment.