This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][aarch64] Fix hwcap argument passed to ifunc resolvers
- From: Steve Ellcey <sellcey at cavium dot com>
- To: Carlos O'Donell <carlos at redhat dot com>, Szabolcs Nagy <szabolcs dot nagy at arm dot com>, libc-alpha <libc-alpha at sourceware dot org>
- Cc: nd at arm dot com
- Date: Fri, 01 Sep 2017 10:30:41 -0700
- Subject: Re: [PATCH][aarch64] Fix hwcap argument passed to ifunc resolvers
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steve dot Ellcey at cavium dot com;
- References: <1504132534.3182.4.camel@cavium.com> <59A8291E.2060205@arm.com> <1504195926.3182.20.camel@cavium.com> <0a36b77d-d8b2-14cb-2ff3-2d61b206f856@redhat.com> <1504286544.3182.61.camel@cavium.com>
- Reply-to: sellcey at cavium dot com
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
I think I found my problem, tunable_is_name returns true if it matches
and false if it does not but the use of it
in sysdeps/unix/sysv/linux/aarch64/cpu-features.c is:
if (tunable_is_name (mcpu, cpu_list[i].name) == 0)
It should just be:
if (tunable_is_name (mcpu, cpu_list[i].name))
I will send a patch for this once I have tested it.
Steve Ellcey
sellcey@cavium.com
On Fri, 2017-09-01 at 10:22 -0700, Steve Ellcey wrote:
> On Thu, 2017-08-31 at 18:59 -0500, Carlos O'Donell wrote:
>
> >
> > I'd just use the tunables.
> OK, I think using tunables is reasonable. I seem to be having some
> trouble with it though, maybe you can tell me if I am doing something
> wrong.
>
> On a thunderx box I run a program that calls memcpy, which is an
> ifunc.
> It then calls __memcpy_thunderx the way I think it should.
>
> Then, in the debugger, I run:
>
> set environment GLIBC_TUNABLES=glibc.tune.cpu=generic
>
> I rerun my test program and instead of calling __memcpy_generic
> (which
> it should) or __memcpy_thunderx (which it did before), it calls
> __memcpy_falkor, which is totally wrong. Am I setting the variable
> incorrectly? I don't see any problems with the IS_FALKOR macro so I
> think the problem may be in tunable_is_name unless I am just messing
> up how GLIBC_TUNABLES is supposed to be set.
>
> Steve Ellcey
> sellcey@cavium.com