From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
To: "H.J. Lu via Libc-alpha" <libc-alpha@sourceware.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: [PATCH] <bits/platform/x86.h>: Correct x86_cpu_TBM
Date: Mon, 22 Feb 2021 10:49:44 +0100 [thread overview]
Message-ID: <871rd88m9z.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20210202150139.GA545211@gmail.com> (H. J. Lu via Libc-alpha's message of "Tue, 2 Feb 2021 07:01:39 -0800")
* H. J. Lu via Libc-alpha:
>> Checking HAS_CPU_FEATURE (TBM):
>> HAS_CPU_FEATURE (TBM): 0
>> cpuinfo (tbm): 1
>> *** failure ***
>
> Please try th patch enclosed here.
>
>> 2 differences between /proc/cpuinfo and glibc code.
>>
>
> Thanks.
>
> H.J.
> ---
> x86_cpu_TBM should be x86_cpu_index_80000001_ecx + 21.
> ---
> sysdeps/x86/bits/platform/x86.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sysdeps/x86/bits/platform/x86.h b/sysdeps/x86/bits/platform/x86.h
> index 8f423ae721..dd59224b7f 100644
> --- a/sysdeps/x86/bits/platform/x86.h
> +++ b/sysdeps/x86/bits/platform/x86.h
> @@ -244,7 +244,7 @@ enum
> x86_cpu_XOP = x86_cpu_index_80000001_ecx + 11,
> x86_cpu_LWP = x86_cpu_index_80000001_ecx + 15,
> x86_cpu_FMA4 = x86_cpu_index_80000001_ecx + 16,
> - x86_cpu_TBM = x86_cpu_index_80000001_ecx + 20,
> + x86_cpu_TBM = x86_cpu_index_80000001_ecx + 21,
>
> x86_cpu_index_80000001_edx
> = (CPUID_INDEX_80000001 * 8 * 4 * sizeof (unsigned int)
I've verified this works works on a system with tbm in /proc/cpuinfo.
the bit offset also matches what's documented elsewhere. Looks good to
me.
Thanks,
Florian
next prev parent reply other threads:[~2021-02-22 9:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-21 19:47 [PATCH] x86: Properly match CPU feature [BZ #27222] H.J. Lu via Libc-alpha
2021-01-22 15:01 ` H.J. Lu via Libc-alpha
2021-01-22 16:56 ` Adhemerval Zanella via Libc-alpha
2021-01-22 18:11 ` H.J. Lu via Libc-alpha
2021-02-02 11:07 ` Andreas Schwab
2021-02-02 15:01 ` [PATCH] <bits/platform/x86.h>: Correct x86_cpu_TBM H.J. Lu via Libc-alpha
2021-02-22 9:49 ` Florian Weimer via Libc-alpha [this message]
2022-02-17 0:10 ` H.J. Lu via Libc-alpha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871rd88m9z.fsf@oldenburg.str.redhat.com \
--to=libc-alpha@sourceware.org \
--cc=fweimer@redhat.com \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).