Patchwork aarch64: Optimized memset for falkor

login
register
mail settings
Submitter Adhemerval Zanella Netto
Date Dec. 19, 2017, 6:54 p.m.
Message ID <dfca3baf-e88b-449d-118b-f8e2ca9b03ec@linaro.org>
Download mbox | patch
Permalink /patch/25022/
State New
Headers show

Comments

Adhemerval Zanella Netto - Dec. 19, 2017, 6:54 p.m.
On 19/12/2017 16:38, Szabolcs Nagy wrote:
> On 20/11/17 12:57, Siddhesh Poyarekar wrote:
>> On Monday 20 November 2017 06:11 PM, Szabolcs Nagy wrote:
>>> On 14/11/17 09:26, Siddhesh Poyarekar wrote:
>>>> +libc_ifunc (__libc_memset, (IS_FALKOR (midr) && zva_size == 64
>>>> +			    ? __memset_falkor
>>>> +			    : __memset_generic));
>>>
>>> the falkor code is probably slightly better for
>>> most of the zva==64 targets too, but this way
>>> is probably the least risky and the logic can
>>> be changed later if necessary.
>>>
>>> i don't see a way to fix falkor with smaller
>>> impact on other cores.
>>>
>>> so this is OK to commit.
>>
>> Thanks, pushed.
>>
> 
> this broke --disable-multi-arch build
> string/rtld-memset.os is missing then
> i don't yet know the cause
> 
> aarch64-none-linux-gnu-gcc   -nostdlib -nostartfiles -shared -o B/elf/ld.so.new		\
> 	  -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs 	\
> 	  B/elf/librtld.os -Wl,--version-script=B/ld.map		\
> 	  -Wl,-soname=ld-linux-aarch64.so.1			\
> 	  -Wl,-defsym=_begin=0
> B/elf/librtld.os: In function `_dl_map_segments':
> S/elf/./dl-map-segments.h:131: undefined reference to `memset'
> ...
> collect2: error: ld returned 1 exit status
> make[2]: *** [B/elf/ld.so] Error 1
> 

This should fix it:
Szabolcs Nagy - Dec. 20, 2017, 12:06 p.m.
On 19/12/17 18:54, Adhemerval Zanella wrote:
> This should fix it:
> 

thanks, committed.

> diff --git a/sysdeps/aarch64/memset.S b/sysdeps/aarch64/memset.S
> index 45fb0a8..7f5127f 100644
> --- a/sysdeps/aarch64/memset.S
> +++ b/sysdeps/aarch64/memset.S
> @@ -19,6 +19,10 @@
>  #include <sysdep.h>
>  #include "memset-reg.h"
>  
> +#ifndef MEMSET
> +# define MEMSET memset
> +#endif
> +
>  /* Assumptions:
>   *
>   * ARMv8-a, AArch64, unaligned accesses
>
Siddhesh Poyarekar - Dec. 22, 2017, 5:03 a.m.
On Wednesday 20 December 2017 12:24 AM, Adhemerval Zanella wrote:
> This should fix it:
> 
> diff --git a/sysdeps/aarch64/memset.S b/sysdeps/aarch64/memset.S
> index 45fb0a8..7f5127f 100644
> --- a/sysdeps/aarch64/memset.S
> +++ b/sysdeps/aarch64/memset.S
> @@ -19,6 +19,10 @@
>  #include <sysdep.h>
>  #include "memset-reg.h"
>  
> +#ifndef MEMSET
> +# define MEMSET memset
> +#endif
> +
>  /* Assumptions:
>   *
>   * ARMv8-a, AArch64, unaligned accesses
> 

Thank you for covering up for me good sir, may your orchards flourish
with fruits of your liking :)

Siddhesh

Patch

diff --git a/sysdeps/aarch64/memset.S b/sysdeps/aarch64/memset.S
index 45fb0a8..7f5127f 100644
--- a/sysdeps/aarch64/memset.S
+++ b/sysdeps/aarch64/memset.S
@@ -19,6 +19,10 @@ 
 #include <sysdep.h>
 #include "memset-reg.h"
 
+#ifndef MEMSET
+# define MEMSET memset
+#endif
+
 /* Assumptions:
  *
  * ARMv8-a, AArch64, unaligned accesses