Merge remote-tracking branch 'tip/sched/arm64' into for-next/core
[linux-2.6-microblaze.git] / arch / arm64 / kernel / process.c
index e0e7f4e..2bd270c 100644 (file)
@@ -164,7 +164,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',
@@ -175,12 +175,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',
@@ -193,6 +195,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);
        }
 }
@@ -469,7 +473,13 @@ static void erratum_1418040_thread_switch(struct task_struct *prev,
        write_sysreg(val, cntkctl_el1);
 }
 
-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
@@ -481,19 +491,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.
  */