staticvoid icp_opal_teardown_cpu(void)
{ int hw_cpu = hard_smp_processor_id();
/* Clear any pending IPI */
opal_int_set_mfrr(hw_cpu, 0xff);
}
staticvoid icp_opal_flush_ipi(void)
{ /* * We take the ipi irq but and never return so we need to EOI the IPI, * but want to leave our priority 0. * * Should we check all the other interrupts too? * Should we be flagging idle loop instead? * Or creating some task to be scheduled?
*/ if (opal_int_eoi((0x00 << 24) | XICS_IPI) > 0)
force_external_irq_replay();
}
/* We don't have a linux mapping, so have rtas mask it. */
xics_mask_unknown_vec(vec);
/* We might learn about it later, so EOI it */ if (opal_int_eoi(xirr) > 0)
force_external_irq_replay();
return 0;
}
staticvoid icp_opal_set_cpu_priority(unsignedchar cppr)
{ /* * Here be dragons. The caller has asked to allow only IPI's and not * external interrupts. But OPAL XIVE doesn't support that. So instead * of allowing no interrupts allow all. That's still not right, but * currently the only caller who does this is xics_migrate_irqs_away() * and it works in that case.
*/ if (cppr >= DEFAULT_PRIORITY)
cppr = LOWEST_PRIORITY;
/* * EOI tells us whether there are more interrupts to fetch. * * Some HW implementations might not be able to send us another * external interrupt in that case, so we force a replay.
*/ if (rc > 0)
force_external_irq_replay();
}
#ifdef CONFIG_SMP
staticvoid icp_opal_cause_ipi(int cpu)
{ int hw_cpu = get_hard_smp_processor_id(cpu);
/* * Called when an interrupt is received on an off-line CPU to * clear the interrupt, so that the CPU can go back to nap mode.
*/ void icp_opal_flush_interrupt(void)
{ unsignedint xirr; unsignedint vec;
do {
xirr = icp_opal_get_xirr();
vec = xirr & 0x00ffffff; if (vec == XICS_IRQ_SPURIOUS) break; if (vec == XICS_IPI) { /* Clear pending IPI */ int cpu = smp_processor_id();
kvmppc_clear_host_ipi(cpu);
opal_int_set_mfrr(get_hard_smp_processor_id(cpu), 0xff);
} else {
pr_err("XICS: hw interrupt 0x%x to offline cpu, " "disabling\n", vec);
xics_mask_unknown_vec(vec);
}
/* EOI the interrupt */
} while (opal_int_eoi(xirr) > 0);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.