static void
kexec_halt_all_cpus(void *kernel_image)
{
	static atomic_t cpuid = ATOMIC_INIT(-1);
	int cpu;
	struct kimage *image;
	relocate_kernel_t data_mover;

#ifdef CONFIG_PFAULT
	if (MACHINE_IS_VM)
		pfault_fini();
#endif

	if (atomic_cmpxchg(&cpuid, -1, smp_processor_id()) != -1)
		signal_processor(smp_processor_id(), sigp_stop);

	/* Wait for all other cpus to enter stopped state */
	for_each_online_cpu(cpu) {
		if (cpu == smp_processor_id())
			continue;
		while (!smp_cpu_not_running(cpu))
			cpu_relax();
	}

	image = (struct kimage *) kernel_image;
	data_mover = (relocate_kernel_t)
		(page_to_pfn(image->control_code_page) << PAGE_SHIFT);

	/* Call the moving routine */
	(*data_mover) (&image->head, image->start);
}
Beispiel #2
0
/*
 * Reset system and call either kdump or normal kexec
 */
static void __machine_kexec(void *data)
{
	struct kimage *image = data;

	pfault_fini();
	if (image->type == KEXEC_TYPE_CRASH)
		s390_reset_system(__do_machine_kdump, data);
	else
		s390_reset_system(__do_machine_kexec, data);
	disabled_wait((unsigned long) __builtin_return_address(0));
}
Beispiel #3
0
/*
 * Reset system and call either kdump or normal kexec
 */
static void __machine_kexec(void *data)
{
	__arch_local_irq_stosm(0x04); /* enable DAT */
	pfault_fini();
	tracing_off();
	debug_locks_off();
#ifdef CONFIG_CRASH_DUMP
	if (((struct kimage *) data)->type == KEXEC_TYPE_CRASH)
		__machine_kdump(data);
#endif
	__do_machine_kexec(data);
}
Beispiel #4
0
/*
 * Reset system and call either kdump or normal kexec
 */
void machine_kexec(struct kimage *image)
{
	if (image->type == KEXEC_TYPE_CRASH && !kdump_csum_valid(image))
		return;

	smp_send_stop();
	pfault_fini();
	if (image->type == KEXEC_TYPE_CRASH)
		s390_reset_system(__do_machine_kdump, image);
	else
		s390_reset_system(__do_machine_kexec, image);
	disabled_wait((unsigned long) __builtin_return_address(0));
}
static void __machine_kexec(void *data)
{
	relocate_kernel_t data_mover;
	struct kimage *image = data;

	pfault_fini();
	s390_reset_system();

	data_mover = (relocate_kernel_t) page_to_phys(image->control_code_page);

	/* Call the moving routine */
	(*data_mover)(&image->head, image->start);
	for (;;);
}
static void __machine_kexec(void *data)
{
	struct kimage *image = data;

	pfault_fini();
	tracing_off();
	debug_locks_off();
	if (image->type == KEXEC_TYPE_CRASH) {
		lgr_info_log();
		s390_reset_system(__do_machine_kdump, data);
	} else {
		s390_reset_system(__do_machine_kexec, data);
	}
	disabled_wait((unsigned long) __builtin_return_address(0));
}
Beispiel #7
0
/*
 * Reset system and call either kdump or normal kexec
 */
static void __machine_kexec(void *data)
{
	__arch_local_irq_stosm(0x04); /* enable DAT */
	pfault_fini();
	tracing_off();
	debug_locks_off();
#ifdef CONFIG_CRASH_DUMP
	if (((struct kimage *) data)->type == KEXEC_TYPE_CRASH) {

		lgr_info_log();
		s390_reset_system(setup_regs, __do_machine_kdump, data);
	} else
#endif
		s390_reset_system(NULL, __do_machine_kexec, data);
	disabled_wait((unsigned long) __builtin_return_address(0));
}
Beispiel #8
0
/*
 * Reset system and call either kdump or normal kexec
 */
void machine_kexec(struct kimage *image)
{
	if (image->type == KEXEC_TYPE_CRASH && !kdump_csum_valid(image))
		return;

	smp_send_stop();
	pfault_fini();
	tracing_off();
	debug_locks_off();
	if (image->type == KEXEC_TYPE_CRASH) {
		lgr_info_log();
		s390_reset_system(__do_machine_kdump, image);
	} else {
		s390_reset_system(__do_machine_kexec, image);
	}
	disabled_wait((unsigned long) __builtin_return_address(0));
}