select CLONE_BACKWARDS2
        select GENERIC_CLOCKEVENTS
        select GENERIC_CPU_DEVICES if !SMP
+       select GENERIC_IDLE_LOOP
        select GENERIC_KERNEL_THREAD
        select GENERIC_SMP_IDLE_THREAD
        select GENERIC_TIME_VSYSCALL_OLD
 
        return sf->gprs[8];
 }
 
-/*
- * The idle loop on a S390...
- */
-static void default_idle(void)
+void arch_cpu_idle(void)
 {
-       if (cpu_is_offline(smp_processor_id()))
-               cpu_die();
-       local_irq_disable();
-       if (need_resched()) {
-               local_irq_enable();
-               return;
-       }
        local_mcck_disable();
        if (test_thread_flag(TIF_MCCK_PENDING)) {
                local_mcck_enable();
        vtime_stop_cpu();
 }
 
-void cpu_idle(void)
+void arch_cpu_idle_exit(void)
 {
-       for (;;) {
-               tick_nohz_idle_enter();
-               rcu_idle_enter();
-               while (!need_resched() && !test_thread_flag(TIF_MCCK_PENDING))
-                       default_idle();
-               rcu_idle_exit();
-               tick_nohz_idle_exit();
-               if (test_thread_flag(TIF_MCCK_PENDING))
-                       s390_handle_mcck();
-               schedule_preempt_disabled();
-       }
+       if (test_thread_flag(TIF_MCCK_PENDING))
+               s390_handle_mcck();
+}
+
+void arch_cpu_idle_dead(void)
+{
+       cpu_die();
 }
 
 extern void __kprobes kernel_thread_starter(void);
 
        set_cpu_online(smp_processor_id(), true);
        inc_irq_stat(CPU_RST);
        local_irq_enable();
-       /* cpu_idle will call schedule for us */
-       cpu_idle();
+       cpu_startup_entry(CPUHP_ONLINE);
 }
 
 /* Upping and downing of CPUs */
 
        unsigned long psw_mask;
 
        trace_hardirqs_on();
-       /* Don't trace preempt off for idle. */
-       stop_critical_timings();
 
        /* Wait for external, I/O or machine check interrupt. */
        psw_mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_DAT |
        /* Call the assembler magic in entry.S */
        psw_idle(idle, psw_mask);
 
-       /* Reenable preemption tracer. */
-       start_critical_timings();
-
        /* Account time spent with enabled wait psw loaded as idle time. */
        idle->sequence++;
        smp_wmb();