Merge commit '818299f6bdae' into android-exynos-4.14-ww-9610-minor_up-dev
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / arch / arm64 / include / asm / simd.h
index 96959b52afae40d3aeaa8878384b939dd4aa2aab..320838263f1e86507d4a958edd93a3f4459edc82 100644 (file)
  */
 static __must_check inline bool may_use_simd(void)
 {
+<<<<<<< HEAD
        return true;
+=======
+       /*
+        * kernel_neon_busy is only set while preemption is disabled,
+        * and is clear whenever preemption is enabled. Since
+        * this_cpu_read() is atomic w.r.t. preemption, kernel_neon_busy
+        * cannot change under our feet -- if it's set we cannot be
+        * migrated, and if it's clear we cannot be migrated to a CPU
+        * where it is set.
+        */
+       return !in_irq() && !irqs_disabled() && !in_nmi() &&
+               !this_cpu_read(kernel_neon_busy);
+>>>>>>> 818299f6bdae
 }
 
 #endif