Merge tag 'arm64-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm64 / kernel / process.c
index 83a0ad5936a53e2c8a4d4c9a6b329da2505fc55a..46f02c3b5015ece9b1ca0ab4d57d9540a3288e67 100644 (file)
@@ -81,8 +81,8 @@ void soft_restart(unsigned long addr)
 void (*pm_power_off)(void);
 EXPORT_SYMBOL_GPL(pm_power_off);
 
-void (*pm_restart)(const char *cmd);
-EXPORT_SYMBOL_GPL(pm_restart);
+void (*arm_pm_restart)(char str, const char *cmd);
+EXPORT_SYMBOL_GPL(arm_pm_restart);
 
 void arch_cpu_idle_prepare(void)
 {
@@ -131,8 +131,8 @@ void machine_restart(char *cmd)
        local_fiq_disable();
 
        /* Now call the architecture specific reboot code. */
-       if (pm_restart)
-               pm_restart(cmd);
+       if (arm_pm_restart)
+               arm_pm_restart('h', cmd);
 
        /*
         * Whoops - the architecture was unable to reboot.
@@ -145,11 +145,7 @@ void __show_regs(struct pt_regs *regs)
 {
        int i;
 
-       printk("CPU: %d    %s  (%s %.*s)\n",
-               raw_smp_processor_id(), print_tainted(),
-               init_utsname()->release,
-               (int)strcspn(init_utsname()->version, " "),
-               init_utsname()->version);
+       show_regs_print_info(KERN_DEFAULT);
        print_symbol("PC is at %s\n", instruction_pointer(regs));
        print_symbol("LR is at %s\n", regs->regs[30]);
        printk("pc : [<%016llx>] lr : [<%016llx>] pstate: %08llx\n",
@@ -166,7 +162,6 @@ void __show_regs(struct pt_regs *regs)
 void show_regs(struct pt_regs * regs)
 {
        printk("\n");
-       printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm);
        __show_regs(regs);
 }
 
@@ -278,11 +273,17 @@ struct task_struct *__switch_to(struct task_struct *prev,
        fpsimd_thread_switch(next);
        tls_thread_switch(next);
        hw_breakpoint_thread_switch(next);
+       contextidr_thread_switch(next);
+
+       /*
+        * Complete any pending TLB or cache maintenance on this CPU in case
+        * the thread migrates to a different CPU.
+        */
+       dsb();
 
        /* the actual thread switch */
        last = cpu_switch_to(prev, next);
 
-       contextidr_thread_switch(next);
        return last;
 }