This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/2] aarch64: Add Huawei Kunpeng to tunable cpu list
- From: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>
- To: Xuelei Zhang <zhangxuelei4 at huawei dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Cc: nd <nd at arm dot com>
- Date: Tue, 15 Oct 2019 11:50:03 +0000
- Subject: Re: [PATCH 1/2] aarch64: Add Huawei Kunpeng to tunable cpu list
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6NLittufH0gm1prLz8VfCmXskxi+9p+WZS3ZiJd8VLc=; b=bgfVFXxRXJVTq2uKm3znh9cYaj/Hq4lwwELX6i7F3q7Vx8Eyr7HrUefNPUj3IbroU/sGJL7WAwoMIjKCm4wLV8/BnUN3hAZdDydud3ld+oGrJEPYzJzATo1cYtvhM3OnSS5Tr5c68HT/h73mEN/ulUOuQ1G3SeyeWw9Omybkn7ND8aZt1cFxJrYhSdNFx3uwGIVLmYXyQAEHbczKEMgIYY3lyNSM8miXe6JdOUxT1VtadEkE/v2mkjUblKiwhnjGZpUhgIwtJCdqLjh6k5ByVRs8DZoBi7DMtzXcqe5dKzboDvXpiPmG8xVrUfL+17o2vG5qCRN4tDkl4WWEI3nS2Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OxchUZZ84TnbaTUD4acgzlQPF3sUxvT3doHtA6Gys7puawCFwdppQyQ14XZejmmEeDh7o1c/xnTO4D6noNQSiXkENJoI+dCeEUykP/vrGN7MggSt7c7sXYLh1XzOP0d+Ubn2A8OulSJbvuDv9tb7u+l9L97iMOWfnQMsmzVs28ifUsN4BLGkXnS370G64Po7Rg76ztTGoqvenZeNsnVRcll5J02a7k6ySQmjtiJKIvbacg4vgTuPlPZWos3nRLPgdTz842iko8c+PKBPnn8DJB+Shojc2yYf8vdzYtPN9/9QtfhLoyjJGftb/vxiMshvNpefTNVzbLjrpnVMP+q5rg==
- Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- References: <20191014034410.10276-1-zhangxuelei4@huawei.com>
On 14/10/2019 04:44, Xuelei Zhang wrote:
> 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.
>
> * manual/tunables.texi (Tunable glibc.cpu.name): Add Kunpeng.
> * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (cpu_list):
> Add kunpeng.
> * sysdeps/unix/sysv/linux/aarch64/cpu-features.h (IS_KUNPENG):
> New macro.
this is OK to commit.
note that changelog is no longer required.
> ---
> 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 1687f9c939..ec18b10834 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 4fc241a6e5..d0e50d0898 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 0fa57dc66f..87c4995627 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;
>