[compiler-rt] 4a6fab7 - [compiler-rt] Expand comment about Exynos 9810 workaround.

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 06:35:46 PDT 2022


Author: James Y Knight
Date: 2022-03-21T13:35:11Z
New Revision: 4a6fab793fa00b8155c2c08a6fbad7ee3e7feba6

URL: https://github.com/llvm/llvm-project/commit/4a6fab793fa00b8155c2c08a6fbad7ee3e7feba6
DIFF: https://github.com/llvm/llvm-project/commit/4a6fab793fa00b8155c2c08a6fbad7ee3e7feba6.diff

LOG: [compiler-rt] Expand comment about Exynos 9810 workaround.

Added: 
    

Modified: 
    compiler-rt/lib/builtins/cpu_model.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/builtins/cpu_model.c b/compiler-rt/lib/builtins/cpu_model.c
index 64b07b6c9c05a..c5913f763dd24 100644
--- a/compiler-rt/lib/builtins/cpu_model.c
+++ b/compiler-rt/lib/builtins/cpu_model.c
@@ -815,8 +815,15 @@ static void CONSTRUCTOR_ATTRIBUTE init_have_lse_atomics(void) {
     char arch[PROP_VALUE_MAX];
     if (__system_property_get("ro.arch", arch) > 0 &&
         strncmp(arch, "exynos9810", sizeof("exynos9810") - 1) == 0) {
-      // Some cores of Exynos 9810 are ARMv8.2 and others are ARMv8.0,
-      // so disable the lse atomics completely.
+      // Some cores in the Exynos 9810 CPU are ARMv8.2 and others are ARMv8.0;
+      // only the former support LSE atomics.  However, the kernel in the
+      // initial Android 8.0 release of Galaxy S9/S9+ devices incorrectly
+      // reported the feature as being supported.
+      //
+      // The kernel appears to have been corrected to mark it unsupported as of
+      // the Android 9.0 release on those devices, and this issue has not been
+      // observed anywhere else. Thus, this workaround may be removed if
+      // compiler-rt ever drops support for Android 8.0.
       result = false;
     }
   }


        


More information about the llvm-commits mailing list