* on the S390 architecture.
*/
-#include <asm/cio.h>
-#include <asm/setup.h>
#include <linux/device.h>
#include <linux/mm.h>
#include <linux/kexec.h>
#include <linux/delay.h>
+#include <asm/cio.h>
+#include <asm/setup.h>
#include <asm/pgtable.h>
#include <asm/pgalloc.h>
#include <asm/system.h>
+#include <asm/smp.h>
static void kexec_halt_all_cpus(void *);
ctl_clear_bit(0,28);
on_each_cpu(kexec_halt_all_cpus, image, 0, 0);
- for(;;);
+ for (;;);
}
+extern void pfault_fini(void);
+
static void
kexec_halt_all_cpus(void *kernel_image)
{
struct kimage *image;
relocate_kernel_t data_mover;
- if (atomic_compare_and_swap(-1, smp_processor_id(), &cpuid))
+#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))
+ while (!smp_cpu_not_running(cpu))
cpu_relax();
}