Merge pull request #2316 from sharkcz/s390x

zarch: treat z15 as z14 instead of generic
This commit is contained in:
Martin Kroeker 2019-11-21 18:03:00 +01:00 committed by GitHub
commit 0925ef70db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -30,17 +30,20 @@
#define CPU_GENERIC 0 #define CPU_GENERIC 0
#define CPU_Z13 1 #define CPU_Z13 1
#define CPU_Z14 2 #define CPU_Z14 2
#define CPU_Z15 3
static char *cpuname[] = { static char *cpuname[] = {
"ZARCH_GENERIC", "ZARCH_GENERIC",
"Z13", "Z13",
"Z14" "Z14",
"Z15"
}; };
static char *cpuname_lower[] = { static char *cpuname_lower[] = {
"zarch_generic", "zarch_generic",
"z13", "z13",
"z14" "z14",
"z15"
}; };
int detect(void) int detect(void)
@ -66,6 +69,7 @@ int detect(void)
if (strstr(p, "2965")) return CPU_Z13; if (strstr(p, "2965")) return CPU_Z13;
if (strstr(p, "3906")) return CPU_Z14; if (strstr(p, "3906")) return CPU_Z14;
if (strstr(p, "3907")) return CPU_Z14; if (strstr(p, "3907")) return CPU_Z14;
if (strstr(p, "8561")) return CPU_Z14; // fallback z15 to z14
return CPU_GENERIC; return CPU_GENERIC;
} }