Lines Matching refs:ics
72 struct kvmppc_ics *ics; in ics_deliver_irq() local
78 ics = kvmppc_xics_find_ics(xics, irq, &src); in ics_deliver_irq()
79 if (!ics) { in ics_deliver_irq()
83 state = &ics->irq_state[src]; in ics_deliver_irq()
125 static void ics_check_resend(struct kvmppc_xics *xics, struct kvmppc_ics *ics, in ics_check_resend() argument
131 struct ics_irq_state *state = &ics->irq_state[i]; in ics_check_resend()
140 static bool write_xive(struct kvmppc_xics *xics, struct kvmppc_ics *ics, in write_xive() argument
148 arch_spin_lock(&ics->lock); in write_xive()
160 arch_spin_unlock(&ics->lock); in write_xive()
170 struct kvmppc_ics *ics; in kvmppc_xics_set_xive() local
177 ics = kvmppc_xics_find_ics(xics, irq, &src); in kvmppc_xics_set_xive()
178 if (!ics) in kvmppc_xics_set_xive()
180 state = &ics->irq_state[src]; in kvmppc_xics_set_xive()
190 if (write_xive(xics, ics, state, server, priority, priority)) in kvmppc_xics_set_xive()
199 struct kvmppc_ics *ics; in kvmppc_xics_get_xive() local
207 ics = kvmppc_xics_find_ics(xics, irq, &src); in kvmppc_xics_get_xive()
208 if (!ics) in kvmppc_xics_get_xive()
210 state = &ics->irq_state[src]; in kvmppc_xics_get_xive()
213 arch_spin_lock(&ics->lock); in kvmppc_xics_get_xive()
216 arch_spin_unlock(&ics->lock); in kvmppc_xics_get_xive()
226 struct kvmppc_ics *ics; in kvmppc_xics_int_on() local
233 ics = kvmppc_xics_find_ics(xics, irq, &src); in kvmppc_xics_int_on()
234 if (!ics) in kvmppc_xics_int_on()
236 state = &ics->irq_state[src]; in kvmppc_xics_int_on()
242 if (write_xive(xics, ics, state, state->server, state->saved_priority, in kvmppc_xics_int_on()
252 struct kvmppc_ics *ics; in kvmppc_xics_int_off() local
259 ics = kvmppc_xics_find_ics(xics, irq, &src); in kvmppc_xics_int_off()
260 if (!ics) in kvmppc_xics_int_off()
262 state = &ics->irq_state[src]; in kvmppc_xics_int_off()
264 write_xive(xics, ics, state, state->server, MASKED, state->priority); in kvmppc_xics_int_off()
326 struct kvmppc_ics *ics = xics->ics[icsid]; in icp_check_resend() local
330 if (!ics) in icp_check_resend()
332 ics_check_resend(xics, ics, icp); in icp_check_resend()
381 struct kvmppc_ics *ics; in icp_deliver_irq() local
403 ics = kvmppc_xics_find_ics(xics, new_irq, &src); in icp_deliver_irq()
404 if (!ics) { in icp_deliver_irq()
408 state = &ics->irq_state[src]; in icp_deliver_irq()
412 arch_spin_lock(&ics->lock); in icp_deliver_irq()
473 arch_spin_unlock(&ics->lock); in icp_deliver_irq()
491 set_bit(ics->icsid, icp->resend_map); in icp_deliver_irq()
502 arch_spin_unlock(&ics->lock); in icp_deliver_irq()
509 arch_spin_unlock(&ics->lock); in icp_deliver_irq()
781 struct kvmppc_ics *ics; in ics_eoi() local
794 ics = kvmppc_xics_find_ics(xics, irq, &src); in ics_eoi()
795 if (!ics) { in ics_eoi()
799 state = &ics->irq_state[src]; in ics_eoi()
989 struct kvmppc_ics *ics = xics->ics[icsid]; in xics_debug_show() local
991 if (!ics) in xics_debug_show()
998 arch_spin_lock(&ics->lock); in xics_debug_show()
1001 struct ics_irq_state *irq = &ics->irq_state[i]; in xics_debug_show()
1009 arch_spin_unlock(&ics->lock); in xics_debug_show()
1028 struct kvmppc_ics *ics; in kvmppc_xics_create_ics() local
1036 if (xics->ics[icsid]) in kvmppc_xics_create_ics()
1040 ics = kzalloc(sizeof(struct kvmppc_ics), GFP_KERNEL); in kvmppc_xics_create_ics()
1041 if (!ics) in kvmppc_xics_create_ics()
1044 ics->icsid = icsid; in kvmppc_xics_create_ics()
1047 ics->irq_state[i].number = (icsid << KVMPPC_XICS_ICS_SHIFT) | i; in kvmppc_xics_create_ics()
1048 ics->irq_state[i].priority = MASKED; in kvmppc_xics_create_ics()
1049 ics->irq_state[i].saved_priority = MASKED; in kvmppc_xics_create_ics()
1052 xics->ics[icsid] = ics; in kvmppc_xics_create_ics()
1059 return xics->ics[icsid]; in kvmppc_xics_create_ics()
1106 struct kvmppc_ics *ics; in kvmppc_xics_set_icp() local
1131 ics = kvmppc_xics_find_ics(xics, xisr, &src); in kvmppc_xics_set_icp()
1132 if (!ics) in kvmppc_xics_set_icp()
1179 struct kvmppc_ics *ics; in xics_get_source() local
1186 ics = kvmppc_xics_find_ics(xics, irq, &idx); in xics_get_source()
1187 if (!ics) in xics_get_source()
1190 irqp = &ics->irq_state[idx]; in xics_get_source()
1192 arch_spin_lock(&ics->lock); in xics_get_source()
1217 arch_spin_unlock(&ics->lock); in xics_get_source()
1228 struct kvmppc_ics *ics; in xics_set_source() local
1240 ics = kvmppc_xics_find_ics(xics, irq, &idx); in xics_set_source()
1241 if (!ics) { in xics_set_source()
1242 ics = kvmppc_xics_create_ics(xics->kvm, xics, irq); in xics_set_source()
1243 if (!ics) in xics_set_source()
1246 irqp = &ics->irq_state[idx]; in xics_set_source()
1257 arch_spin_lock(&ics->lock); in xics_set_source()
1275 arch_spin_unlock(&ics->lock); in xics_set_source()
1373 kfree(xics->ics[i]); in kvmppc_xics_release()
1374 xics->ics[i] = NULL; in kvmppc_xics_release()
1482 struct kvmppc_ics *ics; in kvmppc_xics_set_mapped() local
1485 ics = kvmppc_xics_find_ics(xics, irq, &idx); in kvmppc_xics_set_mapped()
1486 if (!ics) in kvmppc_xics_set_mapped()
1489 ics->irq_state[idx].host_irq = host_irq; in kvmppc_xics_set_mapped()
1490 ics->irq_state[idx].intr_cpu = -1; in kvmppc_xics_set_mapped()
1498 struct kvmppc_ics *ics; in kvmppc_xics_clr_mapped() local
1501 ics = kvmppc_xics_find_ics(xics, irq, &idx); in kvmppc_xics_clr_mapped()
1502 if (!ics) in kvmppc_xics_clr_mapped()
1505 ics->irq_state[idx].host_irq = 0; in kvmppc_xics_clr_mapped()