sun4v_cpu_mondo: /* Head offset in %g2, tail offset in %g4. * If they are the same, no work.
*/
mov INTRQ_CPU_MONDO_HEAD, %g2
ldxa [%g2] ASI_QUEUE, %g2
mov INTRQ_CPU_MONDO_TAIL, %g4
ldxa [%g4] ASI_QUEUE, %g4
cmp %g2, %g4
be,pn %xcc, sun4v_cpu_mondo_queue_empty
nop
/* Get &trap_block[smp_processor_id()] into %g4. */
ldxa [%g0] ASI_SCRATCHPAD, %g4 sub %g4, TRAP_PER_CPU_FAULT_INFO, %g4
/* Get smp_processor_id() into %g3 */ sethi %hi(trap_block), %g5
or %g5, %lo(trap_block), %g5 sub %g4, %g5, %g3 srlx %g3, TRAP_BLOCK_SZ_SHIFT, %g3
/* XXX There can be a full 64-byte block of data here. * XXX This is how we can get at MSI vector data. * XXX Current we do not capture this, but when we do we'll * XXX need to add a 64-byte storage area in the struct ino_bucket * XXX or the struct irq_desc.
*/
/* Update queue head pointer, this frees up some registers. */
lduw [%g4 + TRAP_PER_CPU_DEV_MONDO_QMASK], %g4
and %g2, %g4, %g2
/* Disable interrupts and save register state so we can call * C code. The etrap handling will leave %g4 in %l4 for us * when it's done.
*/
rdpr %pil, %g2
wrpr %g0, PIL_NORMAL_MAX, %pil
mov %g1, %g4
ba,pt %xcc, etrap_irq
rd %pc, %g7
#ifdef CONFIG_TRACE_IRQFLAGS
call trace_hardirqs_off
nop
#endif /* Log the event. */
add %sp, PTREGS_OFF, %o0
call sun4v_resum_error
mov %l4, %o1
/* Return from trap. */
ba,pt %xcc, rtrap_irq
nop
sun4v_res_mondo_queue_empty:
retry
sun4v_res_mondo_queue_full: /* The queue is full, consolidate our damage by setting * the head equal to the tail. We'll just trap again otherwise. * Call C code to log the event.
*/
mov INTRQ_RESUM_MONDO_HEAD, %g2 stxa %g4, [%g2] ASI_QUEUE
membar #Sync
/* Disable interrupts and save register state so we can call * C code. The etrap handling will leave %g4 in %l4 for us * when it's done.
*/
rdpr %pil, %g2
wrpr %g0, PIL_NORMAL_MAX, %pil
mov %g1, %g4
ba,pt %xcc, etrap_irq
rd %pc, %g7
#ifdef CONFIG_TRACE_IRQFLAGS
call trace_hardirqs_off
nop
#endif /* Log the event. */
add %sp, PTREGS_OFF, %o0
call sun4v_nonresum_error
mov %l4, %o1
/* Return from trap. */
ba,pt %xcc, rtrap_irq
nop
sun4v_nonres_mondo_queue_empty:
retry
sun4v_nonres_mondo_queue_full: /* The queue is full, consolidate our damage by setting * the head equal to the tail. We'll just trap again otherwise. * Call C code to log the event.
*/
mov INTRQ_NONRESUM_MONDO_HEAD, %g2 stxa %g4, [%g2] ASI_QUEUE
membar #Sync
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.