]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
aarch64: Add Huawei Kunpeng to tunable cpu list
authorXuelei Zhang <zhangxuelei4@huawei.com>
Thu, 19 Dec 2019 14:55:06 +0000 (14:55 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 19 Dec 2019 19:31:04 +0000 (16:31 -0300)
Kunpeng processer is a 64-bit Arm-compatible CPU released by Huawei,
and we have already signed a copyright assignement with the FSF.

This patch adds its to cpu list, and related macro for IFUNC.

Checked on aarch64-linux-gnu.

Reviewed-by: Szabolcs Nagy <Szabolcs.Nagy@arm.com>
manual/tunables.texi
sysdeps/unix/sysv/linux/aarch64/cpu-features.c
sysdeps/unix/sysv/linux/aarch64/cpu-features.h

index 1687f9c93943350ba6221e1ad0e452c72d1305b3..ec18b1083412f33154e2c4b258567139f4b4c134 100644 (file)
@@ -372,7 +372,7 @@ This tunable is specific to powerpc, powerpc64 and powerpc64le.
 The @code{glibc.cpu.name=xxx} tunable allows the user to tell @theglibc{} to
 assume that the CPU is @code{xxx} where xxx may have one of these values:
 @code{generic}, @code{falkor}, @code{thunderxt88}, @code{thunderx2t99},
-@code{thunderx2t99p1}, @code{ares}, @code{emag}.
+@code{thunderx2t99p1}, @code{ares}, @code{emag}, @code{kunpeng}.
 
 This tunable is specific to aarch64.
 @end deftp
index 4fc241a6e54cc1009c4342d52f2e170e6931ac80..d0e50d0898ecd572257198bb682247353d416d8e 100644 (file)
@@ -38,6 +38,7 @@ static struct cpu_list cpu_list[] = {
       {"phecda",        0x680F0000},
       {"ares",          0x411FD0C0},
       {"emag",          0x503F0001},
+      {"kunpeng",       0x481FD010},
       {"generic",       0x0}
 };
 
index 0fa57dc66f5ff28e1416ca59acffc286cbd22846..87c4995627960f33e910bb5a60be88b001cc8d96 100644 (file)
@@ -57,6 +57,9 @@
 #define IS_EMAG(midr) (MIDR_IMPLEMENTOR(midr) == 'P'                         \
                        && MIDR_PARTNUM(midr) == 0x000)
 
+#define IS_KUNPENG(midr) (MIDR_IMPLEMENTOR(midr) == 'H'                           \
+                        && MIDR_PARTNUM(midr) == 0xd01)
+
 struct cpu_features
 {
   uint64_t midr_el1;