unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu via Libc-alpha" <libc-alpha@sourceware.org>
To: Florian Weimer <fweimer@redhat.com>, Sunil K Pandey <skpgkp2@gmail.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>,
	"H.J. Lu via Libc-alpha" <libc-alpha@sourceware.org>
Subject: Re: [PATCH] <bits/platform/x86.h>: Correct x86_cpu_TBM
Date: Wed, 16 Feb 2022 16:10:44 -0800	[thread overview]
Message-ID: <CAMe9rOpZQuj4h5HW0rpTpBZjYkd1rHcMn9tQ9EiNJO=gT1Yo+Q@mail.gmail.com> (raw)
In-Reply-To: <871rd88m9z.fsf@oldenburg.str.redhat.com>

On Mon, Feb 22, 2021 at 1:49 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * 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
>

I am backporting this to 2.33 branch.

-- 
H.J.

      reply	other threads:[~2022-02-17  0:11 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
2022-02-17  0:10             ` H.J. Lu via Libc-alpha [this message]

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='CAMe9rOpZQuj4h5HW0rpTpBZjYkd1rHcMn9tQ9EiNJO=gT1Yo+Q@mail.gmail.com' \
    --to=libc-alpha@sourceware.org \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=schwab@linux-m68k.org \
    --cc=skpgkp2@gmail.com \
    /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).