From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 19B40385DC1E for ; Tue, 11 Jun 2024 19:48:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 19B40385DC1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 19B40385DC1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::432 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718135303; cv=none; b=aiNLhmbaMGPvpsazL7qMvfmCPh1MvCSh5YkqcQlpuMAEFMuG4UOaUFFWkFESmKGhbOOR8+o9T8ghOylNot0x0BCZ+zIkrF8HDDP6uz1L/Kp+f6U1Spk5OzUnSFF/BWEs8bCtR6b6YxqlxqXBz2ToUq/5P6UmbvaNqrhp75jb+6Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718135303; c=relaxed/simple; bh=GhZtnwmR9Nqaw+1JR/IHebgTD0gzPMn19VOfEZEcjKs=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=JY9RIYTrfTGalcsYav1nsmIzVD4ZsHrhD7tSW5IS0u2RJB9t6uKz9AcUDYenwt6kdKH+mBu8HMXjx4xaV1ohSeZjAoK8DBKqUaG1ko9TZQNTDZLwJ0CbS44wERpj76FCOigGr2wxhwen20ZgXJdMndfGiYjSL7Y+jtczdHThVo4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-704313fa830so2482315b3a.3 for ; Tue, 11 Jun 2024 12:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718135300; x=1718740100; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=8cNk6JfUyjy9rQym/V+L/lszqwmzg5EPWY9VW4IyHP8=; b=asyoFKF3gm9wFNqVeogUu3BClvbtHHX8k4RQY8oQrAPG16PRGkZi6+R4POLnF3DlzG ISTp7d5ubHQ5XrL7uTSbO1aTQGyNa71PeEDPYvMsTvFKyQ/87sW3djhdr4FmNT5VtN7T CQ5nXD5LswsJFMLq4jusEduM0D6s+Cm4KS/EUii3J0gexHiDGbTbd4mUlWDf76O6dzrR 4WC17UfmjCfEvJNAEU5dOofnMdvUQtuuxgKax13mlZrthupk02EiJpA5+rb6a3VqpeP5 KEnIQYDhwzY0kS9nEJ/KChlpABW0xY1r0ImpJA5dWt+DrfYA5cggzRTDg7N+KJ26IXZC RhtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718135300; x=1718740100; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8cNk6JfUyjy9rQym/V+L/lszqwmzg5EPWY9VW4IyHP8=; b=dWS5lOqxJx6bof+GGWYDyl3hm/o/m7thjsamVza7DJoU7x20FjY9Dr8uW4w0Oi5LDM 3H/XkBBbYSzoH8ezEFxiZ2pTNJa2SosbZlJUFxpFz7s4fJOIxOmxG1jtJWwKyC8aAqYU cRarww9pCD7E2qUJZftysY6xlBceSryCIpQ7fMUcXbSNXqOyQE+H+iIlJbeDJO5dm15N +g544Jy15MLHg3j6MmsqCV24GY9hpSg/AjwckQqyIBIpPBRVULCxgnTE46jYVY8ITvdQ s1cc9DcBdUM+whiJqagpJ4ykoYyONsGGTeoDdfbdjZ5bazgdo4I4A3Vll3E8R5Eb58Oj Tdjg== X-Forwarded-Encrypted: i=1; AJvYcCWEpFS4Ie5wexK9mIVbCPZTzyS7+xe2NvfQCzd/97FB/PZeWvRaFd9vgQLP4DIDZ5is5XFQddSX+LvyGx8q4dkk46z8m0YdsppZ X-Gm-Message-State: AOJu0YyjhPohXyjiMbCikZu9y7xwdwU4kPofjTMUc6vv6ubUC/wyV0GT CBJTQRpGInIZZsXs88lE1P/V4IeL3ApyrZBucFrIzqqPrEES6IRw20igHCccmBo= X-Google-Smtp-Source: AGHT+IG5uVan34Z/xhAzaFiBjNvg9fMWST2xtR+Cl3ZPlvoUJqmzpCfnlSG20oQeHAiYXHGV5w/QBw== X-Received: by 2002:a05:6a21:8184:b0:1b8:8c51:68d2 with SMTP id adf61e73a8af0-1b88c516d82mr2683501637.35.1718135300019; Tue, 11 Jun 2024 12:48:20 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c0:c5fb:e1da:f9b7:66da:199? ([2804:1b3:a7c0:c5fb:e1da:f9b7:66da:199]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c312c80edasm4233134a91.42.2024.06.11.12.48.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Jun 2024 12:48:19 -0700 (PDT) Message-ID: Date: Tue, 11 Jun 2024 16:48:16 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC 7/9] elf: Remove _DL_PLATFORMS_COUNT To: Stefan Liebler , libc-alpha@sourceware.org Cc: fweimer@redhat.com, devel@otheo.eu, bergner@linux.ibm.com References: <20240607114543.659306-1-stli@linux.ibm.com> <20240607114543.659306-8-stli@linux.ibm.com> Content-Language: en-US From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20240607114543.659306-8-stli@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 > --- > 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 > > - > -#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 > > - > -#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 > > - > -#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 > . */ > > -/* 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 > > #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 > . */ > > -/* 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.