extern void smp_call_online_cpu(void (*func)(void *), void *);
 extern void smp_call_ipl_cpu(void (*func)(void *), void *);
+extern void smp_emergency_stop(void);
 
 extern int smp_find_processor_id(u16 address);
 extern int smp_store_status(int cpu);
        func(data);
 }
 
+static inline void smp_emergency_stop(void)
+{
+}
+
 static inline int smp_find_processor_id(u16 address) { return 0; }
 static inline int smp_store_status(int cpu) { return 0; }
 static inline int smp_vcpu_scheduled(int cpu) { return 1; }
 
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/hardirq.h>
+#include <linux/kprobes.h>
 #include <linux/time.h>
 #include <linux/module.h>
 #include <linux/sched/signal.h>
 
 static DEFINE_PER_CPU(struct mcck_struct, cpu_mcck);
 
-static void s390_handle_damage(void)
+static notrace void s390_handle_damage(void)
 {
-       smp_send_stop();
+       smp_emergency_stop();
        disabled_wait((unsigned long) __builtin_return_address(0));
        while (1);
 }
+NOKPROBE_SYMBOL(s390_handle_damage);
 
 /*
  * Main machine check handler function. Will be called with interrupts enabled
 
        return kill_task;
 }
+NOKPROBE_SYMBOL(s390_validate_registers);
 
 /*
  * Backup the guest's machine check info to its description block
        mcck_backup->failing_storage_address
                        = S390_lowcore.failing_storage_address;
 }
+NOKPROBE_SYMBOL(s390_backup_mcck_info);
 
 #define MAX_IPD_COUNT  29
 #define MAX_IPD_TIME   (5 * 60 * USEC_PER_SEC) /* 5 minutes */
        clear_cpu_flag(CIF_MCCK_GUEST);
        nmi_exit();
 }
+NOKPROBE_SYMBOL(s390_do_machine_check);
 
 static int __init machine_check_init(void)
 {
 
 #include <linux/sched/task_stack.h>
 #include <linux/crash_dump.h>
 #include <linux/memblock.h>
+#include <linux/kprobes.h>
 #include <asm/asm-offsets.h>
 #include <asm/diag.h>
 #include <asm/switch_to.h>
  * Send cpus emergency shutdown signal. This gives the cpus the
  * opportunity to complete outstanding interrupts.
  */
-static void smp_emergency_stop(cpumask_t *cpumask)
+void notrace smp_emergency_stop(void)
 {
+       cpumask_t cpumask;
        u64 end;
        int cpu;
 
+       cpumask_copy(&cpumask, cpu_online_mask);
+       cpumask_clear_cpu(smp_processor_id(), &cpumask);
+
        end = get_tod_clock() + (1000000UL << 12);
-       for_each_cpu(cpu, cpumask) {
+       for_each_cpu(cpu, &cpumask) {
                struct pcpu *pcpu = pcpu_devices + cpu;
                set_bit(ec_stop_cpu, &pcpu->ec_mask);
                while (__pcpu_sigp(pcpu->address, SIGP_EMERGENCY_SIGNAL,
                        cpu_relax();
        }
        while (get_tod_clock() < end) {
-               for_each_cpu(cpu, cpumask)
+               for_each_cpu(cpu, &cpumask)
                        if (pcpu_stopped(pcpu_devices + cpu))
-                               cpumask_clear_cpu(cpu, cpumask);
-               if (cpumask_empty(cpumask))
+                               cpumask_clear_cpu(cpu, &cpumask);
+               if (cpumask_empty(&cpumask))
                        break;
                cpu_relax();
        }
 }
+NOKPROBE_SYMBOL(smp_emergency_stop);
 
 /*
  * Stop all cpus but the current one.
  */
 void smp_send_stop(void)
 {
-       cpumask_t cpumask;
        int cpu;
 
        /* Disable all interrupts/machine checks */
        trace_hardirqs_off();
 
        debug_set_critical();
-       cpumask_copy(&cpumask, cpu_online_mask);
-       cpumask_clear_cpu(smp_processor_id(), &cpumask);
 
        if (oops_in_progress)
-               smp_emergency_stop(&cpumask);
+               smp_emergency_stop();
 
        /* stop all processors */
-       for_each_cpu(cpu, &cpumask) {
-               struct pcpu *pcpu = pcpu_devices + cpu;
-               pcpu_sigp_retry(pcpu, SIGP_STOP, 0);
-               while (!pcpu_stopped(pcpu))
+       for_each_online_cpu(cpu) {
+               if (cpu == smp_processor_id())
+                       continue;
+               pcpu_sigp_retry(pcpu_devices + cpu, SIGP_STOP, 0);
+               while (!pcpu_stopped(pcpu_devices + cpu))
                        cpu_relax();
        }
 }