This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3 0/4] aarch64: Allow overriding HWCAP_CPUID feature check
- From: Siddhesh Poyarekar <siddhesh at sourceware dot org>
- To: sellcey at cavium dot com
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, adhemerval dot zanella at linaro dot org
- Date: Thu, 1 Jun 2017 10:59:05 +0530
- Subject: Re: [PATCH v3 0/4] aarch64: Allow overriding HWCAP_CPUID feature check
- Authentication-results: sourceware.org; auth=none
- References: <bebe9cec-5156-4bfc-9b41-6db09af69981@email.android.com> <1496163265.18342.54.camel@cavium.com> <1496172169.18342.58.camel@cavium.com> <1496175803.18342.61.camel@cavium.com>
- Reply-to: siddhesh at sourceware dot org
On Wednesday 31 May 2017 01:53 AM, Steve Ellcey wrote:
> OK, I made a little progress. If I don't set LD_HWCAP_MASK then it
> seems to be treating it as 0, even though the default value is supposed
> to be HWCAP_IMPORTANT which gets set to HWCAP_CPUID. If I explicitly
> set LD_HWCAP_MASK to 0x800 then I get the correct heaviour and my
> program checks for CPUID. I am not sure why the default value for
> LD_HWCAP_MASK does not seem to be right.
I just realized what's going on; it is a bug in tunables. The
__tunables_set_val function returns without setting the value if the
value was not set by glibc.tune.hwcap_mask or LD_HWCAP_MASK, which is
wrong. It should return whatever is set in the tunable list.
I'll fix that and repost.
Siddhesh