Beispiel #1
0
static void msm_panic_restart(char mode, const char *cmd)
{
	arm_machine_flush_console();
	local_irq_disable();
	local_fiq_disable();
	flush_cache_all();
	cpu_proc_fin();
	flush_cache_all();
	msm_restart(mode, cmd);
	mdelay(1000);
	printk(KERN_ERR "Reboot failed -- System halted\n");
	while (1)
		;
}
void machine_restart(char *cmd)
{
	machine_shutdown();

	/* Flush the console to make sure all the relevant messages make it
	 * out to the console drivers */
	arm_machine_flush_console();

	arm_pm_restart(reboot_mode, cmd);

	/* Give a grace period for failure to restart of 1s */
	mdelay(1000);

	/* Whoops - the platform was unable to reboot. Tell the user! */
	printk("Reboot failed -- System halted\n");
	local_irq_disable();
	while (1);
}
static int panic_flush(struct notifier_block *nb,
				   unsigned long l, void *buf)
{
	int i;

	raw_spin_lock(&panic_lock);
	pr_emerg("EMMD: ready to perform memory dump\n");

	for (i = 0; i < nr_cpu_ids; i++)
		coresight_dump_pcsr(i);

	set_emmd_indicator();
	ramtag_setup();

	kmsg_dump(KMSG_DUMP_PANIC);
	dump_task_info();

#ifdef CONFIG_PXA_RAMDUMP
	ramdump_panic();
#endif

#ifdef CONFIG_REGDUMP
	dump_reg_to_console();
#endif

	pr_emerg("EMMD: done\n");
	arm_machine_flush_console();

	flush_cache_all();
#ifdef CONFIG_ARM
	outer_flush_all();
#endif
	drain_mc_buffer();
	raw_spin_unlock(&panic_lock);

	return NOTIFY_DONE;
}