Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / arch / mips / include / asm / msa.h
index bbb85fe..6e4effa 100644 (file)
@@ -147,6 +147,19 @@ static inline void restore_msa(struct task_struct *t)
                _restore_msa(t);
 }
 
+static inline void init_msa_upper(void)
+{
+       /*
+        * Check cpu_has_msa only if it's a constant. This will allow the
+        * compiler to optimise out code for CPUs without MSA without adding
+        * an extra redundant check for CPUs with MSA.
+        */
+       if (__builtin_constant_p(cpu_has_msa) && !cpu_has_msa)
+               return;
+
+       _init_msa_upper();
+}
+
 #ifdef TOOLCHAIN_SUPPORTS_MSA
 
 #define __BUILD_MSA_CTL_REG(name, cs)                          \