コード例 #1
0
ファイル: vax610_sysdev.c プロジェクト: B-Rich/simh
int32 con_halt (int32 code, int32 cc)
{
if ((vax610_boot_parse (0, cpu_boot_cmd) != SCPE_OK) || /* reparse the boot cmd */ 
    (reset_all (0) != SCPE_OK) ||                       /* reset the world */
    (cpu_boot (0, NULL) != SCPE_OK))                    /* set up boot code */
    ABORT (STOP_BOOT);                                  /* any error? */
sim_printf ("Rebooting...\n");
return cc;
}
コード例 #2
0
ファイル: smp.c プロジェクト: bgtwoigu/kernel-inwatch
static void __cpuinit jzsoc_boot_secondary(int cpu, struct task_struct *idle)
{
	int err;
	unsigned long flags,ctrl;


	printk("jzsoc_boot_secondary start\n");
	local_irq_save(flags);

	/* set reset bit! */
	ctrl = get_smp_ctrl();
	ctrl |= (1 << cpu);
	set_smp_ctrl(ctrl);

	/* blast all cache before booting secondary cpu */
	blast_dcache_jz();
	blast_icache_jz();

	cpm_clear_bit(15,CPM_CLKGR1);
	cpm_pwc_enable(scpu_pwc);
	preempt_disable();
	preempt_enable_no_resched();

	/* clear reset bit! */
	ctrl = get_smp_ctrl();
	ctrl &= ~(1 << cpu);
	set_smp_ctrl(ctrl);
wait:
	if (!cpumask_test_cpu(cpu, cpu_ready))
		goto wait;
	pr_info("[SMP] Booting CPU%d ...\n", cpu);
//	pr_debug("[SMP] Booting CPU%d ...\n", cpu);
	err = cpu_boot(cpu_logical_map(cpu), __KSTK_TOS(idle),
			(unsigned long)task_thread_info(idle));
	if (err != 0)
		pr_err("start_cpu(%i) returned %i\n" , cpu, err);
	local_irq_restore(flags);
}