Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64...
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / kernel / process.c
index 29d48690f2ac59ef56d5384d1fde5db92f0624e7..89f41f7d27dd2bc54da37bd850f5437f86b19630 100644 (file)
@@ -57,36 +57,10 @@ unsigned long __stack_chk_guard __read_mostly;
 EXPORT_SYMBOL(__stack_chk_guard);
 #endif
 
-static void setup_restart(void)
-{
-       /*
-        * Tell the mm system that we are going to reboot -
-        * we may need it to insert some 1:1 mappings so that
-        * soft boot works.
-        */
-       setup_mm_for_reboot();
-
-       /* Clean and invalidate caches */
-       flush_cache_all();
-
-       /* Turn D-cache off */
-       cpu_cache_off();
-
-       /* Push out any further dirty data, and ensure cache is empty */
-       flush_cache_all();
-}
-
 void soft_restart(unsigned long addr)
 {
-       typedef void (*phys_reset_t)(unsigned long);
-       phys_reset_t phys_reset;
-
-       setup_restart();
-
-       /* Switch to the identity mapping */
-       phys_reset = (phys_reset_t)virt_to_phys(cpu_reset);
-       phys_reset(addr);
-
+       setup_mm_for_reboot();
+       cpu_soft_restart(virt_to_phys(cpu_reset), addr);
        /* Should never get here */
        BUG();
 }