8 #include <linux/slab.h>
11 #include <asm/debug.h>
25 #define TIQDIO_NR_NONSHARED_IND 63
26 #define TIQDIO_NR_INDICATORS (TIQDIO_NR_NONSHARED_IND + 1)
27 #define TIQDIO_SHARED_IND 63
40 static u8 *tiqdio_alsi;
47 static u32 *get_indicator(
void)
54 return &q_indicators[
i].
ind;
62 static void put_indicator(
u32 *
addr)
68 i = ((
unsigned long)addr - (
unsigned long)q_indicators) /
77 list_add_rcu(&irq_ptr->
input_qs[0]->entry, &tiq_list);
93 list_del_rcu(&q->
entry);
110 return references_shared_dsci(irq_ptr) ||
111 has_multiple_inq_on_dsci(irq_ptr);
118 if (shared_ind(irq_ptr))
127 if (shared_ind(irq_ptr))
135 static inline u32 clear_shared_ind(
void)
142 static inline void tiqdio_call_inq_handlers(
struct qdio_irq *irq)
148 if (!references_shared_dsci(irq) &&
149 has_multiple_inq_on_dsci(irq))
152 if (q->
u.
in.queue_start_poll) {
155 &q->
u.
in.queue_irq_state)) {
181 static void tiqdio_thinint_handler(
void *
alsi,
void *
data)
183 u32 si_used = clear_shared_ind();
193 list_for_each_entry_rcu(q, &tiq_list,
entry) {
198 if (
unlikely(references_shared_dsci(irq))) {
201 }
else if (!*irq->
dsci)
204 tiqdio_call_inq_handlers(irq);
216 scssc_area = (
struct scssc_area *)irq_ptr->
chsc_page;
242 rc = chsc(scssc_area);
250 DBF_ERROR_HEX(&scssc_area->
response,
sizeof(
void *));
280 if (IS_ERR(tiqdio_alsi)) {
281 DBF_EVENT(
"RTI:%lx", PTR_ERR(tiqdio_alsi));
293 return set_subchannel_ind(irq_ptr, 0);
300 irq_ptr->
dsci = get_indicator();
301 DBF_HEX(&irq_ptr->
dsci,
sizeof(
void *));
310 set_subchannel_ind(irq_ptr, 1);
311 put_indicator(irq_ptr->
dsci);
316 WARN_ON(!list_empty(&tiq_list));