Lines Matching defs:xc
14 static void GLUE(X_PFX,ack_pending)(struct kvmppc_xive_vcpu *xc)
40 xc->pending |= 1 << cppr;
44 if (cppr >= xc->hw_cppr)
46 smp_processor_id(), cppr, xc->hw_cppr);
51 * xc->cppr, this will be done as we scan for interrupts
54 xc->hw_cppr = cppr;
115 static u32 GLUE(X_PFX,scan_interrupts)(struct kvmppc_xive_vcpu *xc,
122 while ((xc->mfrr != 0xff || pending != 0) && hirq == 0) {
134 if (prio >= xc->cppr || prio > 7) {
135 if (xc->mfrr < xc->cppr) {
136 prio = xc->mfrr;
143 q = &xc->queues[prio];
178 GLUE(X_PFX,source_eoi)(xc->vp_ipi,
179 &xc->vp_ipi_data);
219 if (prio >= xc->mfrr && xc->mfrr < xc->cppr) {
220 prio = xc->mfrr;
237 xc->pending = pending;
251 * Note: This can only make xc->cppr smaller as the previous
253 * the current xc->cppr. Thus we don't need to re-check xc->mfrr
257 xc->cppr = prio;
264 if (xc->cppr != xc->hw_cppr) {
265 xc->hw_cppr = xc->cppr;
266 __x_writeb(xc->cppr, __x_tima + TM_QW1_OS + TM_CPPR);
274 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
280 xc->GLUE(X_STAT_PFX,h_xirr)++;
283 GLUE(X_PFX,ack_pending)(xc);
286 xc->pending, xc->hw_cppr, xc->cppr);
289 old_cppr = xive_prio_to_guest(xc->cppr);
292 hirq = GLUE(X_PFX,scan_interrupts)(xc, xc->pending, scan_fetch);
295 hirq, xc->hw_cppr, xc->cppr);
325 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
326 u8 pending = xc->pending;
331 xc->GLUE(X_STAT_PFX,h_ipoll)++;
334 if (xc->server_num != server) {
338 xc = vcpu->arch.xive_vcpu;
350 hirq = GLUE(X_PFX,scan_interrupts)(xc, pending, scan_poll);
353 vcpu->arch.regs.gpr[4] = hirq | (xc->cppr << 24);
358 static void GLUE(X_PFX,push_pending_to_hw)(struct kvmppc_xive_vcpu *xc)
362 pending = xc->pending;
363 if (xc->mfrr != 0xff) {
364 if (xc->mfrr < 8)
365 pending |= 1 << xc->mfrr;
377 struct kvmppc_xive_vcpu *xc)
382 for (prio = xc->cppr; prio < KVMPPC_XIVE_Q_COUNT; prio++) {
383 struct xive_q *q = &xc->queues[prio];
415 if (xc->server_num == state->act_server)
444 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
450 xc->GLUE(X_STAT_PFX,h_cppr)++;
456 old_cppr = xc->cppr;
457 xc->cppr = cppr;
460 * Order the above update of xc->cppr with the subsequent
461 * read of xc->mfrr inside push_pending_to_hw()
472 GLUE(X_PFX,push_pending_to_hw)(xc);
491 GLUE(X_PFX,scan_for_rerouted_irqs)(xive, xc);
495 xc->hw_cppr = cppr;
506 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
515 xc->GLUE(X_STAT_PFX,h_eoi)++;
517 xc->cppr = xive_prio_from_guest(new_cppr);
527 * This barrier orders the setting of xc->cppr vs.
528 * subsquent test of xc->mfrr done inside
552 * of xc->cppr vs. subsquent test of xc->mfrr done inside
595 GLUE(X_PFX,scan_interrupts)(xc, xc->pending, scan_eoi);
596 GLUE(X_PFX,push_pending_to_hw)(xc);
597 pr_devel(" after scan pending=%02x\n", xc->pending);
600 xc->hw_cppr = xc->cppr;
601 __x_writeb(xc->cppr, __x_tima + TM_QW1_OS + TM_CPPR);
609 struct kvmppc_xive_vcpu *xc = vcpu->arch.xive_vcpu;
613 xc->GLUE(X_STAT_PFX,h_ipi)++;
619 xc = vcpu->arch.xive_vcpu;
622 xc->mfrr = mfrr;
625 * The load of xc->cppr below and the subsequent MMIO store
630 * updating xc->cppr then reading xc->mfrr.
632 * - The target of the IPI sees the xc->mfrr update
637 if (mfrr < xc->cppr)
638 __x_writeq(0, __x_trig_page(&xc->vp_ipi_data));