public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: "H.J. Lu via Libc-alpha" <libc-alpha@sourceware.org>
Subject: Re: V4: [PATCH] x86: Install <sys/platform/x86.h> [BZ #26124]
Date: Thu, 25 Jun 2020 09:33:26 +0200	[thread overview]
Message-ID: <87a70r8urd.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <CAMe9rOokWC_NrHEBQB43zxyLPRGHgdqb+w1=7oHGuhmnPi43Qw@mail.gmail.com> (H. J. Lu via Libc-alpha's message of "Wed, 24 Jun 2020 14:10:19 -0700")

* H. J. Lu via Libc-alpha:

>> is not expected to be extendable. The macro API is not my favorite way of
>
> We can expand the cpuid array.  We just need to add an alias to
> __x86_get_cpu_features
> with a new symbol version.

Agreed, from a GNU gABI perspective.

However, for some distributions, this requirement will put hardware
enablement for new CPUs on hold until we have reworked our package
dependency generation, so that we can express symbol-specific version
information.  Debian & downstreams can already do this, with some manual
work, but Fedora & downstreams can only express versions on sonames.
(Without these changes, we would have to backport the entire GLIBC_2.33
symbol set to get __x86_get_cpu_features@GLIBC_2.33, for example.  This
is not something we will be able to do in all cases, depending on the
other changes that are going in.)

Even then, we can only backport such changes if a glibc release has
happened (so that we can be sure that the meaning of the symbol version
will not change again).

My proposal, where the index is passed to the function and the function
returns the flag word, does not have these issues: old glibcs will
simply return 0 flags, and the feature appears unusable/unavailable.
This is what already happens with your approach, too, if we use more
bits inside the existing array elements.

I'm not entirely opposed to enhancing the RPM dependency generation, but
I already tried once and couldn't get it done, and if I fail again, it
might seriously impact CPU hardware enablement in Red Hat Enterprise
Linux 9.  I hope this explains my reservations about this interface
design.

Thanks,
Florian


  reply	other threads:[~2020-06-25  7:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17 19:31 [PATCH] x86: Install <cpu-features.h> " H.J. Lu
2020-06-17 20:54 ` Joseph Myers
2020-06-18  0:08   ` [PATCH] x86: Install <sys/platform/x86.h> " H.J. Lu
2020-06-18  8:45     ` Florian Weimer
2020-06-18 16:14       ` V2: " H.J. Lu
2020-06-22  9:09         ` Florian Weimer
2020-06-22 20:25           ` V3: " H.J. Lu
2020-06-22 20:41             ` Florian Weimer
2020-06-22 20:53               ` H.J. Lu
2020-06-22 21:14                 ` Florian Weimer
2020-06-22 22:18                   ` H.J. Lu
2020-06-22 23:14                     ` V4: " H.J. Lu
2020-06-24 14:33                       ` Florian Weimer
2020-06-24 20:04                         ` Adhemerval Zanella
2020-06-24 21:10                           ` H.J. Lu
2020-06-25  7:33                             ` Florian Weimer [this message]
2020-06-25 12:30                               ` V5: " H.J. Lu
2020-06-25 13:20                                 ` V6: " H.J. Lu
2020-06-26 12:52                                   ` H.J. Lu
2020-06-26 13:20                                     ` Florian Weimer
2020-06-26 13:44                                       ` H.J. Lu
2020-06-29 16:13                                   ` Florian Weimer
2020-06-29 16:44                                     ` H.J. Lu
2020-06-29 16:49                                       ` Florian Weimer
2020-06-30  0:29                                         ` H.J. Lu
2020-06-30  9:46                                           ` Florian Weimer
2020-06-30 12:19                                             ` H.J. Lu
2020-06-24 22:07                           ` V4: " Joseph Myers

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=87a70r8urd.fsf@oldenburg2.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.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).