/* Set interrupt mask, but don't enable */
change_c0_status(ST0_IM, imask);
}
/* * These are routines for dealing with the sb1250 smp capabilities * independent of board/firmware
*/
/* * Simple enough; everything is set up, so just poke the appropriate mailbox * register, and we should be set
*/ staticvoid sb1250_send_ipi_single(int cpu, unsignedint action)
{
__raw_writeq((((u64)action) << 48), mailbox_set_regs[cpu]);
}
/* * Code to run on secondary just after probing the CPU
*/ staticvoid sb1250_init_secondary(void)
{ externvoid sb1250_smp_init(void);
sb1250_smp_init();
}
/* * Do any tidying up before marking online and running the idle * loop
*/ staticvoid sb1250_smp_finish(void)
{ externvoid sb1250_clockevent_init(void);
sb1250_clockevent_init();
local_irq_enable();
}
/* * Setup the PC, SP, and GP of a secondary processor and start it * running!
*/ staticint sb1250_boot_secondary(int cpu, struct task_struct *idle)
{ int retval;
retval = cfe_cpu_start(cpu_logical_map(cpu), &smp_bootstrap,
__KSTK_TOS(idle),
(unsignedlong)task_thread_info(idle), 0); if (retval != 0)
printk("cfe_start_cpu(%i) returned %i\n" , cpu, retval); return retval;
}
/* * Use CFE to find out how many CPUs are available, setting up * cpu_possible_mask and the logical/physical mappings. * XXXKW will the boot CPU ever not be physical 0? * * Common setup before any secondaries are started
*/ staticvoid __init sb1250_smp_setup(void)
{ int i, num;
void sb1250_mailbox_interrupt(void)
{ int cpu = smp_processor_id(); int irq = K_INT_MBOX_0; unsignedint action;
kstat_incr_irq_this_cpu(irq); /* Load the mailbox register to figure out what we're supposed to do */
action = (____raw_readq(mailbox_regs[cpu]) >> 48) & 0xffff;
/* Clear the mailbox to clear the interrupt */
____raw_writeq(((u64)action) << 48, mailbox_clear_regs[cpu]);
if (action & SMP_RESCHEDULE_YOURSELF)
scheduler_ipi();
if (action & SMP_CALL_FUNCTION) {
irq_enter();
generic_smp_call_function_interrupt();
irq_exit();
}
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.0 Sekunden
(vorverarbeitet)
¤
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.