public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add Aarch64 SVE defines
@ 2017-12-08 14:59 Alan Hayward
  2017-12-12 19:02 ` Szabolcs Nagy
  2018-01-11 17:37 ` Szabolcs Nagy
  0 siblings, 2 replies; 4+ messages in thread
From: Alan Hayward @ 2017-12-08 14:59 UTC (permalink / raw)
  To: libc-alpha; +Cc: nd

This patch adds Aarch64 SVE specific defines to glibc.

The Linux kernel changes for Aarch64 SVE have recently been pulled
into the head:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c9b012e5f4a1d01dfa8abc6318211a67ba7d5db2
Although not due to be in a kernel release until early 2018, we'd
like to make sure any glibc changes are ready for a similar time.

I haven't run any testsuites as the changes are should not effect them.

Is this ok?


Thanks,
Alan.


2017-12-08  Alan Hayward  <alan.hayward@arm.com>

	* elf/elf.h: Add NT_ARM_SVE.
	* sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h: Add HWCAP_SVE.


 elf/elf.h                                    | 2 ++
 sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h | 1 +
 2 files changed, 3 insertions(+)


diff --git a/elf/elf.h b/elf/elf.h
index 01a43ce9ac..e54a529d51 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -795,6 +795,8 @@ typedef struct
 #define NT_ARM_HW_BREAK        0x402           /* ARM hardware breakpoint registers */
 #define NT_ARM_HW_WATCH        0x403           /* ARM hardware watchpoint registers */
 #define NT_ARM_SYSTEM_CALL     0x404   /* ARM system call number */
+#define NT_ARM_SVE     0x405           /* ARM Scalable Vector Extension
+                                          registers */

 /* Legal values for the note segment descriptor types for object files.  */

diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h b/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h
index e46bb69118..255ddf0581 100644
--- a/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h
+++ b/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h
@@ -38,3 +38,4 @@
 #define HWCAP_FCMA             (1 << 14)
 #define HWCAP_LRCPC            (1 << 15)
 #define HWCAP_DCPOP            (1 << 16)
+#define HWCAP_SVE              (1 << 22)


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

* Re: [PATCH] Add Aarch64 SVE defines
  2017-12-08 14:59 [PATCH] Add Aarch64 SVE defines Alan Hayward
@ 2017-12-12 19:02 ` Szabolcs Nagy
  2018-01-11 17:37 ` Szabolcs Nagy
  1 sibling, 0 replies; 4+ messages in thread
From: Szabolcs Nagy @ 2017-12-12 19:02 UTC (permalink / raw)
  To: Alan Hayward, libc-alpha; +Cc: nd

On 08/12/17 14:59, Alan Hayward wrote:
> This patch adds Aarch64 SVE specific defines to glibc.
> 
> The Linux kernel changes for Aarch64 SVE have recently been pulled
> into the head:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c9b012e5f4a1d01dfa8abc6318211a67ba7d5db2
> Although not due to be in a kernel release until early 2018, we'd
> like to make sure any glibc changes are ready for a similar time.
> 
> I haven't run any testsuites as the changes are should not effect them.
> 
> Is this ok?
> 
> 
> Thanks,
> Alan.
> 
> 
> 2017-12-08  Alan Hayward  <alan.hayward@arm.com>
> 
> 	* elf/elf.h: Add NT_ARM_SVE.
> 	* sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h: Add HWCAP_SVE.
> 

nowadays these files need to be updated as well:

sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h
sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c

glibc release is in february so we have more time,
ideally we would wait for the kernel release.


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

* Re: [PATCH] Add Aarch64 SVE defines
  2017-12-08 14:59 [PATCH] Add Aarch64 SVE defines Alan Hayward
  2017-12-12 19:02 ` Szabolcs Nagy
@ 2018-01-11 17:37 ` Szabolcs Nagy
  2018-01-12  9:39   ` Alan Hayward
  1 sibling, 1 reply; 4+ messages in thread
From: Szabolcs Nagy @ 2018-01-11 17:37 UTC (permalink / raw)
  To: Alan Hayward, libc-alpha; +Cc: nd

On 08/12/17 14:59, Alan Hayward wrote:
> This patch adds Aarch64 SVE specific defines to glibc.
...
> 
> 2017-12-08  Alan Hayward  <alan.hayward@arm.com>
> 
> 	* elf/elf.h: Add NT_ARM_SVE.
> 	* sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h: Add HWCAP_SVE.

i plan to apply the elf.h part of this patch
and then do the hwcap.h update separately.

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

* Re: [PATCH] Add Aarch64 SVE defines
  2018-01-11 17:37 ` Szabolcs Nagy
@ 2018-01-12  9:39   ` Alan Hayward
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Hayward @ 2018-01-12  9:39 UTC (permalink / raw)
  To: Szabolcs Nagy; +Cc: libc-alpha, nd



> On 11 Jan 2018, at 17:37, Szabolcs Nagy <Szabolcs.Nagy@arm.com> wrote:
> 
> On 08/12/17 14:59, Alan Hayward wrote:
>> This patch adds Aarch64 SVE specific defines to glibc.
> ...
>> 
>> 2017-12-08  Alan Hayward  <alan.hayward@arm.com>
>> 
>> 	* elf/elf.h: Add NT_ARM_SVE.
>> 	* sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h: Add HWCAP_SVE.
> 
> i plan to apply the elf.h part of this patch
> and then do the hwcap.h update separately.
> 

Thanks for that!

I took a look at the dl-procinfo.c and it looked simple enough, but haven’t had
the time test to write the patch. Also, I wasn’t sure the best way to test the code
(Didn’t seem anything relevant in the test suite and I’m not sure how to use libc
to access the changes directly).


Alan.

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

end of thread, other threads:[~2018-01-12  9:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-08 14:59 [PATCH] Add Aarch64 SVE defines Alan Hayward
2017-12-12 19:02 ` Szabolcs Nagy
2018-01-11 17:37 ` Szabolcs Nagy
2018-01-12  9:39   ` Alan Hayward

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).