From patchwork Fri Jun 7 11:42:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Liebler X-Patchwork-Id: 1945073 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=jsmsM5tq; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VwffM3rN7z20KL for ; Fri, 7 Jun 2024 21:50:51 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C2A2A3A69D1C for ; Fri, 7 Jun 2024 11:50:49 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 351E63A69D10 for ; Fri, 7 Jun 2024 11:50:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 351E63A69D10 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 351E63A69D10 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717761021; cv=none; b=MBKiomOifTnyWHJ8keoZSMj4/dLtEQFPaT9+xvll7WfyJninfJbrE0NEmL+5JCE0xg86Rxt0taili7jSNQnmG33mCi/Hkh3b841QvHNAwsGPbqP3YbkzFweZOJFVeVyOuUSx4sE89ateMjD68TRZpsrpG7JmUQZ0ID7d6erci2M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717761021; c=relaxed/simple; bh=9LIWovw6M4FQrIWpr9/vqUr56V0Uz+WYNXAVfPZfZek=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=KJKPafuKnlbUyqkEzKixHyCQapd0SHTWXZBdcC4JjSWs3n6XtcQft1izxX5D47fAtX24r9fCkQeOrzxchQPLcKwDCtPlTX3WxHOso1vAFSbXQBmw3t5WKZ4vvP+mKmiT9DlLLbEJLatEIx8VSEpH/4A4gUxpZdhkSUbRKUjYbPE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 457BKdX3018831; Fri, 7 Jun 2024 11:50:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc : content-transfer-encoding : date : from : in-reply-to : message-id : mime-version : references : subject : to; s=pp1; bh=J62V/8h1H4lL37CKSu0RM0+6jX7TOLK/ujrC72FBfwY=; b=jsmsM5tqtqN8kaag1H0ChQC/e9Iu/VK2JE3Brc8jdR3O4hcMWgu5MlKuzIQjwfv0fED3 KBTm7e0LvPfc9riF5G6TnHjPNl5L5+XCN1hP1m2rI736XOUkPSwFrK8y4htpo59gBTp+ ONJuD/qelet57dns81Cssd0SGrHMoDMSrVLsasZ4yyCPg2deCoV7+DOVnGi1+Af9emAU 1E5Me+9ObHZA5fabIC1/CBtz0fu/rfVMqxzMmN4oWlQpJirnkZ4XDRWGh4z36PBq/Zf+ OdOfKqbaGVHg+EZUHntBAiwWbcoz6l1HWQ8QDQIu57xUKQc4R9f3gUcdWgfdIjKA2/mJ PA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ym0tyr3gh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Jun 2024 11:50:15 +0000 Received: from m0353728.ppops.net (m0353728.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 457BoEB4002044; Fri, 7 Jun 2024 11:50:14 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ym0tyr3ef-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Jun 2024 11:50:14 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 457AraPI026513; Fri, 7 Jun 2024 11:46:03 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3yggp3fwjv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Jun 2024 11:46:03 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 457BjwPO30933284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 7 Jun 2024 11:46:00 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4A88F20040; Fri, 7 Jun 2024 11:45:58 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1C6DF2004D; Fri, 7 Jun 2024 11:45:58 +0000 (GMT) Received: from a35lp69.lnxne.boe (unknown [9.152.108.100]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 7 Jun 2024 11:45:58 +0000 (GMT) From: Stefan Liebler To: libc-alpha@sourceware.org Cc: fweimer@redhat.com, devel@otheo.eu, adhemerval.zanella@linaro.org, bergner@linux.ibm.com, Stefan Liebler Subject: [RFC 7/9] elf: Remove _DL_PLATFORMS_COUNT Date: Fri, 7 Jun 2024 13:42:42 +0200 Message-ID: <20240607114543.659306-8-stli@linux.ibm.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240607114543.659306-1-stli@linux.ibm.com> References: <20240607114543.659306-1-stli@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: wWmjf9L7Ld3t7uzD9h3Pr1Sqx_esE_D9 X-Proofpoint-GUID: TM8zW2PTGnB-lsy7A4zUGm82lcTudJH3 X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-07_06,2024-06-06_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 impostorscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=654 suspectscore=0 malwarescore=0 clxscore=1015 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406070086 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org 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. 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.