Merge branches 'for-next/mte', 'for-next/misc' and 'for-next/kselftest', remote-track...
[linux-2.6-microblaze.git] / arch / arm64 / kernel / process.c
index 5ba0ed0..5464d57 100644 (file)
@@ -70,8 +70,6 @@ EXPORT_SYMBOL(__stack_chk_guard);
 void (*pm_power_off)(void);
 EXPORT_SYMBOL_GPL(pm_power_off);
 
-void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
-
 #ifdef CONFIG_HOTPLUG_CPU
 void arch_cpu_idle_dead(void)
 {
@@ -142,10 +140,7 @@ void machine_restart(char *cmd)
                efi_reboot(reboot_mode, NULL);
 
        /* Now call the architecture specific reboot code. */
-       if (arm_pm_restart)
-               arm_pm_restart(reboot_mode, cmd);
-       else
-               do_kernel_restart(cmd);
+       do_kernel_restart(cmd);
 
        /*
         * Whoops - the architecture was unable to reboot.
@@ -168,7 +163,7 @@ static void print_pstate(struct pt_regs *regs)
        u64 pstate = regs->pstate;
 
        if (compat_user_mode(regs)) {
-               printk("pstate: %08llx (%c%c%c%c %c %s %s %c%c%c)\n",
+               printk("pstate: %08llx (%c%c%c%c %c %s %s %c%c%c %cDIT %cSSBS)\n",
                        pstate,
                        pstate & PSR_AA32_N_BIT ? 'N' : 'n',
                        pstate & PSR_AA32_Z_BIT ? 'Z' : 'z',
@@ -179,12 +174,14 @@ static void print_pstate(struct pt_regs *regs)
                        pstate & PSR_AA32_E_BIT ? "BE" : "LE",
                        pstate & PSR_AA32_A_BIT ? 'A' : 'a',
                        pstate & PSR_AA32_I_BIT ? 'I' : 'i',
-                       pstate & PSR_AA32_F_BIT ? 'F' : 'f');
+                       pstate & PSR_AA32_F_BIT ? 'F' : 'f',
+                       pstate & PSR_AA32_DIT_BIT ? '+' : '-',
+                       pstate & PSR_AA32_SSBS_BIT ? '+' : '-');
        } else {
                const char *btype_str = btypes[(pstate & PSR_BTYPE_MASK) >>
                                               PSR_BTYPE_SHIFT];
 
-               printk("pstate: %08llx (%c%c%c%c %c%c%c%c %cPAN %cUAO %cTCO BTYPE=%s)\n",
+               printk("pstate: %08llx (%c%c%c%c %c%c%c%c %cPAN %cUAO %cTCO %cDIT %cSSBS BTYPE=%s)\n",
                        pstate,
                        pstate & PSR_N_BIT ? 'N' : 'n',
                        pstate & PSR_Z_BIT ? 'Z' : 'z',
@@ -197,6 +194,8 @@ static void print_pstate(struct pt_regs *regs)
                        pstate & PSR_PAN_BIT ? '+' : '-',
                        pstate & PSR_UAO_BIT ? '+' : '-',
                        pstate & PSR_TCO_BIT ? '+' : '-',
+                       pstate & PSR_DIT_BIT ? '+' : '-',
+                       pstate & PSR_SSBS_BIT ? '+' : '-',
                        btype_str);
        }
 }
@@ -482,7 +481,13 @@ static void compat_thread_switch(struct task_struct *next)
                set_tsk_thread_flag(next, TIF_NOTIFY_RESUME);
 }
 
-static void update_sctlr_el1(u64 sctlr)
+/*
+ * __switch_to() checks current->thread.sctlr_user as an optimisation. Therefore
+ * this function must be called with preemption disabled and the update to
+ * sctlr_user must be made in the same preemption disabled block so that
+ * __switch_to() does not see the variable update before the SCTLR_EL1 one.
+ */
+void update_sctlr_el1(u64 sctlr)
 {
        /*
         * EnIA must not be cleared while in the kernel as this is necessary for
@@ -494,19 +499,6 @@ static void update_sctlr_el1(u64 sctlr)
        isb();
 }
 
-void set_task_sctlr_el1(u64 sctlr)
-{
-       /*
-        * __switch_to() checks current->thread.sctlr as an
-        * optimisation. Disable preemption so that it does not see
-        * the variable update before the SCTLR_EL1 one.
-        */
-       preempt_disable();
-       current->thread.sctlr_user = sctlr;
-       update_sctlr_el1(sctlr);
-       preempt_enable();
-}
-
 /*
  * Thread switching.
  */