public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Stefan Liebler <stli@linux.ibm.com>, libc-alpha@sourceware.org
Cc: fweimer@redhat.com, devel@otheo.eu, bergner@linux.ibm.com
Subject: Re: [RFC 7/9] elf: Remove _DL_PLATFORMS_COUNT
Date: Tue, 11 Jun 2024 16:48:16 -0300	[thread overview]
Message-ID: <abf220e4-bdda-459f-9eae-a3d9ab627c8f@linaro.org> (raw)
In-Reply-To: <20240607114543.659306-8-stli@linux.ibm.com>



On 07/06/24 08:42, Stefan Liebler wrote:
> Remove the definitions of _DL_PLATFORMS_COUNT as those are not used
> anymore after removal in elf/dl-cache.c:search_cache().
> 
> Note: On x86, we can also get rid of the definitions
> HWCAP_PLATFORMS_START and HWCAP_PLATFORMS_COUNT.

LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  sysdeps/alpha/dl-procinfo.h     |  3 ---
>  sysdeps/csky/dl-procinfo.h      |  3 ---
>  sysdeps/mips/dl-procinfo.h      |  3 ---
>  sysdeps/powerpc/dl-procinfo.h   |  2 --
>  sysdeps/s390/dl-procinfo.h      |  2 --
>  sysdeps/x86/dl-hwcap.h          | 10 ++--------
>  sysdeps/x86/dl-procinfo.c       |  5 ++---
>  sysdeps/x86/dl-procinfo.h       |  1 -
>  sysdeps/x86_64/dl-procruntime.c |  5 ++---
>  9 files changed, 6 insertions(+), 28 deletions(-)
> 
> diff --git a/sysdeps/alpha/dl-procinfo.h b/sysdeps/alpha/dl-procinfo.h
> index 90f83ec24e..a5264f9f2c 100644
> --- a/sysdeps/alpha/dl-procinfo.h
> +++ b/sysdeps/alpha/dl-procinfo.h
> @@ -21,9 +21,6 @@
>  
>  #include <ldsodefs.h>
>  
> -
> -#define _DL_PLATFORMS_COUNT   5
> -
>  /* We cannot provide a general printing function.  */
>  #define _dl_procinfo(type, word) -1
>  
> diff --git a/sysdeps/csky/dl-procinfo.h b/sysdeps/csky/dl-procinfo.h
> index 803441f52c..3e7c63ee67 100644
> --- a/sysdeps/csky/dl-procinfo.h
> +++ b/sysdeps/csky/dl-procinfo.h
> @@ -22,9 +22,6 @@
>  
>  #include <ldsodefs.h>
>  
> -
> -#define _DL_PLATFORMS_COUNT   4
> -
>  /* We cannot provide a general printing function.  */
>  #define _dl_procinfo(word, val) -1
>  
> diff --git a/sysdeps/mips/dl-procinfo.h b/sysdeps/mips/dl-procinfo.h
> index 7185542eac..79c2acc388 100644
> --- a/sysdeps/mips/dl-procinfo.h
> +++ b/sysdeps/mips/dl-procinfo.h
> @@ -21,9 +21,6 @@
>  
>  #include <ldsodefs.h>
>  
> -
> -#define _DL_PLATFORMS_COUNT   4
> -
>  /* We cannot provide a general printing function.  */
>  #define _dl_procinfo(type, word) -1
>  
> diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h
> index 5b628a27ca..81eb9fba87 100644
> --- a/sysdeps/powerpc/dl-procinfo.h
> +++ b/sysdeps/powerpc/dl-procinfo.h
> @@ -38,8 +38,6 @@
>  #define HWCAP_IMPORTANT		(PPC_FEATURE_HAS_ALTIVEC \
>  				+ PPC_FEATURE_HAS_DFP)
>  
> -#define _DL_PLATFORMS_COUNT	17
> -
>  #define _DL_FIRST_PLATFORM	32
>  
>  /* Platform bits (relative to _DL_FIRST_PLATFORM).  */
> diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h
> index ef2a084ce7..7092ed1e2d 100644
> --- a/sysdeps/s390/dl-procinfo.h
> +++ b/sysdeps/s390/dl-procinfo.h
> @@ -23,8 +23,6 @@
>  #define _DL_HWCAP_COUNT 23
>  extern const char _dl_s390_cap_flags[_DL_HWCAP_COUNT][9] attribute_hidden;
>  
> -#define _DL_PLATFORMS_COUNT	11
> -
>  /* Hardware capability bit numbers are derived directly from the
>     facility indications as stored by the "store facility list" (STFL)
>     instruction.
> diff --git a/sysdeps/x86/dl-hwcap.h b/sysdeps/x86/dl-hwcap.h
> index e14e755bd7..246fdcd831 100644
> --- a/sysdeps/x86/dl-hwcap.h
> +++ b/sysdeps/x86/dl-hwcap.h
> @@ -20,20 +20,14 @@
>  
>  #if IS_IN (ldconfig)
>  /* Since ldconfig processes both i386 and x86-64 libraries, it needs
> -   to cover all platforms and hardware capabilities.  */
> -# define HWCAP_PLATFORMS_START	0
> -# define HWCAP_PLATFORMS_COUNT	4
> +   to cover all hardware capabilities.  */
>  # define HWCAP_IMPORTANT \
>    (HWCAP_X86_SSE2 | HWCAP_X86_64 | HWCAP_X86_AVX512_1)
>  #elif defined __x86_64__
> -/* For 64 bit, only cover x86-64 platforms and capabilities.  */
> -# define HWCAP_PLATFORMS_START	2
> -# define HWCAP_PLATFORMS_COUNT	4
> +/* For 64 bit, only cover x86-64 capabilities.  */
>  # define HWCAP_IMPORTANT	(HWCAP_X86_64 | HWCAP_X86_AVX512_1)
>  #else
>  /* For 32 bit, only cover i586, i686 and SSE2.  */
> -# define HWCAP_PLATFORMS_START	0
> -# define HWCAP_PLATFORMS_COUNT	2
>  # define HWCAP_IMPORTANT	(HWCAP_X86_SSE2)
>  #endif
>  
> diff --git a/sysdeps/x86/dl-procinfo.c b/sysdeps/x86/dl-procinfo.c
> index 165ffd89a9..b791fd3e92 100644
> --- a/sysdeps/x86/dl-procinfo.c
> +++ b/sysdeps/x86/dl-procinfo.c
> @@ -16,9 +16,8 @@
>     License along with the GNU C Library; if not, see
>     <https://www.gnu.org/licenses/>.  */
>  
> -/* This information must be kept in sync with the _DL_HWCAP_COUNT,
> -   HWCAP_PLATFORMS_START and HWCAP_PLATFORMS_COUNT definitions in
> -   dl-hwcap.h.
> +/* This information must be kept in sync with the _DL_HWCAP_COUNT
> +   definition in dl-hwcap.h.
>  
>     If anything should be added here check whether the size of each string
>     is still ok with the given array size.
> diff --git a/sysdeps/x86/dl-procinfo.h b/sysdeps/x86/dl-procinfo.h
> index a8d7d4ed32..ea0f33bbad 100644
> --- a/sysdeps/x86/dl-procinfo.h
> +++ b/sysdeps/x86/dl-procinfo.h
> @@ -22,6 +22,5 @@
>  #include <dl-hwcap.h>
>  
>  #define _DL_HWCAP_COUNT		HWCAP_COUNT
> -#define _DL_PLATFORMS_COUNT	HWCAP_PLATFORMS_COUNT
>  
>  #endif /* dl-procinfo.h */
> diff --git a/sysdeps/x86_64/dl-procruntime.c b/sysdeps/x86_64/dl-procruntime.c
> index 7078581778..0859438ed0 100644
> --- a/sysdeps/x86_64/dl-procruntime.c
> +++ b/sysdeps/x86_64/dl-procruntime.c
> @@ -16,9 +16,8 @@
>     License along with the GNU C Library; if not, see
>     <https://www.gnu.org/licenses/>.  */
>  
> -/* This information must be kept in sync with the _DL_HWCAP_COUNT,
> -   HWCAP_PLATFORMS_START and HWCAP_PLATFORMS_COUNT definitions in
> -   dl-hwcap.h.
> +/* This information must be kept in sync with the _DL_HWCAP_COUNT
> +   definition in dl-hwcap.h.
>  
>     If anything should be added here check whether the size of each string
>     is still ok with the given array size.

  reply	other threads:[~2024-06-11 19:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07 11:42 [RFC 0/9] Remove legacy platform bits and cleanups Stefan Liebler
2024-06-07 11:42 ` [RFC 1/9] x86: Remove HWCAP_START and HWCAP_COUNT Stefan Liebler
2024-06-11 18:14   ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 2/9] elf: Remove loading legacy hwcaps/platform entries in dynamic loader Stefan Liebler
2024-06-11 18:57   ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 3/9] elf: Remove _dl_string_platform Stefan Liebler
2024-06-11 19:09   ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 4/9] elf: Remove platform strings in dl-procinfo.c Stefan Liebler
2024-06-11 19:20   ` Adhemerval Zanella Netto
2024-06-12  7:32     ` [V2] " Stefan Liebler
2024-06-14 12:58       ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 5/9] elf: Remove _DL_HWCAP_PLATFORM Stefan Liebler
2024-06-11 19:28   ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 6/9] elf: Remove _DL_FIRST_PLATFORM Stefan Liebler
2024-06-11 19:29   ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 7/9] elf: Remove _DL_PLATFORMS_COUNT Stefan Liebler
2024-06-11 19:48   ` Adhemerval Zanella Netto [this message]
2024-06-07 11:42 ` [RFC 8/9] elf: Remove LD_HWCAP_MASK / tunable glibc.cpu.hwcap_mask Stefan Liebler
2024-06-11 20:04   ` Adhemerval Zanella Netto
2024-06-07 11:42 ` [RFC 9/9] elf: Remove HWCAP_IMPORTANT Stefan Liebler
2024-06-11 20:07   ` Adhemerval Zanella Netto
2024-06-07 12:18 ` [RFC 0/9] Remove legacy platform bits and cleanups Florian Weimer
2024-06-10 13:23   ` Stefan Liebler
2024-06-10 14:03     ` Florian Weimer
2024-06-11 12:24       ` Stefan Liebler
2024-06-08 11:09 ` Florian Weimer
2024-06-10 13:36   ` Stefan Liebler
2024-06-11 12:13     ` Stefan Liebler
2024-06-12  7:50       ` Stefan Liebler
2024-06-18  8:55         ` Stefan Liebler

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=abf220e4-bdda-459f-9eae-a3d9ab627c8f@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=bergner@linux.ibm.com \
    --cc=devel@otheo.eu \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=stli@linux.ibm.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).