public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] aarch64: Add AmpereComputing emag to tunable cpu list
@ 2018-12-18  9:57 Feng Xue
  2018-12-19 15:41 ` Szabolcs Nagy
  0 siblings, 1 reply; 2+ messages in thread
From: Feng Xue @ 2018-12-18  9:57 UTC (permalink / raw)
  To: libc-alpha; +Cc: Feng Xue

This patch and following patches are from AmpereComputing, which target AmpereComputing's emag processor. Hope your code reviews on these patches. And we have already signed a copyright assignement with the FSF.

Thanks,
Feng
---

Emag is a 64-bit CPU core released by AmpereComputing.

Add its name to cpu list, and corresponding macro as utilities for
later IFUNC dispatch.

    * manual/tunables.texi (Tunable glibc.cpu.name): Add emag.
    * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (cpu_list):
    Add emag.
    * sysdeps/unix/sysv/linux/aarch64/cpu-features.h (IS_EMAG):
    New macro.
---
 ChangeLog                                      | 8 ++++++++
 manual/tunables.texi                           | 2 +-
 sysdeps/unix/sysv/linux/aarch64/cpu-features.c | 1 +
 sysdeps/unix/sysv/linux/aarch64/cpu-features.h | 3 +++
 4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index e0e7a74..ee2119b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-12-17  Feng Xue  <fxue@os.amperecomputing.com>
+
+	* manual/tunables.texi (Tunable glibc.cpu.name): Add emag.
+	* sysdeps/unix/sysv/linux/aarch64/cpu-features.c (cpu_list):
+	Add emag.
+	* sysdeps/unix/sysv/linux/aarch64/cpu-features.h (IS_EMAG):
+	New macro.
+
 2018-12-15  Paul Eggert  <eggert@cs.ucla.edu>
 
 	regex: fix storage-exhaustion error
diff --git a/manual/tunables.texi b/manual/tunables.texi
index 09a2565..1a20e95 100644
--- a/manual/tunables.texi
+++ b/manual/tunables.texi
@@ -360,7 +360,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{thunderx2t99p1}, @code{emag}.
 
 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 b4f3485..07138ea 100644
--- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c
+++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c
@@ -36,6 +36,7 @@ static struct cpu_list cpu_list[] = {
       {"thunderx2t99",   0x431F0AF0},
       {"thunderx2t99p1", 0x420F5160},
       {"phecda",	 0x680F0000},
+      {"emag",		 0x503F0001},
       {"generic", 	 0x0}
 };
 
diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.h b/sysdeps/unix/sysv/linux/aarch64/cpu-features.h
index eb35adf..95b17d4 100644
--- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.h
+++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.h
@@ -52,6 +52,9 @@
 #define IS_PHECDA(midr) (MIDR_IMPLEMENTOR(midr) == 'h'			      \
                         && MIDR_PARTNUM(midr) == 0x000)
 
+#define IS_EMAG(midr) (MIDR_IMPLEMENTOR(midr) == 'P'			      \
+                       && MIDR_PARTNUM(midr) == 0x000)
+
 struct cpu_features
 {
   uint64_t midr_el1;
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 0/3] aarch64: Add AmpereComputing emag to tunable cpu list
  2018-12-18  9:57 [PATCH 0/3] aarch64: Add AmpereComputing emag to tunable cpu list Feng Xue
@ 2018-12-19 15:41 ` Szabolcs Nagy
  0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2018-12-19 15:41 UTC (permalink / raw)
  To: Feng Xue, libc-alpha; +Cc: nd

On 18/12/2018 09:49, Feng Xue wrote:
> This patch and following patches are from AmpereComputing, which target AmpereComputing's emag processor. Hope your code reviews on these patches. And we have already signed a copyright assignement with the FSF.
> 
> Thanks,
> Feng
> ---
> 
> Emag is a 64-bit CPU core released by AmpereComputing.
> 
> Add its name to cpu list, and corresponding macro as utilities for
> later IFUNC dispatch.
> 
>     * manual/tunables.texi (Tunable glibc.cpu.name): Add emag.
>     * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (cpu_list):
>     Add emag.
>     * sysdeps/unix/sysv/linux/aarch64/cpu-features.h (IS_EMAG):
>     New macro.

OK to commit.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-19 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-18  9:57 [PATCH 0/3] aarch64: Add AmpereComputing emag to tunable cpu list Feng Xue
2018-12-19 15:41 ` Szabolcs Nagy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).