From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71470 invoked by alias); 31 Dec 2019 10:47:35 -0000 Mailing-List: contact glibc-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: , Sender: glibc-cvs-owner@sourceware.org List-Subscribe: Received: (qmail 71453 invoked by uid 9299); 31 Dec 2019 10:47:35 -0000 Date: Tue, 31 Dec 2019 10:47:00 -0000 Message-ID: <20191231104735.71452.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc/fw/builtin-syscalls-4] aarch64: Add Huawei Kunpeng to tunable cpu list X-Act-Checkin: glibc X-Git-Author: Xuelei Zhang X-Git-Refname: refs/heads/fw/builtin-syscalls-4 X-Git-Oldrev: a7611806d5f4163656a2f5d21d349b5e7c4170e0 X-Git-Newrev: 0db8e7b36665fa90c53161742dedab21d786924c X-SW-Source: 2019-q4/txt/msg00687.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0db8e7b36665fa90c53161742dedab21d786924c commit 0db8e7b36665fa90c53161742dedab21d786924c Author: Xuelei Zhang Date: Thu Dec 19 14:55:06 2019 +0000 aarch64: Add Huawei Kunpeng to tunable cpu list 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 Diff: --- manual/tunables.texi | 2 +- sysdeps/unix/sysv/linux/aarch64/cpu-features.c | 1 + sysdeps/unix/sysv/linux/aarch64/cpu-features.h | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/manual/tunables.texi b/manual/tunables.texi index 1687f9c..ec18b10 100644 --- a/manual/tunables.texi +++ b/manual/tunables.texi @@ -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 diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c index 4fc241a..d0e50d0 100644 --- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c +++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c @@ -38,6 +38,7 @@ static struct cpu_list cpu_list[] = { {"phecda", 0x680F0000}, {"ares", 0x411FD0C0}, {"emag", 0x503F0001}, + {"kunpeng", 0x481FD010}, {"generic", 0x0} }; diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.h b/sysdeps/unix/sysv/linux/aarch64/cpu-features.h index 0fa57dc..87c4995 100644 --- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.h +++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.h @@ -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;