From: Nicholas Piggin <npiggin@gmail.com>
To: Segher Boessenkool <segher@kernel.crashing.org>,
Tulio Magno Quites Machado Filho <tuliom@ascii.art.br>
Cc: Florian Weimer <fweimer@redhat.com>,
gcc@gcc.gnu.org, libc-alpha@sourceware.org,
linuxppc-dev@lists.ozlabs.org,
Paul E Murphy <murphyp@linux.ibm.com>
Subject: Re: [PATCH v2] powerpc: add documentation for HWCAPs
Date: Wed, 20 Jul 2022 19:28:23 +1000 [thread overview]
Message-ID: <1658309165.qvjv58f7ui.astroid@bobo.none> (raw)
In-Reply-To: <874jziuo49.fsf@linux.ibm.com>
Excerpts from Tulio Magno Quites Machado Filho's message of July 16, 2022 6:17 am:
> Segher Boessenkool <segher@kernel.crashing.org> writes:
>
>> That is a usability problem. Can it be fixed, or will that create its
>> own compatibility problems? In practice I mean. If it is, the C
>> libraries could fix it up, for new programs, and then after a while the
>> kernel can do the sane thing?
>>
>> How big is the problem, anyway? Is it only 2.05, or also 2.04, 2.03?
>
> PPC_FEATURE_ARCH_2_05 is the first bit referring to an ISA level.
> Before that, AT_HWCAP used to have bits for specific processors, e.g.
> PPC_FEATURE_CELL and PPC_FEATURE_POWER4.
>
> Notice that glibc creates its own hwcap-based information that is used by
> __builtin_cpu_supports(). In this case bits PPC_FEATURE_ARCH_2_05,
> PPC_FEATURE_POWER5_PLUS, PPC_FEATURE_POWER5 and PPC_FEATURE_POWER4 are enabled
> whenever if the processor is compatible with the features provided by any of
> the previous processors [1].
> AT_HWCAP and AT_HWCAP2 are kept intact, though.
>
> [1] https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/powerpc/hwcapinfo.c;h=afde05f86382413ce1f0c38e33c9bdd38d6b7e9d;hb=HEAD#l45
Hmm, this doesn't seem very nice. That said, before possibly changing
that in the kernel, documenting existing unexpected behaviour is
probably a good idea. Good catch, I obviously wasn't careful enough
reviewing these bits.
I'll send out a final patch with this adjustment in a week or so in
case any more comments come in the meantime.
Thanks,
Nick
next prev parent reply other threads:[~2022-07-20 9:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-15 1:26 Nicholas Piggin
2022-07-15 14:57 ` Segher Boessenkool
2022-07-15 18:41 ` Tulio Magno Quites Machado Filho
2022-07-15 19:59 ` Segher Boessenkool
2022-07-15 20:17 ` Tulio Magno Quites Machado Filho
2022-07-20 9:28 ` Nicholas Piggin [this message]
2022-07-29 13:02 ` Michael Ellerman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1658309165.qvjv58f7ui.astroid@bobo.none \
--to=npiggin@gmail.com \
--cc=fweimer@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=libc-alpha@sourceware.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=murphyp@linux.ibm.com \
--cc=segher@kernel.crashing.org \
--cc=tuliom@ascii.art.br \
/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).