Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Unified Diff: src/base/cpu.cc

Issue 1841733002: [arm] Correctly detect ARMv8 platforms with old kernels. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/cpu.cc
diff --git a/src/base/cpu.cc b/src/base/cpu.cc
index 777f379bae90e1e3f0155e8ec9ae5f0fe87558bc..12a38819197a90aa4d91dfbbef86aa64cb1f3455 100644
--- a/src/base/cpu.cc
+++ b/src/base/cpu.cc
@@ -468,7 +468,12 @@ CPU::CPU()
char* end;
architecture_ = strtol(architecture, &end, 10);
if (end == architecture) {
- architecture_ = 0;
+ // Kernels older than 3.18 report "CPU architecture: AArch64" on ARMv8.
+ if (strcmp(architecture, "AArch64") == 0) {
+ architecture_ = 8;
+ } else {
+ architecture_ = 0;
+ }
}
delete[] architecture;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698