From patchwork Wed Feb 26 19:00:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 2052548 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=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=nI0WJfm0; 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 4Z33n32kymz1yCp for ; Thu, 27 Feb 2025 06:04:39 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6A51D3858D28 for ; Wed, 26 Feb 2025 19:04:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A51D3858D28 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=nI0WJfm0 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id A7AA53858D28 for ; Wed, 26 Feb 2025 19:03:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A7AA53858D28 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 A7AA53858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::632 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740596599; cv=none; b=qeCfWzyLqkYmwRg0o1cz3uuEM1ZUZcFZ7ki3QOar/GDGofLU5cgVsEqJC8ZEnyj4TK40lJDAHdri/ebmuM32F2iATKYoWCt6CKIdhmdxaWvawvtN7GUzBVUZ8NHEDgwm8lEp5VX9xUPRnlS3KIEJ0nhw4DQ3FJwbOy/CGAOEAqk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740596599; c=relaxed/simple; bh=tcQtmebxIshu0nBfyl3VUdiU3nY1xNT+htwABimAH3I=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=TLh0+oFw7l9ZWDdhmMKA6AQbSgcU6Jjqn84l5p+ylkBzCmUIHFQQ0rjzsUvMuVRb7DijpsP7TaJLnY500lkefoG4rDz1SMXfyWDCr+hFKKI9bsrmC5tgghNvq1/A03JTHZK+rYo3zSZVzAeRUlBahStInH2rrWg8VPjc7/RBubA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7AA53858D28 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-220e989edb6so2114035ad.1 for ; Wed, 26 Feb 2025 11:03:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740596597; x=1741201397; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=T5SIUaqZfbcX8pqion4EWQgREJRwTknTT1xqEA7aKoM=; b=nI0WJfm0xBcifsSZDSxglGqcrE/l/5+ESC5azH5mSaHuojvaS3PjF+4/dMZ+TY7Zkn j7uBwObmmBFGx2uy/V/YO8clNlQc+2j1WQsCEJTuSVif/r55MuOkmux3bOjhLuFAlejp A6sHsq3KR4hgxErs1/Clzg4DmwbqqXWh6/hJJElbP0IjbxolvK9KhAjCS2zv+up+X6ho 9u8ToICFfS5H00Zl9/kd7MsWbK2CajNC5z8ktZg/VnZH/ALmuoAU109mFBNluUee8QHz xrAO+t50jM65fNTZsCqs3nauhB4XiRCDRf9V832E94ZLiNVfcRmSLOCF1QwYj05B3QGE HwsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740596597; x=1741201397; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T5SIUaqZfbcX8pqion4EWQgREJRwTknTT1xqEA7aKoM=; b=n+4a7uQiw6ha2SXeTulh0OjQf1GdaV1gvnzVTQuyqubcE5IlQqaKWKRTbcAUAivc0I PdHZpLrF0LnZTMhKZRabkS2mrqwfa78Sn/CUG+7/SOSgMYW55pk69i++DvQacCjXa1UP pxpzX8qlq4J1mEp5kbZGuenR3HOpJeD9uc5POK13fri80ZRpBdPbMhiR9357rf8CSNA5 5ArBWE9WJ+pYi0k4BTo5QttJv+oRpp/ArY2Et2yKn8kvXJt1/3GUhzvn8ZqWyTSlFzyJ ncwUMvoFh68xI3gyJ5Ytu3RTcVAUbgTwLqPm5AkrfQ4CjQ/nUkb+myvuPavewBMQLtDm JAMA== X-Gm-Message-State: AOJu0Yyc5S1hyDHREiCMNLSKIKyxlq83J8F2KOp1lBm+hdlTSinZ7Rou /aw8O1cO4tl4UPnSU+XGtnbNZRA/qAiiT/5i21r39lGSDcm8U6oIkF1acNArbKFgZCBiwzCg8CO j X-Gm-Gg: ASbGncvIaIe9mGncYOU0kFeV7cdprbRiPYl9izj70/97+YF6m07BYlBEvDIoy97ntze HVgmCqZgiHv5eugeERjrsoQvswS8hIX9dnqUJA+M+W1TJ+2xgffhHX6aqkFeQSw5Qamgk73G51F H0XWTGdIiDEF6BxZfDPVkyHCxyILNyPmrGLbzMl1E5uJyqgBIJraao0HIc3j6Eb1Pm3pulPZpZr X4KAQ5vEO5ehp7FrYgf0YuulHb9QcHPz6BiEIyUefzSpns/XVbgo6WsqqlZp6qLOXxq/QJ9UMMf EPRnD2N+4Waep3ySzC/is9f2AMy9DTQFI93VFbo= X-Google-Smtp-Source: AGHT+IExtHdwUSu+ZrzW3ZeAGwookI0I/lLiHNthBegZIjZA54ZSiQGGzQhjDvoNsKd4+/BqE4OpPw== X-Received: by 2002:a17:902:e5ce:b0:21f:78f:c178 with SMTP id d9443c01a7336-22307b32c7bmr110711015ad.3.1740596596532; Wed, 26 Feb 2025 11:03:16 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c3:f704:a0c6:9418:957f:d5bf]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22344c837e2sm6946185ad.139.2025.02.26.11.03.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2025 11:03:16 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Stefan Liebler , Peter Bergner , Wilco Dijkstra Subject: [PATCH 1/6] Remove unused dl-procinfo.h Date: Wed, 26 Feb 2025 16:00:17 -0300 Message-ID: <20250226190308.2163908-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250226190308.2163908-1-adhemerval.zanella@linaro.org> References: <20250226190308.2163908-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 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 From: Wilco Dijkstra Remove unused _dl_hwcap_string defines. As a result many dl-procinfo.h headers can be removed. This also removes target specific _dl_procinfo implementations which only printed HWCAP strings using dl_hwcap_string. --- sysdeps/alpha/dl-procinfo.h | 33 --------- sysdeps/csky/dl-procinfo.h | 34 --------- sysdeps/generic/dl-procinfo.h | 6 -- sysdeps/i386/dl-procinfo.c | 19 ----- sysdeps/mips/dl-procinfo.c | 27 ------- sysdeps/mips/dl-procinfo.h | 33 --------- sysdeps/s390/Makefile | 1 - sysdeps/s390/cpu-features.c | 3 +- sysdeps/s390/dl-procinfo-s390.c | 26 ------- sysdeps/s390/dl-procinfo.c | 3 - sysdeps/s390/dl-procinfo.h | 72 ------------------ sysdeps/s390/multiarch/ifunc-resolve.h | 3 +- sysdeps/s390/s390-32/dl-machine.h | 1 - sysdeps/s390/s390-64/dl-hwcaps-subdirs.c | 1 + sysdeps/s390/s390-64/dl-machine.h | 1 - sysdeps/sparc/dl-procinfo.c | 63 ---------------- sysdeps/sparc/dl-procinfo.h | 55 -------------- sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c | 22 ------ sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h | 37 ---------- sysdeps/unix/sysv/linux/arm/dl-procinfo.c | 66 ----------------- sysdeps/unix/sysv/linux/arm/dl-procinfo.h | 73 ------------------- sysdeps/unix/sysv/linux/i386/dl-procinfo.h | 46 ------------ sysdeps/unix/sysv/linux/s390/dl-procinfo.h | 48 ------------ sysdeps/unix/sysv/linux/s390/elision-conf.c | 3 +- sysdeps/unix/sysv/linux/s390/sysconf.c | 3 +- sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h | 5 -- sysdeps/x86/dl-hwcap.h | 7 -- sysdeps/x86/dl-procinfo.c | 16 ---- sysdeps/x86/dl-procinfo.h | 26 ------- 29 files changed, 9 insertions(+), 724 deletions(-) delete mode 100644 sysdeps/alpha/dl-procinfo.h delete mode 100644 sysdeps/csky/dl-procinfo.h delete mode 100644 sysdeps/mips/dl-procinfo.c delete mode 100644 sysdeps/mips/dl-procinfo.h delete mode 100644 sysdeps/s390/dl-procinfo-s390.c delete mode 100644 sysdeps/s390/dl-procinfo.h delete mode 100644 sysdeps/sparc/dl-procinfo.c delete mode 100644 sysdeps/sparc/dl-procinfo.h delete mode 100644 sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h delete mode 100644 sysdeps/unix/sysv/linux/arm/dl-procinfo.c delete mode 100644 sysdeps/unix/sysv/linux/arm/dl-procinfo.h delete mode 100644 sysdeps/unix/sysv/linux/i386/dl-procinfo.h delete mode 100644 sysdeps/unix/sysv/linux/s390/dl-procinfo.h delete mode 100644 sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h delete mode 100644 sysdeps/x86/dl-procinfo.h diff --git a/sysdeps/alpha/dl-procinfo.h b/sysdeps/alpha/dl-procinfo.h deleted file mode 100644 index af9b3500df..0000000000 --- a/sysdeps/alpha/dl-procinfo.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Alpha version of processor capability information handling macros. - Copyright (C) 2008-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#ifndef _DL_PROCINFO_H -#define _DL_PROCINFO_H 1 - -#include - -/* We cannot provide a general printing function. */ -#define _dl_procinfo(type, word) -1 - -/* There are no hardware capabilities defined. */ -#define _dl_hwcap_string(idx) "" - -/* We don't have any hardware capabilities. */ -#define _DL_HWCAP_COUNT 0 - -#endif /* dl-procinfo.h */ diff --git a/sysdeps/csky/dl-procinfo.h b/sysdeps/csky/dl-procinfo.h deleted file mode 100644 index c5e072f213..0000000000 --- a/sysdeps/csky/dl-procinfo.h +++ /dev/null @@ -1,34 +0,0 @@ -/* C-SKY version of processor capability information handling macros. - Copyright (C) 2018-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - - -#ifndef _DL_PROCINFO_H -#define _DL_PROCINFO_H 1 - -#include - -/* We cannot provide a general printing function. */ -#define _dl_procinfo(word, val) -1 - -/* There are no hardware capabilities defined. */ -#define _dl_hwcap_string(idx) "" - -/* We don't have any hardware capabilities. */ -#define _DL_HWCAP_COUNT 0 - -#endif /* dl-procinfo.h */ diff --git a/sysdeps/generic/dl-procinfo.h b/sysdeps/generic/dl-procinfo.h index 7a63c43ea9..057a4ae362 100644 --- a/sysdeps/generic/dl-procinfo.h +++ b/sysdeps/generic/dl-procinfo.h @@ -22,10 +22,4 @@ /* We cannot provide a general printing function. */ #define _dl_procinfo(type, word) -1 -/* There are no hardware capabilities defined. */ -#define _dl_hwcap_string(idx) "" - -/* We don't have any hardware capabilities. */ -#define _DL_HWCAP_COUNT 0 - #endif /* dl-procinfo.h */ diff --git a/sysdeps/i386/dl-procinfo.c b/sysdeps/i386/dl-procinfo.c index d7344314bc..931750d96c 100644 --- a/sysdeps/i386/dl-procinfo.c +++ b/sysdeps/i386/dl-procinfo.c @@ -41,24 +41,5 @@ #include -#if !defined PROCINFO_DECL && defined SHARED - ._dl_x86_cap_flags -#else -PROCINFO_CLASS const char _dl_x86_cap_flags[32][8] -#endif -#ifndef PROCINFO_DECL -= { - "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", - "cx8", "apic", "10", "sep", "mtrr", "pge", "mca", "cmov", - "pat", "pse36", "pn", "clflush", "20", "dts", "acpi", "mmx", - "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", "pbe" - } -#endif -#if !defined SHARED || defined PROCINFO_DECL -; -#else -, -#endif - #undef PROCINFO_DECL #undef PROCINFO_CLASS diff --git a/sysdeps/mips/dl-procinfo.c b/sysdeps/mips/dl-procinfo.c deleted file mode 100644 index 78979f8f43..0000000000 --- a/sysdeps/mips/dl-procinfo.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Data for Mips version of processor capability information. - Copyright (C) 2007-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -/* Note: - When compiling elf/ldconfig.c, PROCINFO_CLASS is defined to static. - This dl-procinfo.c is included in sysdeps/generic/ldsodefs.h. - Afterwards, if not yet defined, PROCINFO_CLASS is defined to EXTERN - just before dl-vdso-setup.c is included. A "static" _dl_vdso_xyz - function prototype would lead to gcc warnings/errors: defined but - not used. */ -#undef PROCINFO_DECL -#undef PROCINFO_CLASS diff --git a/sysdeps/mips/dl-procinfo.h b/sysdeps/mips/dl-procinfo.h deleted file mode 100644 index dc0cdf98aa..0000000000 --- a/sysdeps/mips/dl-procinfo.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Mips version of processor capability information handling macros. - Copyright (C) 2007-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#ifndef _DL_PROCINFO_H -#define _DL_PROCINFO_H 1 - -#include - -/* We cannot provide a general printing function. */ -#define _dl_procinfo(type, word) -1 - -/* There are no hardware capabilities defined. */ -#define _dl_hwcap_string(idx) "" - -/* We don't have any hardware capabilities. */ -#define _DL_HWCAP_COUNT 0 - -#endif /* dl-procinfo.h */ diff --git a/sysdeps/s390/Makefile b/sysdeps/s390/Makefile index b793b26112..985b4f25ee 100644 --- a/sysdeps/s390/Makefile +++ b/sysdeps/s390/Makefile @@ -43,7 +43,6 @@ $(modpfx)gconv-modules-s390.conf: ../sysdeps/s390/gconv-modules-s390.conf \ endif ifeq ($(subdir),elf) -sysdep-dl-routines += dl-procinfo-s390 ifeq ($(build-shared),yes) tests += tst-dl-runtime-resolve-noaudit tst-dl-runtime-resolve-audit \ diff --git a/sysdeps/s390/cpu-features.c b/sysdeps/s390/cpu-features.c index 75bcdd9d98..31a1f4d600 100644 --- a/sysdeps/s390/cpu-features.c +++ b/sysdeps/s390/cpu-features.c @@ -17,7 +17,8 @@ . */ #include - +#include +#include #include #include #include diff --git a/sysdeps/s390/dl-procinfo-s390.c b/sysdeps/s390/dl-procinfo-s390.c deleted file mode 100644 index f70849fd33..0000000000 --- a/sysdeps/s390/dl-procinfo-s390.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Data for s390 version of processor capability information. - Copyright (C) 2006-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -const char _dl_s390_cap_flags[_DL_HWCAP_COUNT][9] = - { - "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp", "edat", "etf3eh", - "highgprs", "te", "vx", "vxd", "vxe", "gs", "vxe2", "vxp", "sort", "dflt", - "vxp2", "nnpa", "pcimio", "sie" - }; diff --git a/sysdeps/s390/dl-procinfo.c b/sysdeps/s390/dl-procinfo.c index 25673232ce..b6a9f499f0 100644 --- a/sysdeps/s390/dl-procinfo.c +++ b/sysdeps/s390/dl-procinfo.c @@ -16,9 +16,6 @@ License along with the GNU C Library; if not, see . */ -/* The hwcap and platform strings are now in - sysdeps/s390/dl-procinfo-s390.c. */ - /* Needed by sysdeps/unix/sysv/linux/dl-vdso-setup.c (as included from sysdeps/generic/ldsodefs.h). */ diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h deleted file mode 100644 index e63216358a..0000000000 --- a/sysdeps/s390/dl-procinfo.h +++ /dev/null @@ -1,72 +0,0 @@ -/* s390 version of processor capability information handling macros. - Copyright (C) 2006-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _DL_PROCINFO_H -#define _DL_PROCINFO_H 1 -#include - -#define _DL_HWCAP_COUNT 23 -extern const char _dl_s390_cap_flags[_DL_HWCAP_COUNT][9] attribute_hidden; - -/* Hardware capability bit numbers are derived directly from the - facility indications as stored by the "store facility list" (STFL) - instruction. - highgprs is an alien in that list. It describes a *kernel* - capability. */ - -enum -{ - HWCAP_S390_ESAN3 = 1 << 0, - HWCAP_S390_ZARCH = 1 << 1, - HWCAP_S390_STFLE = 1 << 2, - HWCAP_S390_MSA = 1 << 3, - HWCAP_S390_LDISP = 1 << 4, - HWCAP_S390_EIMM = 1 << 5, - HWCAP_S390_DFP = 1 << 6, - HWCAP_S390_HPAGE = 1 << 7, - HWCAP_S390_ETF3EH = 1 << 8, - HWCAP_S390_HIGH_GPRS = 1 << 9, - HWCAP_S390_TE = 1 << 10, - HWCAP_S390_VX = 1 << 11, - HWCAP_S390_VXRS = HWCAP_S390_VX, - HWCAP_S390_VXD = 1 << 12, - HWCAP_S390_VXRS_BCD = HWCAP_S390_VXD, - HWCAP_S390_VXE = 1 << 13, - HWCAP_S390_VXRS_EXT = HWCAP_S390_VXE, - HWCAP_S390_GS = 1 << 14, - HWCAP_S390_VXRS_EXT2 = 1 << 15, - HWCAP_S390_VXRS_PDE = 1 << 16, - HWCAP_S390_SORT = 1 << 17, - HWCAP_S390_DFLT = 1 << 18, - HWCAP_S390_VXRS_PDE2 = 1 << 19, - HWCAP_S390_NNPA = 1 << 20, - HWCAP_S390_PCI_MIO = 1 << 21, - HWCAP_S390_SIE = 1 << 22, -}; - -/* We cannot provide a general printing function. */ -#define _dl_procinfo(type, word) -1 - -static inline const char * -__attribute__ ((unused)) -_dl_hwcap_string (int idx) -{ - return _dl_s390_cap_flags[idx]; -}; - -#endif /* dl-procinfo.h */ diff --git a/sysdeps/s390/multiarch/ifunc-resolve.h b/sysdeps/s390/multiarch/ifunc-resolve.h index df77ab2e4e..34f3b0d8d2 100644 --- a/sysdeps/s390/multiarch/ifunc-resolve.h +++ b/sysdeps/s390/multiarch/ifunc-resolve.h @@ -18,8 +18,9 @@ . */ #include -#include #include +#include +#include #define s390_libc_ifunc_expr_stfle_init() \ const unsigned long long *stfle_bits = features->stfle_bits; diff --git a/sysdeps/s390/s390-32/dl-machine.h b/sysdeps/s390/s390-32/dl-machine.h index d317f679d1..f15a049a62 100644 --- a/sysdeps/s390/s390-32/dl-machine.h +++ b/sysdeps/s390/s390-32/dl-machine.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/sysdeps/s390/s390-64/dl-hwcaps-subdirs.c b/sysdeps/s390/s390-64/dl-hwcaps-subdirs.c index 16bc3bde40..32fdabdb00 100644 --- a/sysdeps/s390/s390-64/dl-hwcaps-subdirs.c +++ b/sysdeps/s390/s390-64/dl-hwcaps-subdirs.c @@ -18,6 +18,7 @@ #include #include +#include const char _dl_hwcaps_subdirs[] = "z16:z15:z14:z13"; enum { subdirs_count = 4 }; /* Number of components in _dl_hwcaps_subdirs. */ diff --git a/sysdeps/s390/s390-64/dl-machine.h b/sysdeps/s390/s390-64/dl-machine.h index d6028630b7..132abf47c7 100644 --- a/sysdeps/s390/s390-64/dl-machine.h +++ b/sysdeps/s390/s390-64/dl-machine.h @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/sysdeps/sparc/dl-procinfo.c b/sysdeps/sparc/dl-procinfo.c deleted file mode 100644 index 060b86ba94..0000000000 --- a/sysdeps/sparc/dl-procinfo.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Data for Linux/sparc version of processor capability information. - Copyright (C) 2002-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -/* This information must be kept in sync with the _DL_HWCAP_COUNT - definition in procinfo.h. - - If anything should be added here check whether the size of each string - is still ok with the given array size. - - All the #ifdefs in the definitions ar equite irritating but - necessary if we want to avoid duplicating the information. There - are three different modes: - - - PROCINFO_DECL is defined. This means we are only interested in - declarations. - - - PROCINFO_DECL is not defined: - - + if SHARED is defined the file is included in an array - initializer. The .element = { ... } syntax is needed. - - + if SHARED is not defined a normal array initialization is - needed. - */ - -#ifndef PROCINFO_CLASS -#define PROCINFO_CLASS -#endif - -#if !defined PROCINFO_DECL && defined SHARED - ._dl_sparc_cap_flags -#else -PROCINFO_CLASS const char _dl_sparc_cap_flags[28][11] -#endif -#ifndef PROCINFO_DECL - = { "flush", "stbar", "swap", "muldiv", "v9", "ultra3", "v9v", "v9v2", - "mul32", "div32", "fsmuld", "v8plus", "popc", "vis", "vis2", - "ASIBlkInit", "fmaf", "vis3", "hpc", "random", "trans", "fjfmau", - "ima", "cspare", "pause", "cbcond", "crypto", "adp" } -#endif -#if !defined SHARED || defined PROCINFO_DECL -; -#else -, -#endif - -#undef PROCINFO_DECL -#undef PROCINFO_CLASS diff --git a/sysdeps/sparc/dl-procinfo.h b/sysdeps/sparc/dl-procinfo.h deleted file mode 100644 index 699e9fd788..0000000000 --- a/sysdeps/sparc/dl-procinfo.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Linux/sparc version of processor capability information handling macros. - Copyright (C) 1999-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _DL_PROCINFO_H -#define _DL_PROCINFO_H 1 - -#include -#include - -#define _DL_HWCAP_COUNT 28 - -static inline int -__attribute__ ((unused)) -_dl_procinfo (unsigned int type, unsigned long int word) -{ - int i; - - /* Fallback to generic output mechanism. */ - if (type != AT_HWCAP) - return -1; - - _dl_printf ("AT_HWCAP: "); - - for (i = 0; i < _DL_HWCAP_COUNT; ++i) - if (word & (1 << i)) - _dl_printf (" %s", GLRO(dl_sparc_cap_flags)[i]); - - _dl_printf ("\n"); - - return 0; -} - -static inline const char * -__attribute__ ((unused)) -_dl_hwcap_string (int idx) -{ - return GLRO(dl_sparc_cap_flags)[idx]; -}; - -#endif /* dl-procinfo.h */ diff --git a/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c b/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c index 66287b4216..20966e0478 100644 --- a/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c +++ b/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c @@ -56,27 +56,5 @@ PROCINFO_CLASS struct cpu_features _dl_aarch64_cpu_features # endif #endif -/* Number of HWCAP bits set. */ -#define _DL_HWCAP_COUNT 32 - -#if !defined PROCINFO_DECL && defined SHARED - ._dl_aarch64_cap_flags -#else -PROCINFO_CLASS const char _dl_aarch64_cap_flags[_DL_HWCAP_COUNT][10] -#endif -#ifndef PROCINFO_DECL -/* Matches the names in arch/arm64/kernel/cpuinfo.c of Linux. */ -= { "fp", "asimd", "evtstrm", "aes", "pmull", "sha1", "sha2", "crc32", - "atomics", "fphp", "asimdhp", "cpuid", "asimdrdm", "jscvt", "fcma", - "lrcpc", "dcpop", "sha3", "sm3", "sm4", "asimddp", "sha512", "sve", - "asimdfhm", "dit", "uscat", "ilrcpc", "flagm", "ssbs", "sb", "paca", - "pacg" } -#endif -#if !defined SHARED || defined PROCINFO_DECL -; -#else -, -#endif - #undef PROCINFO_DECL #undef PROCINFO_CLASS diff --git a/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h b/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h deleted file mode 100644 index 1461664252..0000000000 --- a/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Processor capability information handling macros - aarch64 version. - Copyright (C) 2017-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _DL_PROCINFO_H -#define _DL_PROCINFO_H 1 - -#include -#include -#include -#include - -/* We cannot provide a general printing function. */ -#define _dl_procinfo(type, word) -1 - -static inline const char * -__attribute__ ((unused)) -_dl_hwcap_string (int idx) -{ - return (unsigned)idx < _DL_HWCAP_COUNT ? GLRO(dl_aarch64_cap_flags)[idx] : ""; -}; - -#endif /* dl-procinfo.h */ diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c deleted file mode 100644 index 94cb8b39a3..0000000000 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c +++ /dev/null @@ -1,66 +0,0 @@ -/* Data for Linux/ARM version of processor capability information. - Copyright (C) 2001-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -/* This information must be kept in sync with the _DL_HWCAP_COUNT and - _DL_PLATFORM_COUNT definitions in procinfo.h. - - If anything should be added here check whether the size of each string - is still ok with the given array size. - - All the #ifdefs in the definitions are quite irritating but - necessary if we want to avoid duplicating the information. There - are three different modes: - - - PROCINFO_DECL is defined. This means we are only interested in - declarations. - - - PROCINFO_DECL is not defined: - - + if SHARED is defined the file is included in an array - initializer. The .element = { ... } syntax is needed. - - + if SHARED is not defined a normal array initialization is - needed. - */ - -#ifndef PROCINFO_CLASS -#define PROCINFO_CLASS -#endif - -#if !defined PROCINFO_DECL && defined SHARED - ._dl_arm_cap_flags -#else -PROCINFO_CLASS const char _dl_arm_cap_flags[35][10] -#endif -#ifndef PROCINFO_DECL -= { - "swp", "half", "thumb", "26bit", "fastmult", "fpa", "vfp", "edsp", - "java", "iwmmxt", "crunch", "thumbee", "neon", "vfpv3", "vfpv3d16", - "tls", "vfpv4", "idiva", "idivt", "vfpd32", "lpae", "evtstrm", - "fphp", "asimdhp", "asimddp", "asimdfhm", "asimdbf16", "i8mm", - "aes", "pmull", "sha1", "sha2", "crc32", "sb", "ssbs", - } -#endif -#if !defined SHARED || defined PROCINFO_DECL -; -#else -, -#endif - -#undef PROCINFO_DECL -#undef PROCINFO_CLASS diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h deleted file mode 100644 index ff26dfeb7f..0000000000 --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Linux/ARM version of processor capability information handling macros. - Copyright (C) 2001-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#ifndef _DL_PROCINFO_H -#define _DL_PROCINFO_H 1 - -#include -#include - -#define _DL_HWCAP_COUNT 27 - -/* Low 28 bits are allocated in HWCAP. */ -#define _DL_HWCAP_LAST 27 - -/* Low 7 bits are allocated in HWCAP2. */ -#define _DL_HWCAP2_LAST 6 - - -static inline const char * -__attribute__ ((unused)) -_dl_hwcap_string (int idx) -{ - return GLRO(dl_arm_cap_flags)[idx]; -}; - -static inline int -__attribute__ ((unused)) -_dl_procinfo (unsigned int type, unsigned long int word) -{ - switch(type) - { - case AT_HWCAP: - _dl_printf ("AT_HWCAP: "); - - for (int i = 0; i <= _DL_HWCAP_LAST; ++i) - if (word & (1 << i)) - _dl_printf (" %s", _dl_hwcap_string (i)); - break; - case AT_HWCAP2: - { - unsigned int offset = _DL_HWCAP_LAST + 1; - - _dl_printf ("AT_HWCAP2: "); - - for (int i = 0; i <= _DL_HWCAP2_LAST; ++i) - if (word & (1 << i)) - _dl_printf (" %s", _dl_hwcap_string (offset + i)); - break; - } - default: - /* Fallback to generic output mechanism. */ - return -1; - } - _dl_printf ("\n"); - return 0; -} - -#endif /* dl-procinfo.h */ diff --git a/sysdeps/unix/sysv/linux/i386/dl-procinfo.h b/sysdeps/unix/sysv/linux/i386/dl-procinfo.h deleted file mode 100644 index 742221abe5..0000000000 --- a/sysdeps/unix/sysv/linux/i386/dl-procinfo.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Linux/i386 version of processor capability information handling macros. - Copyright (C) 1998-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _DL_I386_PROCINFO_H -#define _DL_I386_PROCINFO_H 1 -#include - -#undef _dl_procinfo -static inline int -__attribute__ ((unused)) -_dl_procinfo (unsigned int type, unsigned long int word) -{ - /* This table should match the information from arch/i386/kernel/setup.c - in the kernel sources. */ - int i; - - /* Fallback to generic output mechanism. */ - if (type != AT_HWCAP) - return -1; - - _dl_printf ("AT_HWCAP: "); - - for (i = 0; i < 32; ++i) - if (word & (1 << i)) - _dl_printf (" %s", GLRO(dl_x86_cap_flags)[i]); - - _dl_printf ("\n"); - - return 0; -} -#endif diff --git a/sysdeps/unix/sysv/linux/s390/dl-procinfo.h b/sysdeps/unix/sysv/linux/s390/dl-procinfo.h deleted file mode 100644 index 0be5148a58..0000000000 --- a/sysdeps/unix/sysv/linux/s390/dl-procinfo.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Linux/s390 version of processor capability information handling macros. - Copyright (C) 2006-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _DL_S390_PROCINFO_H -#define _DL_S390_PROCINFO_H 1 -#include -#include - - -#undef _dl_procinfo -static inline int -__attribute__ ((unused)) -_dl_procinfo (unsigned int type, unsigned long int word) -{ - /* This table should match the information from arch/s390/kernel/setup.c - in the kernel sources. */ - int i; - - /* Fallback to generic output mechanism. */ - if (type != AT_HWCAP) - return -1; - - _dl_printf ("AT_HWCAP: "); - - for (i = 0; i < _DL_HWCAP_COUNT; ++i) - if (word & (1UL << i)) - _dl_printf (" %s", _dl_s390_cap_flags[i]); - - _dl_printf ("\n"); - - return 0; -} -#endif diff --git a/sysdeps/unix/sysv/linux/s390/elision-conf.c b/sysdeps/unix/sysv/linux/s390/elision-conf.c index 7f3a20eefd..32b9b3a17d 100644 --- a/sysdeps/unix/sysv/linux/s390/elision-conf.c +++ b/sysdeps/unix/sysv/linux/s390/elision-conf.c @@ -20,7 +20,8 @@ #include #include #include -#include +#include +#include #define TUNABLE_NAMESPACE elision #include diff --git a/sysdeps/unix/sysv/linux/s390/sysconf.c b/sysdeps/unix/sysv/linux/s390/sysconf.c index e683a9aaea..8386523c96 100644 --- a/sysdeps/unix/sysv/linux/s390/sysconf.c +++ b/sysdeps/unix/sysv/linux/s390/sysconf.c @@ -17,8 +17,9 @@ . */ #include -#include #include +#include +#include static long int linux_sysconf (int name); diff --git a/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h b/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h deleted file mode 100644 index 7b45fe4bf8..0000000000 --- a/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h +++ /dev/null @@ -1,5 +0,0 @@ -#if IS_IN (ldconfig) -# include -#else -# include -#endif diff --git a/sysdeps/x86/dl-hwcap.h b/sysdeps/x86/dl-hwcap.h index 6bbcccfb6b..2384897e60 100644 --- a/sysdeps/x86/dl-hwcap.h +++ b/sysdeps/x86/dl-hwcap.h @@ -25,13 +25,6 @@ enum HWCAP_X86_AVX512_1 = 1 << 2 }; -static inline const char * -__attribute__ ((unused)) -_dl_hwcap_string (int idx) -{ - return GLRO(dl_x86_hwcap_flags)[idx]; -}; - /* We cannot provide a general printing function. */ #define _dl_procinfo(type, word) -1 diff --git a/sysdeps/x86/dl-procinfo.c b/sysdeps/x86/dl-procinfo.c index 91b8ff710c..05b8710d2a 100644 --- a/sysdeps/x86/dl-procinfo.c +++ b/sysdeps/x86/dl-procinfo.c @@ -54,22 +54,6 @@ PROCINFO_CLASS struct cpu_features _dl_x86_cpu_features # endif #endif -#if !defined PROCINFO_DECL && defined SHARED - ._dl_x86_hwcap_flags -#else -PROCINFO_CLASS const char _dl_x86_hwcap_flags[3][9] -#endif -#ifndef PROCINFO_DECL -= { - "sse2", "x86_64", "avx512_1" - } -#endif -#if !defined SHARED || defined PROCINFO_DECL -; -#else -, -#endif - #if defined SHARED && !IS_IN (ldconfig) # if !defined PROCINFO_DECL ._dl_x86_tlsdesc_dynamic diff --git a/sysdeps/x86/dl-procinfo.h b/sysdeps/x86/dl-procinfo.h deleted file mode 100644 index bac716aeb8..0000000000 --- a/sysdeps/x86/dl-procinfo.h +++ /dev/null @@ -1,26 +0,0 @@ -/* x86 version of processor capability information handling macros. - Copyright (C) 2017-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _DL_PROCINFO_H -#define _DL_PROCINFO_H 1 -#include -#include - -#define _DL_HWCAP_COUNT HWCAP_COUNT - -#endif /* dl-procinfo.h */ From patchwork Wed Feb 26 19:00:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 2052549 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=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=mtdchKA2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4Z33n4426Gz1yCp for ; Thu, 27 Feb 2025 06:04:40 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9B28C3858C51 for ; Wed, 26 Feb 2025 19:04:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B28C3858C51 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=mtdchKA2 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 2B0F23858D34 for ; Wed, 26 Feb 2025 19:03:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2B0F23858D34 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 2B0F23858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740596600; cv=none; b=ZMjsNzCnNMhCCxATE2zjRbW1eQGMbALijZCQ5zII3+Pbiep6z//z52HfNgkqKFd8inuzivM1xdKdleQGIdGRZo9b4p2hviKg0iEEP8A+zjwLuwocKC1lUSsOedF0+eHhNVf7vTksERTb6geFq7ooC8TyHnse92joaG6jIAzA/NE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740596600; c=relaxed/simple; bh=V8/ymzUs8hdhoNcuNvW9amThOhGwaPd90SEh5Y6BltA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=P3sMpfi0nQ1BDVON2AMxBg8j7dRmSNYc7PqgVRz7OSFW6TBXpJZLOFIUPZSAmSZDW2vKvVcYesmB8g0e+GWyAOnhUWbY4xQPHyugV75UM7teKKEoSKFOaPzbfzAXvawkmAgb8RvlQQPs5AiMfmVoXV4F0Av4sMWlRNNT+CimN8M= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2B0F23858D34 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-220f4dd756eso1650315ad.3 for ; Wed, 26 Feb 2025 11:03:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740596599; x=1741201399; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=VjjasWyBrTVpUQPRvfAF8Iy97ov9bYENB/9SKdWsEkQ=; b=mtdchKA2zbxHKzF7Jkps0DoPQ1ZhyHkmv3UMOm59Ucg+ooDvQKeuftq/gt5XYqKdVV N8eM2HpR4PKF6B61mnh9LjHI5Ke0S6vSx+nYpWDBZ/FtLNTgjTbyMwBuR0UhzyB33sOr n0znmNWNV1lpiQ/XR79uXDhOPNcLF49m3369GHuQieVzF6QI7r1U7UAunpCr/ti4jiM6 Nyc5PqwSI7G3ZVo3x75BOW41p9Ajxo1coHHYDsgKlqJlEdJkO/Wg2/Jm0IFxNiOacOk+ qzy61mlPqmbd2uPvs0HRabP3yIDAWHWKvn2rxghnwNAcMg5IiZr9tPySAQeIvETsTbu4 Qqvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740596599; x=1741201399; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VjjasWyBrTVpUQPRvfAF8Iy97ov9bYENB/9SKdWsEkQ=; b=auep6Cggke8KxrPnPcv6wB1lvhcaiKVUPjf8pMYlZ0K83mebyOnjQmSSixjJmPDrnf +j7erLjHgaykg+aThKTXFku8MHwbvZ2HJfA04ljhQR9gN2F+5NlmFhvigmqX/A6bE12E jWJN9bgnl95rB57peztGE9Tr4PcND64UJhxYbhnvh3YbHYnpn09gSmH6EXAZEVmqDgmh pBVLDOPFvn2NoglBTP/5x8DGfseCQ+sMDka5lSnfyrUg/cJAjdXmkC9bWXPyF5gxKjr2 ziijeB/Ag7eJjTk8vbcjy7oi5ZdsLuljOntx8kMTAQZcOFkzFAh2+tr2JR+LrB9UVSkM W/mA== X-Gm-Message-State: AOJu0YxVkkoxBPaPn5GFlPyr/b7km3gg0Gu0oxI+z9hdO5Oe2QztsxUI mCXJ/hkniWV1UOpesI/3bRpu+JPmzYk5eV/N3uffjvfgMplPkqSD+M5ctIs/8Cnuq5ajMq9sEAB b X-Gm-Gg: ASbGncvf7InkxeC3fy+U5v/5Wu4x/HatiTWtRi790ntHBEVLnZ8NLxgQDvoq6/dvB4E NM+SyV8t5m9TPFNYhiesk8YaF9/mrX0pijv12J0t7GUnfq5mRRp3chAppWgDFbRHdvyF5I5t5EJ lEnPMp8OJivTC7jOY6M4jUjv37YRMhDwq1E496qjLHnOToXHG1q+BZeiblyKWpRRvr2ZZp2NG+y ScAzcKjtoSy5gFgoQ0eKHYLOUamT4S34YMfCqkP09IegSzHd62OmdccaJ+cHCw+rYNi5CQ1fGeB xh1Kut95VUR/+CnsLhtTzolzQFezhfNt2JF9k68= X-Google-Smtp-Source: AGHT+IFtITwmOCKTLnWUZHszbm14jA01Q7LAq0A76l1AzffG55qCBJhSOD/jlPU8uNkMy7SbUS7kQw== X-Received: by 2002:a17:902:dacd:b0:215:e685:fa25 with SMTP id d9443c01a7336-22307b5302bmr117447145ad.20.1740596598631; Wed, 26 Feb 2025 11:03:18 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c3:f704:a0c6:9418:957f:d5bf]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22344c837e2sm6946185ad.139.2025.02.26.11.03.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2025 11:03:18 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Stefan Liebler , Peter Bergner , Wilco Dijkstra Subject: [PATCH 2/6] powerpc: Move AT_HWCAP descriptions to ld diagnostics Date: Wed, 26 Feb 2025 16:00:18 -0300 Message-ID: <20250226190308.2163908-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250226190308.2163908-1-adhemerval.zanella@linaro.org> References: <20250226190308.2163908-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 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 The ld.so diagnostics already prints AT_HWCAP values, but only in hexadecimal. To avoid duplicating the strings, consolidate the hwcap_names from cpu-features.h on a new file, dl-hwcap-info.h (and it also improves the hwcap string description with more values). For future AT_HWCAP3/AT_HWCAP4 extensions, it is just a matter to add them on dl-hwcap-info.c so both ld diagnostics and tunable filtering will parse the new values. Checked on powerpc64le-linux-gnu. --- sysdeps/powerpc/dl-diagnostics-cpu.c | 48 +++++++ sysdeps/powerpc/dl-procinfo.c | 31 ----- sysdeps/powerpc/dl-procinfo.h | 62 ---------- sysdeps/unix/sysv/linux/powerpc/Makefile | 4 + .../unix/sysv/linux/powerpc/cpu-features.c | 46 ++++--- .../unix/sysv/linux/powerpc/cpu-features.h | 99 --------------- .../unix/sysv/linux/powerpc/dl-hwcap-info.c | 117 ++++++++++++++++++ .../unix/sysv/linux/powerpc/dl-hwcap-info.h | 34 +++++ 8 files changed, 230 insertions(+), 211 deletions(-) create mode 100644 sysdeps/powerpc/dl-diagnostics-cpu.c create mode 100644 sysdeps/unix/sysv/linux/powerpc/dl-hwcap-info.c create mode 100644 sysdeps/unix/sysv/linux/powerpc/dl-hwcap-info.h diff --git a/sysdeps/powerpc/dl-diagnostics-cpu.c b/sysdeps/powerpc/dl-diagnostics-cpu.c new file mode 100644 index 0000000000..db8d19c7ec --- /dev/null +++ b/sysdeps/powerpc/dl-diagnostics-cpu.c @@ -0,0 +1,48 @@ +/* Print CPU diagnostics data in ld.so. PowerPC version. + Copyright (C) 2025 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include +#include + +static void +print_hwcap_value (const char *label, int hwcap, unsigned long int value) +{ + _dl_printf ("powerpc.cpu_features.%s=\"", label); + size_t offset = 0; + for (int i = 0; i < __dl_hwcap_info_size; ++i) + { + const char *hwcap_name = __dl_hwcap_names + offset; + size_t hwcap_name_len = strlen (hwcap_name); + if (hwcap == __dl_hwcap_info[i].hwcap + && value & __dl_hwcap_info[i].value) + _dl_printf ("%s ", hwcap_name); + offset += hwcap_name_len + 1; + } + _dl_printf ("\"\n"); +} + +void +_dl_diagnostics_cpu (void) +{ + print_hwcap_value ("hwcap", AT_HWCAP, GLRO(dl_hwcap)); + print_hwcap_value ("hwcap2", AT_HWCAP2, GLRO(dl_hwcap2)); + print_hwcap_value ("hwcap3", AT_HWCAP3, GLRO(dl_hwcap3)); + print_hwcap_value ("hwcap4", AT_HWCAP4, GLRO(dl_hwcap4)); +} diff --git a/sysdeps/powerpc/dl-procinfo.c b/sysdeps/powerpc/dl-procinfo.c index 1df247ac07..0db1e65112 100644 --- a/sysdeps/powerpc/dl-procinfo.c +++ b/sysdeps/powerpc/dl-procinfo.c @@ -62,37 +62,6 @@ PROCINFO_CLASS struct cpu_features _dl_powerpc_cpu_features # endif #endif -#if !defined PROCINFO_DECL && defined SHARED - ._dl_powerpc_cap_flags -#else -PROCINFO_CLASS const char _dl_powerpc_cap_flags[_DL_HWCAP_COUNT][15] -#endif -#ifndef PROCINFO_DECL -= { - "ppcle", "true_le", "", "", - "", "", "archpmu", "vsx", - "arch_2_06", "power6x", "dfp", "pa6t", - "arch_2_05", "ic_snoop", "smt", "booke", - "cellbe", "power5+", "power5", "power4", - "notb", "efpdouble", "efpsingle", "spe", - "ucache", "4xxmac", "mmu", "fpu", - "altivec", "ppc601", "ppc64", "ppc32", - "", "", "", "", - "", "", "", "", - "", "", "", "", - "", "", "", "", - "", "mma", "arch_3_1", "htm-no-suspend", - "scv", "darn", "ieee128", "arch_3_00", - "htm-nosc", "vcrypto", "tar", "isel", - "ebb", "dscr", "htm", "arch_2_07", - } -#endif -#if !defined SHARED || defined PROCINFO_DECL -; -#else -, -#endif - #if !IS_IN (ldconfig) # if !defined PROCINFO_DECL && defined SHARED ._dl_cache_line_size diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h index 585ce41226..04bbe7ba1c 100644 --- a/sysdeps/powerpc/dl-procinfo.h +++ b/sysdeps/powerpc/dl-procinfo.h @@ -20,20 +20,6 @@ #define _DL_PROCINFO_H 1 #include -#include /* This defines the PPC_FEATURE[2]_* macros. */ - -/* Feature masks are all 32-bits in size. */ -#define _DL_HWCAP_SIZE 32 - -/* AT_HWCAP2 feature strings follow the AT_HWCAP feature strings. */ -#define _DL_HWCAP2_OFFSET _DL_HWCAP_SIZE - -/* AT_HWCAP3 feature strings follow the AT_HWCAP2 feature strings. */ -#define _DL_HWCAP3_OFFSET (_DL_HWCAP2_OFFSET + _DL_HWCAP_SIZE) - -/* AT_HWCAP4 feature strings follow the AT_HWCAP3 feature strings. */ -#define _DL_HWCAP4_OFFSET (_DL_HWCAP3_OFFSET + _DL_HWCAP_SIZE) - #define _DL_FIRST_PLATFORM 32 @@ -56,13 +42,6 @@ #define PPC_PLATFORM_POWER10 15 #define PPC_PLATFORM_POWER11 16 -static inline const char * -__attribute__ ((unused)) -_dl_hwcap_string (int idx) -{ - return GLRO(dl_powerpc_cap_flags)[idx]; -} - static inline int __attribute__ ((unused, always_inline)) _dl_string_platform (const char *str) @@ -183,47 +162,6 @@ _dl_procinfo (unsigned int type, unsigned long int word) { switch(type) { - case AT_HWCAP: - _dl_printf ("AT_HWCAP: "); - - for (int i = 0; i < _DL_HWCAP_SIZE; ++i) - if (word & (1 << i)) - _dl_printf (" %s", _dl_hwcap_string (i)); - break; - case AT_HWCAP2: - { - - _dl_printf ("AT_HWCAP2: "); - - /* We have to go through them all because the kernel added the - AT_HWCAP2 features starting with the high bits. */ - for (int i = 0; i < _DL_HWCAP_SIZE; ++i) - if (word & (1 << i)) - _dl_printf (" %s", _dl_hwcap_string (_DL_HWCAP2_OFFSET + i)); - break; - } - case AT_HWCAP3: - { - _dl_printf ("AT_HWCAP3: "); - - /* We have to go through them all because the kernel added the - AT_HWCAP3 features starting with the high bits. */ - for (int i = 0; i < _DL_HWCAP_SIZE; ++i) - if (word & (1 << i)) - _dl_printf (" %s", _dl_hwcap_string (_DL_HWCAP3_OFFSET + i)); - break; - } - case AT_HWCAP4: - { - _dl_printf ("AT_HWCAP4: "); - - /* We have to go through them all because the kernel added the - AT_HWCAP4 features starting with the high bits. */ - for (int i = 0; i <= _DL_HWCAP_SIZE; ++i) - if (word & (1 << i)) - _dl_printf (" %s", _dl_hwcap_string (_DL_HWCAP4_OFFSET + i)); - break; - } case AT_L1I_CACHEGEOMETRY: { cache_geometry ("AT_L1I_CACHEGEOMETRY: ", word); diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile index 24827efe79..cddb624bf2 100644 --- a/sysdeps/unix/sysv/linux/powerpc/Makefile +++ b/sysdeps/unix/sysv/linux/powerpc/Makefile @@ -13,6 +13,10 @@ gen-as-const-headers += ucontext_i.sym endif ifeq ($(subdir),elf) +dl-routines += \ + dl-hwcap-info \ + # dl-routines + # Otherwise tst-tls-dlinfo fails due to tst-tlsmod2.so using static tls. ifeq ($(have-tls-get-addr-optimize),yes) LDFLAGS-tst-tlsmod2.so += -Wl,--no-tls-get-addr-optimize diff --git a/sysdeps/unix/sysv/linux/powerpc/cpu-features.c b/sysdeps/unix/sysv/linux/powerpc/cpu-features.c index bcce635763..f0fabac0e0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/cpu-features.c +++ b/sysdeps/unix/sysv/linux/powerpc/cpu-features.c @@ -21,9 +21,22 @@ #include #include #include +#include #include #include +#define ENABLE_BIT(__hwcap, __v) __hwcap &= (__v) +#define DISABLE_BIT(__hwcap, __h, __v) __hwcap |= (__h) & (__v) + +static void set_hwcap_bit (unsigned long int *hwcap, bool disable, + unsigned long int tcb_value, unsigned int value) +{ + if (disable) + *hwcap &= ~value; + else + *hwcap |= tcb_value & value; +} + static void TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *valp) { @@ -55,32 +68,27 @@ TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *valp) continue; size_t offset = 0; - for (int i = 0; i < array_length (hwcap_tunables); ++i) + for (int i = 0; i < __dl_hwcap_info_size; ++i) { - const char *hwcap_name = hwcap_names + offset; + const char *hwcap_name = __dl_hwcap_names + offset; size_t hwcap_name_len = strlen (hwcap_name); /* Check the tunable name on the supported list. */ if (tunable_str_comma_strcmp (&t, hwcap_name, hwcap_name_len)) { - /* Update the hwcap and hwcap2 bits. */ - if (t.disable) + switch (__dl_hwcap_info[i].hwcap) { - /* Id is 1 for hwcap2 tunable. */ - if (hwcap_tunables[i].id) - cpu_features->hwcap2 &= ~(hwcap_tunables[i].mask); - else - cpu_features->hwcap &= ~(hwcap_tunables[i].mask); - } - else - { - /* Enable the features and also check that no unsupported - features were enabled by user. */ - if (hwcap_tunables[i].id) - cpu_features->hwcap2 |= (tcbv_hwcap2 & hwcap_tunables[i].mask); - else - cpu_features->hwcap |= (tcbv_hwcap & hwcap_tunables[i].mask); + case AT_HWCAP: + set_hwcap_bit (&cpu_features->hwcap, t.disable, tcbv_hwcap, + __dl_hwcap_info[i].value); + break; + + case AT_HWCAP2: + set_hwcap_bit (&cpu_features->hwcap2, t.disable, tcbv_hwcap2, + __dl_hwcap_info[i].value); + break; + + /* Ignore unknown values. */ } - break; } offset += hwcap_name_len + 1; } diff --git a/sysdeps/unix/sysv/linux/powerpc/cpu-features.h b/sysdeps/unix/sysv/linux/powerpc/cpu-features.h index 3c5cc6e84d..f15a80374c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/cpu-features.h +++ b/sysdeps/unix/sysv/linux/powerpc/cpu-features.h @@ -30,103 +30,4 @@ struct cpu_features unsigned long int hwcap4; }; -static const char hwcap_names[] = { - "4xxmac\0" - "altivec\0" - "arch_2_05\0" - "arch_2_06\0" - "archpmu\0" - "booke\0" - "cellbe\0" - "dfp\0" - "efpdouble\0" - "efpsingle\0" - "fpu\0" - "ic_snoop\0" - "mmu\0" - "notb\0" - "pa6t\0" - "power4\0" - "power5\0" - "power5+\0" - "power6x\0" - "ppc32\0" - "ppc601\0" - "ppc64\0" - "ppcle\0" - "smt\0" - "spe\0" - "true_le\0" - "ucache\0" - "vsx\0" - "arch_2_07\0" - "dscr\0" - "ebb\0" - "htm\0" - "htm-nosc\0" - "htm-no-suspend\0" - "isel\0" - "tar\0" - "vcrypto\0" - "arch_3_00\0" - "ieee128\0" - "darn\0" - "scv\0" - "arch_3_1\0" - "mma\0" -}; - -static const struct -{ - unsigned int mask; - bool id; -} hwcap_tunables[] = { - /* AT_HWCAP tunable masks. */ - { PPC_FEATURE_HAS_4xxMAC, 0 }, - { PPC_FEATURE_HAS_ALTIVEC, 0 }, - { PPC_FEATURE_ARCH_2_05, 0 }, - { PPC_FEATURE_ARCH_2_06, 0 }, - { PPC_FEATURE_PSERIES_PERFMON_COMPAT, 0 }, - { PPC_FEATURE_BOOKE, 0 }, - { PPC_FEATURE_CELL_BE, 0 }, - { PPC_FEATURE_HAS_DFP, 0 }, - { PPC_FEATURE_HAS_EFP_DOUBLE, 0 }, - { PPC_FEATURE_HAS_EFP_SINGLE, 0 }, - { PPC_FEATURE_HAS_FPU, 0 }, - { PPC_FEATURE_ICACHE_SNOOP, 0 }, - { PPC_FEATURE_HAS_MMU, 0 }, - { PPC_FEATURE_NO_TB, 0 }, - { PPC_FEATURE_PA6T, 0 }, - { PPC_FEATURE_POWER4, 0 }, - { PPC_FEATURE_POWER5, 0 }, - { PPC_FEATURE_POWER5_PLUS, 0 }, - { PPC_FEATURE_POWER6_EXT, 0 }, - { PPC_FEATURE_32, 0 }, - { PPC_FEATURE_601_INSTR, 0 }, - { PPC_FEATURE_64, 0 }, - { PPC_FEATURE_PPC_LE, 0 }, - { PPC_FEATURE_SMT, 0 }, - { PPC_FEATURE_HAS_SPE, 0 }, - { PPC_FEATURE_TRUE_LE, 0 }, - { PPC_FEATURE_UNIFIED_CACHE, 0 }, - { PPC_FEATURE_HAS_VSX, 0 }, - - /* AT_HWCAP2 tunable masks. */ - { PPC_FEATURE2_ARCH_2_07, 1 }, - { PPC_FEATURE2_HAS_DSCR, 1 }, - { PPC_FEATURE2_HAS_EBB, 1 }, - { PPC_FEATURE2_HAS_HTM, 1 }, - { PPC_FEATURE2_HTM_NOSC, 1 }, - { PPC_FEATURE2_HTM_NO_SUSPEND, 1 }, - { PPC_FEATURE2_HAS_ISEL, 1 }, - { PPC_FEATURE2_HAS_TAR, 1 }, - { PPC_FEATURE2_HAS_VEC_CRYPTO, 1 }, - { PPC_FEATURE2_ARCH_3_00, 1 }, - { PPC_FEATURE2_HAS_IEEE128, 1 }, - { PPC_FEATURE2_DARN, 1 }, - { PPC_FEATURE2_SCV, 1 }, - { PPC_FEATURE2_ARCH_3_1, 1 }, - { PPC_FEATURE2_MMA, 1 }, -}; - #endif /* __CPU_FEATURES_H */ diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-hwcap-info.c b/sysdeps/unix/sysv/linux/powerpc/dl-hwcap-info.c new file mode 100644 index 0000000000..1178828744 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/dl-hwcap-info.c @@ -0,0 +1,117 @@ +/* HWCAP string information. PowerPC version. + Copyright (C) 2017-2025 Free Software Foundation, Inc. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +const char __dl_hwcap_names[] = { + "4xxmac\0" + "altivec\0" + "arch_2_05\0" + "arch_2_06\0" + "archpmu\0" + "booke\0" + "cellbe\0" + "dfp\0" + "efpdouble\0" + "efpsingle\0" + "fpu\0" + "ic_snoop\0" + "mmu\0" + "notb\0" + "pa6t\0" + "power4\0" + "power5\0" + "power5+\0" + "power6x\0" + "ppc32\0" + "ppc601\0" + "ppc64\0" + "ppcle\0" + "smt\0" + "spe\0" + "true_le\0" + "ucache\0" + "vsx\0" + "arch_2_07\0" + "dscr\0" + "ebb\0" + "htm\0" + "htm-nosc\0" + "htm-no-suspend\0" + "isel\0" + "tar\0" + "vcrypto\0" + "arch_3_00\0" + "ieee128\0" + "darn\0" + "scv\0" + "arch_3_1\0" + "mma\0" +}; + +const struct hwcap_info_t __dl_hwcap_info[] = +{ + /* AT_HWCAP tunable masks. */ + { PPC_FEATURE_HAS_4xxMAC, AT_HWCAP }, + { PPC_FEATURE_HAS_ALTIVEC, AT_HWCAP }, + { PPC_FEATURE_ARCH_2_05, AT_HWCAP }, + { PPC_FEATURE_ARCH_2_06, AT_HWCAP }, + { PPC_FEATURE_PSERIES_PERFMON_COMPAT, AT_HWCAP }, + { PPC_FEATURE_BOOKE, AT_HWCAP }, + { PPC_FEATURE_CELL_BE, AT_HWCAP }, + { PPC_FEATURE_HAS_DFP, AT_HWCAP }, + { PPC_FEATURE_HAS_EFP_DOUBLE, AT_HWCAP }, + { PPC_FEATURE_HAS_EFP_SINGLE, AT_HWCAP }, + { PPC_FEATURE_HAS_FPU, AT_HWCAP }, + { PPC_FEATURE_ICACHE_SNOOP, AT_HWCAP }, + { PPC_FEATURE_HAS_MMU, AT_HWCAP }, + { PPC_FEATURE_NO_TB, AT_HWCAP }, + { PPC_FEATURE_PA6T, AT_HWCAP }, + { PPC_FEATURE_POWER4, AT_HWCAP }, + { PPC_FEATURE_POWER5, AT_HWCAP }, + { PPC_FEATURE_POWER5_PLUS, AT_HWCAP }, + { PPC_FEATURE_POWER6_EXT, AT_HWCAP }, + { PPC_FEATURE_32, AT_HWCAP }, + { PPC_FEATURE_601_INSTR, AT_HWCAP }, + { PPC_FEATURE_64, AT_HWCAP }, + { PPC_FEATURE_PPC_LE, AT_HWCAP }, + { PPC_FEATURE_SMT, AT_HWCAP }, + { PPC_FEATURE_HAS_SPE, AT_HWCAP }, + { PPC_FEATURE_TRUE_LE, AT_HWCAP }, + { PPC_FEATURE_UNIFIED_CACHE, AT_HWCAP }, + { PPC_FEATURE_HAS_VSX, AT_HWCAP }, + + /* AT_HWCAP2 tunable masks. */ + { PPC_FEATURE2_ARCH_2_07, AT_HWCAP2 }, + { PPC_FEATURE2_HAS_DSCR, AT_HWCAP2 }, + { PPC_FEATURE2_HAS_EBB, AT_HWCAP2 }, + { PPC_FEATURE2_HAS_HTM, AT_HWCAP2 }, + { PPC_FEATURE2_HTM_NOSC, AT_HWCAP2 }, + { PPC_FEATURE2_HTM_NO_SUSPEND, AT_HWCAP2 }, + { PPC_FEATURE2_HAS_ISEL, AT_HWCAP2 }, + { PPC_FEATURE2_HAS_TAR, AT_HWCAP2 }, + { PPC_FEATURE2_HAS_VEC_CRYPTO, AT_HWCAP2 }, + { PPC_FEATURE2_ARCH_3_00, AT_HWCAP2 }, + { PPC_FEATURE2_HAS_IEEE128, AT_HWCAP2 }, + { PPC_FEATURE2_DARN, AT_HWCAP2 }, + { PPC_FEATURE2_SCV, AT_HWCAP2 }, + { PPC_FEATURE2_ARCH_3_1, AT_HWCAP2 }, + { PPC_FEATURE2_MMA, AT_HWCAP2 }, +}; + +size_t __dl_hwcap_info_size = array_length (__dl_hwcap_info); diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-hwcap-info.h b/sysdeps/unix/sysv/linux/powerpc/dl-hwcap-info.h new file mode 100644 index 0000000000..194f40ce4d --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/dl-hwcap-info.h @@ -0,0 +1,34 @@ +/* HWCAP string information. PowerPC version. + Copyright (C) 2017-2025 Free Software Foundation, Inc. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _DL_HWCAP_INFO_H +#define _DL_HWCAP_INFO_H + +#include +#include + +extern const char __dl_hwcap_names[] attribute_hidden; + +struct hwcap_info_t +{ + unsigned int value; + int hwcap; +}; +extern const struct hwcap_info_t __dl_hwcap_info[] attribute_hidden; +extern size_t __dl_hwcap_info_size attribute_hidden; + +#endif From patchwork Wed Feb 26 19:00:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 2052552 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=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=MRWnBdsb; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4Z33rb0pg6z1yD0 for ; Thu, 27 Feb 2025 06:07:43 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EAFEB3858D35 for ; Wed, 26 Feb 2025 19:07:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EAFEB3858D35 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=MRWnBdsb X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id E42BB3858C53 for ; Wed, 26 Feb 2025 19:03:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E42BB3858C53 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 E42BB3858C53 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740596602; cv=none; b=tEnGYDZWSiIf2Fmgr0RikkH8jslONlI4WTDx5ebl2+MDGiQX+Ife3AXg692+zYHEKxph8wTHYbYGJTP6MFiOLPPT6QMNVmRISuRjouQapYWC09yTkbShcGPsDakdoVZQ3ETr+RphWayNa1iW5BxDoabsqp4f3MtozsoGQSHVswI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740596602; c=relaxed/simple; bh=9rR9V9KfMuy2+xn/MJw6752/OFBfG30eS/V2AyJodGA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GJJz1tKtLgdnqFLX2f72y+oyoRRQsJZfpO8HZRnzx0mqUipb4Hn048pnkVwJzZthWwCHi3rUeb+16BEK4zFE4PeQ8lJK0IabXxCGwNBoRVTSVRNHEZZpPs1BTROve7atbBhmmCkyOwbKpzujWyfiS4FTNv24u5Yx5R6NwuhdejI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E42BB3858C53 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-22128b7d587so1456835ad.3 for ; Wed, 26 Feb 2025 11:03:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740596601; x=1741201401; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Ul68Jq/eR7WqJp1HCYJwWVBsa5vdvgCwj2JDfVjL1WE=; b=MRWnBdsb3Om6f2Fre+/gaMgkib4qB8gndWQTKnfdqwKxfmMB0qTDwEsmbZgow4MvGa nvwHw9hqhTNp+Wgfc7l85ObSKh+lF/kYo5Ehljd8ztVHwYTWcPg28wPk0pE5RwzarYnA tVXi0/Pr8FCi5qUYr6SBq4p9GLQ85+rBRyRSI9KLm3SAEIsvTJTq4XRJslwPk2cQA9x9 i+gss1TWf+QWnej8Qm6D6ZHGt0TmLdOMghvYUUmpsfq6DKxO0ax0qQrhAQH1DLm0TzJs wEq6PziPhwSrGrlnKgGc02OM2ySOFDE/KRjaIjRpUM29IZLKrwF0bOgJbvK7eEIb/hBW hiXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740596601; x=1741201401; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ul68Jq/eR7WqJp1HCYJwWVBsa5vdvgCwj2JDfVjL1WE=; b=Ey5l7fCykzPm25r3f/v2RNjncCyG2NtWCeDEg/PmVpvl6+hmjw/6glxNz+yQNfcMib vyq5NfdHAe0JA4rt9fvXqEfMN4G98M/G5IoD22wvYHa+LxuLsIElSLxzbm1mmfbtpZWO AyL1LL5Mf/nNDIZWOkZ4jWsGLqxyo311ESzbbNC/YylhX6TI0+1ZJPlaJHikNQiPbjsx lBEM8dnOPmnAl8VsMQzCl+w791Vm1V/V/6ix7dPCx0kRv82/GRmFxlaufU3GBSwCl81v Aww0pe3Z9nyv+KoMlbfNIbE+muk9qOJrgbsYHTuBJEB9i0GqBPmR0PZQyAw+h2vOrUcr vcFQ== X-Gm-Message-State: AOJu0Yy5J4V0dzS6283sqGqJTh0o12BX7MwoUpVeLPoILpao92n+iqzu +6EqSYB3NbjgZmnD5+PsZGM52xEZd008ymNNcp502de1hjuUioSK6/wWFK1gRALPa9GwpOzu41l P X-Gm-Gg: ASbGncvpFmYTohmo/UZ5gMsUUV4odtcpR69uWMeoTUqrGFXjV3SrCoyI9FvOCfpFwwd Oq+ZGQea3dmgbc0689/rLhOsQ+6EBBEj1wVL/MfA2KshwWjbFnPilAFnWf2w2920AHK5tT82DCc TGg9N9Sex8YChcjclFQltji6wfcIMhVpiR4SN7Nc3T4Gj1NJ0UKKuHQX2pwWvZG/CeUG37IrDbT q945ynG5vZno6ppqKGblRmUc7bLJ46fk26241WdF7P8fjzSCkl84VtDeG+AQ7Vh5lcSr3N6P9vv cHSpwRVEugdH/fU2PTCuLo4ID6hKdNw2Ck2s6xg= X-Google-Smtp-Source: AGHT+IFi4KndnbiUW04VR8Z/7S9e477dtXK9wpFp4Yw2XfEi4Y3xA2dM3VEI6HusqsCArQag7MBjlQ== X-Received: by 2002:a17:903:a46:b0:220:f449:7415 with SMTP id d9443c01a7336-22320208605mr57998795ad.44.1740596600645; Wed, 26 Feb 2025 11:03:20 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c3:f704:a0c6:9418:957f:d5bf]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22344c837e2sm6946185ad.139.2025.02.26.11.03.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2025 11:03:20 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Stefan Liebler , Peter Bergner , Wilco Dijkstra Subject: [PATCH 3/6] powerpc: Move cache geometry information to ld diagnostics Date: Wed, 26 Feb 2025 16:00:19 -0300 Message-ID: <20250226190308.2163908-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250226190308.2163908-1-adhemerval.zanella@linaro.org> References: <20250226190308.2163908-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 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 From LD_SHOW_AUXV output. Checked on powerpc64le-linux-gnu. --- sysdeps/powerpc/dl-diagnostics-cpu.c | 49 ++++++++++++++++++++ sysdeps/powerpc/dl-procinfo.h | 67 +--------------------------- 2 files changed, 50 insertions(+), 66 deletions(-) diff --git a/sysdeps/powerpc/dl-diagnostics-cpu.c b/sysdeps/powerpc/dl-diagnostics-cpu.c index db8d19c7ec..6e7a5302fd 100644 --- a/sysdeps/powerpc/dl-diagnostics-cpu.c +++ b/sysdeps/powerpc/dl-diagnostics-cpu.c @@ -38,6 +38,38 @@ print_hwcap_value (const char *label, int hwcap, unsigned long int value) _dl_printf ("\"\n"); } +static void +print_cache_geometry_value (const char *label, unsigned long int geometry) +{ + unsigned long int assocty, line; + + _dl_printf ("powerpc.cpu_features.%s=\"", label); + + line = geometry & 0xffff; + assocty = (geometry >> 16) & 0xffff; + + if (line == 0) + _dl_printf ("Unknown line size, "); + else + _dl_printf ("%luB line size, ", line); + + switch (assocty) + { + case 0: + _dl_printf ("Unknown associativity"); + break; + case 1: + _dl_printf ("Directly mapped"); + break; + case 0xffff: + _dl_printf ("Fully associative"); + break; + default: + _dl_printf ("%lu-way set associative", assocty); + } + _dl_printf ("\"\n"); +} + void _dl_diagnostics_cpu (void) { @@ -45,4 +77,21 @@ _dl_diagnostics_cpu (void) print_hwcap_value ("hwcap2", AT_HWCAP2, GLRO(dl_hwcap2)); print_hwcap_value ("hwcap3", AT_HWCAP3, GLRO(dl_hwcap3)); print_hwcap_value ("hwcap4", AT_HWCAP4, GLRO(dl_hwcap4)); + + for (ElfW(auxv_t) *av = GLRO(dl_auxv); av->a_type != AT_NULL; ++av) + switch (av->a_type) + { + case AT_L1I_CACHEGEOMETRY: + print_cache_geometry_value ("l1i_cachegeometry", av->a_un.a_val); + break; + case AT_L1D_CACHEGEOMETRY: + print_cache_geometry_value ("l1d_cachegeometry", av->a_un.a_val); + break; + case AT_L2_CACHEGEOMETRY: + print_cache_geometry_value ("l2_cachegeometry", av->a_un.a_val); + break; + case AT_L3_CACHEGEOMETRY: + print_cache_geometry_value ("l3_cachegeometry", av->a_un.a_val); + break; + } } diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h index 04bbe7ba1c..adb1c6994e 100644 --- a/sysdeps/powerpc/dl-procinfo.h +++ b/sysdeps/powerpc/dl-procinfo.h @@ -124,71 +124,6 @@ _dl_string_platform (const char *str) return -1; } -#if IS_IN (rtld) -static inline void -cache_geometry (const char * name, unsigned long int geometry) -{ - unsigned long int assocty, line; - - _dl_printf ("%s", name); - - line = geometry & 0xffff; - assocty = (geometry >> 16) & 0xffff; - - if (line == 0) - _dl_printf ("Unknown line size, "); - else - _dl_printf ("%luB line size, ", line); - - switch (assocty) - { - case 0: - _dl_printf ("Unknown associativity"); - break; - case 1: - _dl_printf ("Directly mapped"); - break; - case 0xffff: - _dl_printf ("Fully associative"); - break; - default: - _dl_printf ("%lu-way set associative", assocty); - } -} - -static inline int -__attribute__ ((unused)) -_dl_procinfo (unsigned int type, unsigned long int word) -{ - switch(type) - { - case AT_L1I_CACHEGEOMETRY: - { - cache_geometry ("AT_L1I_CACHEGEOMETRY: ", word); - break; - } - case AT_L1D_CACHEGEOMETRY: - { - cache_geometry ("AT_L1D_CACHEGEOMETRY: ", word); - break; - } - case AT_L2_CACHEGEOMETRY: - { - cache_geometry ("AT_L2_CACHEGEOMETRY: ", word); - break; - } - case AT_L3_CACHEGEOMETRY: - { - cache_geometry ("AT_L3_CACHEGEOMETRY: ", word); - break; - } - default: - /* Fallback to generic output mechanism. */ - return -1; - } - _dl_printf ("\n"); - return 0; -} -#endif +#define _dl_procinfo(type, word) -1 #endif /* dl-procinfo.h */ From patchwork Wed Feb 26 19:00:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 2052553 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=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=xUXq9G0A; 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 4Z33v31SzXz1yD0 for ; Thu, 27 Feb 2025 06:09:51 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3505D3858D35 for ; Wed, 26 Feb 2025 19:09:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3505D3858D35 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=xUXq9G0A X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 2F8A73858C51 for ; Wed, 26 Feb 2025 19:03:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2F8A73858C51 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 2F8A73858C51 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740596604; cv=none; b=LzmpRTkt76Zj5Oea0/PhjKN3TcNKvz+EQS3wKsUlasegrAoiVUIUmqdj+Fn5d+CicMqjiMLr7BrBbAwUlDjzz37tL4x7YT+A5vWAFb4IFZCCducxN4RY20Zj9A33k+nkdO5PwKApVGFQm6EemLbofoKTVfBnfoht42Md9RWzd/U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740596604; c=relaxed/simple; bh=HYLeogQGwyHtH98NCibC01EVUAV1Y9f5WysKB3ZIMjY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GD68miDckxFaq4P+hzaut36AeihlIPeBw4x8XD9uV1x0KcPD51Qi/4zN2ge6Pmn6nLmyXbq6/zPpM/WR1YdYM5hYUpKx/T8zc8RQPYft0WWQPIiDzwX+oTHyk2wHiRq8/Sk+CloL70tNE4HIptpgyBnmfVfIeudgXWSn/Ylo8V8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F8A73858C51 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2232b12cd36so1506855ad.0 for ; Wed, 26 Feb 2025 11:03:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740596603; x=1741201403; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Xav/sxdeK1i4YJA6ipxB0o+TAmcYfJWXhGMhpMHF6nU=; b=xUXq9G0AIk4ecCrEHObyXQpb7JabX1g0ktJtbjSwxLRU+yNSDO1hRvZwpJDlyBIeau IRPwS7xDFd1WWuyWtfawINj5xaA7iipSz0oXaSQPsYGmQofhqJHPzhJpIdXbM5RE2BKj DIhuV8GUVaIkuXa1urRwPdTfyYMlhef2jEY1/sHc3X6atwYLt+UrYbGzjRgfZXZ24nOZ R3wLQyTUK1Hxunnj4nNAl0IPxWhqMOz0slfKt0DVNvlQ3i4PDHfxSNUu776tdiLy/VAT HTjPN9pShYWTVWRUJO+OZ69u/nJUDXUf8faVPSOAbj/V2dkz19CYq3u93+LdFVTaU3Oz KiDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740596603; x=1741201403; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xav/sxdeK1i4YJA6ipxB0o+TAmcYfJWXhGMhpMHF6nU=; b=Sa1RUF5tu3l4QAowPmruVbiDXma5Ft3nOSsSu9dVxZn7HdzaqkKZKgEZzuEvKydigp o27/rfVY0LPlekS3ZE3UnXeBsElo1RLUD+5LYTq9g0WFjO3xZ6qBEq2zR8n/uxuprE1L S7fcVHIXTdk9XID3t+bJf//0hSB1KklcXVs0r9AtpcGEatBlJcnY2s+ML9d8zR+ijzdg vFvbxUWSt0LHIMaGncOM625fr1wMm22iUPLohyYnGc5HviwKQL78pkAbWSLGZqcnJkwk WkX+Jmf7NVu05Z/Cj5QH/jkwNyvthHAkW50V8tC4IhYaDsU1bfLnPp0encCREwfwfB0i 2Stw== X-Gm-Message-State: AOJu0YzLTZg4OOPl4gAfcI5AiXt/wqxai+93g4ZgQdHAHtSkQhVv250x jBLCNEMrubCIe9pq+NHNpaLk43mMXidiu8U07M9wuxAkkPDT8UmvUm0A88cj4FRgLG77XBWDU3+ T X-Gm-Gg: ASbGncv0jzgTxpwz3TncU7nizvKNE503rZGKXXKJrPUVbut33bWzG/DMG6TQzhz0s8M rRJDlTTIt56nxEt5kYtLSBtoUF6bpzqcuQD4YDTvwcF4hcdm9caeE6BcWh+iyKGCA8Kb2SlGgxg XPcT7qadUMfEyhY5KoeTXkJGUJN4aJ0Rvn5/bPZnarpN2B0C3q6r1so+YjrCotwXU0BTjJWzsU3 kOIVAUO0tPVlmlTVI31VBah0OEWc+9mDDyHwm+Xdk1n0YhPPivrtB2m5UE0cMrrA95Pf+O7mGh7 ES6zLszOmryK3jLgBN4mKldgvPtWNnp/qj0iey4= X-Google-Smtp-Source: AGHT+IEIM/6U+Pn/dM1lsYnWXQATXxbRu8vUgwL3EZAFT+hV0oylgJHUgjOCooDjstd2Q+Y/04PY4g== X-Received: by 2002:a17:903:22cd:b0:216:2bd7:1c2f with SMTP id d9443c01a7336-2232009991bmr51997225ad.18.1740596602664; Wed, 26 Feb 2025 11:03:22 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c3:f704:a0c6:9418:957f:d5bf]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22344c837e2sm6946185ad.139.2025.02.26.11.03.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2025 11:03:22 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Stefan Liebler , Peter Bergner , Wilco Dijkstra Subject: [PATCH 4/6] powerpc: Remove unused dl-procinfo.h Date: Wed, 26 Feb 2025 16:00:20 -0300 Message-ID: <20250226190308.2163908-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250226190308.2163908-1-adhemerval.zanella@linaro.org> References: <20250226190308.2163908-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 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 The _dl_string_platform is moved to hwcapinfo.h, since it is only used by hwcapinfo.c and test-get_hwcap internal test. Checked on powerpc64le-linux-gnu. --- sysdeps/powerpc/dl-procinfo.h | 129 ------------------ sysdeps/powerpc/hwcapinfo.h | 104 +++++++++++++- sysdeps/powerpc/nptl/tls.h | 2 + sysdeps/powerpc/test-get_hwcap.c | 3 +- .../unix/sysv/linux/powerpc/cpu-features.c | 1 + .../unix/sysv/linux/powerpc/elision-conf.c | 1 + 6 files changed, 109 insertions(+), 131 deletions(-) delete mode 100644 sysdeps/powerpc/dl-procinfo.h diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h deleted file mode 100644 index adb1c6994e..0000000000 --- a/sysdeps/powerpc/dl-procinfo.h +++ /dev/null @@ -1,129 +0,0 @@ -/* Processor capability information handling macros. PowerPC version. - Copyright (C) 2005-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#ifndef _DL_PROCINFO_H -#define _DL_PROCINFO_H 1 - -#include - -#define _DL_FIRST_PLATFORM 32 - -/* Platform bits (relative to _DL_FIRST_PLATFORM). */ -#define PPC_PLATFORM_POWER4 0 -#define PPC_PLATFORM_PPC970 1 -#define PPC_PLATFORM_POWER5 2 -#define PPC_PLATFORM_POWER5_PLUS 3 -#define PPC_PLATFORM_POWER6 4 -#define PPC_PLATFORM_CELL_BE 5 -#define PPC_PLATFORM_POWER6X 6 -#define PPC_PLATFORM_POWER7 7 -#define PPC_PLATFORM_PPCA2 8 -#define PPC_PLATFORM_PPC405 9 -#define PPC_PLATFORM_PPC440 10 -#define PPC_PLATFORM_PPC464 11 -#define PPC_PLATFORM_PPC476 12 -#define PPC_PLATFORM_POWER8 13 -#define PPC_PLATFORM_POWER9 14 -#define PPC_PLATFORM_POWER10 15 -#define PPC_PLATFORM_POWER11 16 - -static inline int -__attribute__ ((unused, always_inline)) -_dl_string_platform (const char *str) -{ - if (str == NULL) - return -1; - - if (strncmp (str, "power", 5) == 0) - { - int ret; - str += 5; - switch (*str) - { - case '1': - if (str[1] == '0') - { - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER10; - str++; - } - else if (str[1] == '1') - { - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER11; - str++; - } - else - return -1; - break; - case '4': - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER4; - break; - case '5': - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER5; - if (str[1] == '+') - { - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER5_PLUS; - ++str; - } - break; - case '6': - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER6; - if (str[1] == 'x') - { - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER6X; - ++str; - } - break; - case '7': - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER7; - break; - case '8': - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER8; - break; - case '9': - ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER9; - break; - default: - return -1; - } - if (str[1] == '\0') - return ret; - } - else if (strncmp (str, "ppc", 3) == 0) - { - if (strcmp (str + 3, "970") == 0) - return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC970; - else if (strcmp (str + 3, "-cell-be") == 0) - return _DL_FIRST_PLATFORM + PPC_PLATFORM_CELL_BE; - else if (strcmp (str + 3, "a2") == 0) - return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPCA2; - else if (strcmp (str + 3, "405") == 0) - return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC405; - else if (strcmp (str + 3, "440") == 0) - return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC440; - else if (strcmp (str + 3, "464") == 0) - return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC464; - else if (strcmp (str + 3, "476") == 0) - return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC476; - } - - return -1; -} - -#define _dl_procinfo(type, word) -1 - -#endif /* dl-procinfo.h */ diff --git a/sysdeps/powerpc/hwcapinfo.h b/sysdeps/powerpc/hwcapinfo.h index f1b989dfb3..3737731d0e 100644 --- a/sysdeps/powerpc/hwcapinfo.h +++ b/sysdeps/powerpc/hwcapinfo.h @@ -16,12 +16,114 @@ License along with the GNU C Library; if not, see . */ +#include #include #ifndef HWCAPINFO_H # define HWCAPINFO_H -extern tcbhead_t __tcb attribute_hidden; +#define _DL_FIRST_PLATFORM 32 + +/* Platform bits (relative to _DL_FIRST_PLATFORM). */ +#define PPC_PLATFORM_POWER4 0 +#define PPC_PLATFORM_PPC970 1 +#define PPC_PLATFORM_POWER5 2 +#define PPC_PLATFORM_POWER5_PLUS 3 +#define PPC_PLATFORM_POWER6 4 +#define PPC_PLATFORM_CELL_BE 5 +#define PPC_PLATFORM_POWER6X 6 +#define PPC_PLATFORM_POWER7 7 +#define PPC_PLATFORM_PPCA2 8 +#define PPC_PLATFORM_PPC405 9 +#define PPC_PLATFORM_PPC440 10 +#define PPC_PLATFORM_PPC464 11 +#define PPC_PLATFORM_PPC476 12 +#define PPC_PLATFORM_POWER8 13 +#define PPC_PLATFORM_POWER9 14 +#define PPC_PLATFORM_POWER10 15 +#define PPC_PLATFORM_POWER11 16 + +static inline int +__attribute__ ((unused, always_inline)) +_dl_string_platform (const char *str) +{ + if (str == NULL) + return -1; + + if (strncmp (str, "power", 5) == 0) + { + int ret; + str += 5; + switch (*str) + { + case '1': + if (str[1] == '0') + { + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER10; + str++; + } + else if (str[1] == '1') + { + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER11; + str++; + } + else + return -1; + break; + case '4': + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER4; + break; + case '5': + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER5; + if (str[1] == '+') + { + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER5_PLUS; + ++str; + } + break; + case '6': + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER6; + if (str[1] == 'x') + { + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER6X; + ++str; + } + break; + case '7': + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER7; + break; + case '8': + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER8; + break; + case '9': + ret = _DL_FIRST_PLATFORM + PPC_PLATFORM_POWER9; + break; + default: + return -1; + } + if (str[1] == '\0') + return ret; + } + else if (strncmp (str, "ppc", 3) == 0) + { + if (strcmp (str + 3, "970") == 0) + return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC970; + else if (strcmp (str + 3, "-cell-be") == 0) + return _DL_FIRST_PLATFORM + PPC_PLATFORM_CELL_BE; + else if (strcmp (str + 3, "a2") == 0) + return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPCA2; + else if (strcmp (str + 3, "405") == 0) + return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC405; + else if (strcmp (str + 3, "440") == 0) + return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC440; + else if (strcmp (str + 3, "464") == 0) + return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC464; + else if (strcmp (str + 3, "476") == 0) + return _DL_FIRST_PLATFORM + PPC_PLATFORM_PPC476; + } + + return -1; +} extern void __tcb_parse_hwcap_and_convert_at_platform (void); diff --git a/sysdeps/powerpc/nptl/tls.h b/sysdeps/powerpc/nptl/tls.h index 50b45b095f..683d5b3960 100644 --- a/sysdeps/powerpc/nptl/tls.h +++ b/sysdeps/powerpc/nptl/tls.h @@ -101,6 +101,8 @@ typedef struct dtv_t *dtv; } tcbhead_t; +extern tcbhead_t __tcb attribute_hidden; + # include /* This is the size of the initial TCB. */ diff --git a/sysdeps/powerpc/test-get_hwcap.c b/sysdeps/powerpc/test-get_hwcap.c index 0b507ec25e..9d6411897e 100644 --- a/sysdeps/powerpc/test-get_hwcap.c +++ b/sysdeps/powerpc/test-get_hwcap.c @@ -28,9 +28,10 @@ #include -#include +#include #ifndef STATIC_TST_HWCAP +#include #undef PROCINFO_DECL #include #endif diff --git a/sysdeps/unix/sysv/linux/powerpc/cpu-features.c b/sysdeps/unix/sysv/linux/powerpc/cpu-features.c index f0fabac0e0..671aa07847 100644 --- a/sysdeps/unix/sysv/linux/powerpc/cpu-features.c +++ b/sysdeps/unix/sysv/linux/powerpc/cpu-features.c @@ -24,6 +24,7 @@ #include #include #include +#include #define ENABLE_BIT(__hwcap, __v) __hwcap &= (__v) #define DISABLE_BIT(__hwcap, __h, __v) __hwcap |= (__h) & (__v) diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-conf.c b/sysdeps/unix/sysv/linux/powerpc/elision-conf.c index e42a19e454..fe98c6ba71 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-conf.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-conf.c @@ -21,6 +21,7 @@ #include #include #include +#include #define TUNABLE_NAMESPACE elision #include From patchwork Wed Feb 26 19:00:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 2052550 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=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=d2rfyzCJ; 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 4Z33nb6WPKz1yD0 for ; Thu, 27 Feb 2025 06:05:07 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0232E3858CDA for ; Wed, 26 Feb 2025 19:05:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0232E3858CDA Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=d2rfyzCJ X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 2DF873858C98 for ; Wed, 26 Feb 2025 19:03:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2DF873858C98 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 2DF873858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740596606; cv=none; b=CzA5tEn0xhvQWYXvlOmQf/QzsNpos0CSBpCnmCeTa2ImuYP9TQhNJna2xD4tw5w9/y77UVm8Dxaptp1yoX6cDC8G8sZ8xEv/duFfXY7mzbspwpCBMaxScsn/52Y6wCSY9E0x+FL/BLymXFFE9BJhZAR43oB9xqeYC9q/pKYBWZc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740596606; c=relaxed/simple; bh=lQWpniP3dJ0bToxEffg2dZhHScHSuTIC2B/wpc9/Rm8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=LsfVQoluAvBO5QPjksGu9Rb3pDeSD5It5gN5x+eDihoHs+9/sOQvZsJmiLf0+uzUhcLoMYNLZlCpOKn5LzV8ANaysQoncBycVy+7s8D4lpWOFT0qE8prRgBeQdWZMUa4lmNZCUujPKEm1P6LhJG9lht7CiCXcLDKSua/vGjBV6U= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DF873858C98 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-220e83d65e5so1726325ad.1 for ; Wed, 26 Feb 2025 11:03:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740596605; x=1741201405; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=n9mCWC3jt4SfjZe+5l7FxGbjYiIXiY09k2+bujGm6TY=; b=d2rfyzCJIPjeOej63e5yIRBrmOtfvak7IZ0Yx72/2vCuBRltWfkNzsiPXaujeEoEia /t47VdfSFOWCbgz9oHj2urWZaxPwBc1nTECQ21Ytg/xG8pO2mHpr8tsbwRNKRXsjCcba GT3WCEpWGMa/y1Op4QZaPHvfUQzX6eQXAZI3DKCRq2jbp7rU9zuHmBfjqcNOqx1U8nFB 4OuFB+44o9M2UR4F8ZL/F8OOfTtVvBt6XvkQ2qUojGAEi0w7VAmAEmVRBpMCuFT5Gs0A MP1oKxO6+kSfTZIabt4tRaiSobx070axg7VBXEDCWgwng7E4mY3Ffcs9N63IZ2hbMlYs 8IfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740596605; x=1741201405; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n9mCWC3jt4SfjZe+5l7FxGbjYiIXiY09k2+bujGm6TY=; b=iOOs/TKc8gGL7aJZWrcinIfidwUPcHsg4vCuQhUhPcpXqC71Vh7ACYse6d8BOKcTk+ YuAnzW9uQ4adUiOzDDN9Y0V0XM9/GwivqQZq3O/xjK6sQiURABaKTiE5sZqdzpJqkOfZ joomqxdrfNLNvbt0PJIexlpvXF9xyC/XTPA1C9aaVrwlgCimaKZkEwD2Rlmk21a55gTn SYIftUDKSz4OOhEvh3r2WRMP+hCOS4eZLHxgA6UsAG3Msr9wpmR3ydsv6slxzqgpaJUI lUgefQ13NmZX+xQ2314vYbsYFVHy5wBxlU/HYkNiCKpzQc2GCodFmNRdwoHZqJcyzZUm tCrQ== X-Gm-Message-State: AOJu0YxwDkzCl4p6YpDVGAOz+SVc74NLbGZV/1qarajBc9YvOnC8x5+i pOdmLRa3h9C6/kY1HY+OneF29fDQpWsc5zjtbfI/f5aWJ/R+Bxf0KeRrNWsmHTlWfZ2M9CFte7l + X-Gm-Gg: ASbGncvNaJwfURQvNjNGhL5s9NNehRStD8sylgGZ3gXxpTaXfix+Go4oyO+DWSMsyri +0bTyq34B0eOUVzk7LGOg0aWxEHKQghfYLkD6k/md8vZ5fhH+3oOq0hRVwVkRhoax+4PMbf4Srj RVxWjTjgSPdSGmU6GqTI+P9uZ76WlU092G0k6YL0/UinFhSK+4w5scVXChfOKOpzpeN+zv6NkJa oBjqENOTLdGkOLf6lw4lHGduU3lwAEpbkOaLH58pSUiEP1Tbt6+g/Uo0mpD8Sex//nunRaCpli2 CmWBj4e8oFPtmvYaPXdz8SNjIVjYJIQJXr/oNTM= X-Google-Smtp-Source: AGHT+IGc4eWRUgrMC6w3+UZu0x6+La3n2Suvvguptv3HDUjf7+4XbALxNKqQxLxWL1VMOwijwZI7UQ== X-Received: by 2002:a17:902:f68c:b0:21a:8300:b9d5 with SMTP id d9443c01a7336-22320092d46mr76894695ad.23.1740596604685; Wed, 26 Feb 2025 11:03:24 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c3:f704:a0c6:9418:957f:d5bf]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22344c837e2sm6946185ad.139.2025.02.26.11.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2025 11:03:24 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Stefan Liebler , Peter Bergner , Wilco Dijkstra Subject: [PATCH 5/6] Remove dl-procinfo.h Date: Wed, 26 Feb 2025 16:00:21 -0300 Message-ID: <20250226190308.2163908-6-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250226190308.2163908-1-adhemerval.zanella@linaro.org> References: <20250226190308.2163908-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 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 powerpc was the only architecture with arch-specific hooks for LD_SHOW_AUXV, and with the information moved to ld diagnostics there is no need to keep the _dl_procinfo hook. Checked with a build for all affected ABIs. Reviewed-by: Wilco Dijkstra --- elf/dl-cache.c | 1 - elf/dl-diagnostics.c | 1 - elf/dl-hwcaps.c | 1 - elf/dl-support.c | 1 - elf/dl-usage.c | 1 - elf/ldconfig.c | 1 - elf/rtld.c | 1 - scripts/gen-tunables.awk | 1 - sysdeps/generic/dl-procinfo.h | 25 ------------------- sysdeps/i386/fpu/fclrexcpt.c | 1 - sysdeps/i386/fpu/fedisblxcpt.c | 1 - sysdeps/i386/fpu/feenablxcpt.c | 1 - sysdeps/i386/fpu/fegetenv.c | 1 - sysdeps/i386/fpu/fegetmode.c | 1 - sysdeps/i386/fpu/feholdexcpt.c | 1 - sysdeps/i386/fpu/fesetenv.c | 1 - sysdeps/i386/fpu/fesetmode.c | 1 - sysdeps/i386/fpu/fesetround.c | 1 - sysdeps/i386/fpu/feupdateenv.c | 1 - sysdeps/i386/fpu/fgetexcptflg.c | 1 - sysdeps/i386/fpu/ftestexcept.c | 1 - sysdeps/i386/setfpucw.c | 1 - sysdeps/mach/hurd/dl-sysdep.c | 1 - sysdeps/powerpc/fpu/math_private.h | 1 - sysdeps/powerpc/hwcapinfo.c | 1 - sysdeps/unix/sysv/linux/dl-sysdep.c | 5 ---- .../unix/sysv/linux/powerpc/elision-conf.c | 1 - sysdeps/x86/dl-hwcap.h | 3 --- 28 files changed, 58 deletions(-) delete mode 100644 sysdeps/generic/dl-procinfo.h diff --git a/elf/dl-cache.c b/elf/dl-cache.c index 300aa1b6dd..f9ca40de3f 100644 --- a/elf/dl-cache.c +++ b/elf/dl-cache.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include <_itoa.h> #include diff --git a/elf/dl-diagnostics.c b/elf/dl-diagnostics.c index fb2cfbeeb8..abb644314d 100644 --- a/elf/dl-diagnostics.c +++ b/elf/dl-diagnostics.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include "trusted-dirs.h" diff --git a/elf/dl-hwcaps.c b/elf/dl-hwcaps.c index e3d24fba1b..66060d7bb5 100644 --- a/elf/dl-hwcaps.c +++ b/elf/dl-hwcaps.c @@ -23,7 +23,6 @@ #include #include -#include #include /* This is the result of counting the substrings in a colon-separated diff --git a/elf/dl-support.c b/elf/dl-support.c index a7d5a5e8ab..c7860f327a 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/elf/dl-usage.c b/elf/dl-usage.c index c6d13ac2ee..31b27e5ea6 100644 --- a/elf/dl-usage.c +++ b/elf/dl-usage.c @@ -22,7 +22,6 @@ #include #include "version.h" -#include #include void diff --git a/elf/ldconfig.c b/elf/ldconfig.c index 1432187e9b..39b154c72c 100644 --- a/elf/ldconfig.c +++ b/elf/ldconfig.c @@ -45,7 +45,6 @@ #include #include -#include #ifndef LD_SO_CONF # define LD_SO_CONF SYSCONFDIR "/ld.so.conf" diff --git a/elf/rtld.c b/elf/rtld.c index 115f1da37f..00b25c1a73 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/scripts/gen-tunables.awk b/scripts/gen-tunables.awk index d9f326b63b..5d34075c16 100644 --- a/scripts/gen-tunables.awk +++ b/scripts/gen-tunables.awk @@ -141,7 +141,6 @@ END { print "# error \"Do not include this file directly.\"" print "# error \"Include tunables.h instead.\"" print "#endif" - print "#include \n" # Now, the enum names print "\ntypedef enum" diff --git a/sysdeps/generic/dl-procinfo.h b/sysdeps/generic/dl-procinfo.h deleted file mode 100644 index 057a4ae362..0000000000 --- a/sysdeps/generic/dl-procinfo.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Stub version of processor capability information handling macros. - Copyright (C) 1998-2025 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _DL_PROCINFO_H -#define _DL_PROCINFO_H 1 - -/* We cannot provide a general printing function. */ -#define _dl_procinfo(type, word) -1 - -#endif /* dl-procinfo.h */ diff --git a/sysdeps/i386/fpu/fclrexcpt.c b/sysdeps/i386/fpu/fclrexcpt.c index 2254c49d60..f7a2ed2be1 100644 --- a/sysdeps/i386/fpu/fclrexcpt.c +++ b/sysdeps/i386/fpu/fclrexcpt.c @@ -19,7 +19,6 @@ #include #include #include -#include int __feclearexcept (int excepts) diff --git a/sysdeps/i386/fpu/fedisblxcpt.c b/sysdeps/i386/fpu/fedisblxcpt.c index 305758a267..b23fd8e869 100644 --- a/sysdeps/i386/fpu/fedisblxcpt.c +++ b/sysdeps/i386/fpu/fedisblxcpt.c @@ -19,7 +19,6 @@ #include #include #include -#include int fedisableexcept (int excepts) diff --git a/sysdeps/i386/fpu/feenablxcpt.c b/sysdeps/i386/fpu/feenablxcpt.c index e24d9d5f98..bc4a4ce32f 100644 --- a/sysdeps/i386/fpu/feenablxcpt.c +++ b/sysdeps/i386/fpu/feenablxcpt.c @@ -19,7 +19,6 @@ #include #include #include -#include int feenableexcept (int excepts) diff --git a/sysdeps/i386/fpu/fegetenv.c b/sysdeps/i386/fpu/fegetenv.c index 3c58ea6ef1..0d2b87db93 100644 --- a/sysdeps/i386/fpu/fegetenv.c +++ b/sysdeps/i386/fpu/fegetenv.c @@ -19,7 +19,6 @@ #include #include #include -#include int __fegetenv (fenv_t *envp) diff --git a/sysdeps/i386/fpu/fegetmode.c b/sysdeps/i386/fpu/fegetmode.c index ff3f98834f..41275e1036 100644 --- a/sysdeps/i386/fpu/fegetmode.c +++ b/sysdeps/i386/fpu/fegetmode.c @@ -20,7 +20,6 @@ #include #include #include -#include int fegetmode (femode_t *modep) diff --git a/sysdeps/i386/fpu/feholdexcpt.c b/sysdeps/i386/fpu/feholdexcpt.c index 3b689b97c9..a323a04f27 100644 --- a/sysdeps/i386/fpu/feholdexcpt.c +++ b/sysdeps/i386/fpu/feholdexcpt.c @@ -19,7 +19,6 @@ #include #include #include -#include int __feholdexcept (fenv_t *envp) diff --git a/sysdeps/i386/fpu/fesetenv.c b/sysdeps/i386/fpu/fesetenv.c index 06d78484e9..66d7002edd 100644 --- a/sysdeps/i386/fpu/fesetenv.c +++ b/sysdeps/i386/fpu/fesetenv.c @@ -21,7 +21,6 @@ #include #include #include -#include /* All exceptions, including the x86-specific "denormal operand" diff --git a/sysdeps/i386/fpu/fesetmode.c b/sysdeps/i386/fpu/fesetmode.c index 33e85ecfa6..eab0a5d683 100644 --- a/sysdeps/i386/fpu/fesetmode.c +++ b/sysdeps/i386/fpu/fesetmode.c @@ -20,7 +20,6 @@ #include #include #include -#include /* All exceptions, including the x86-specific "denormal operand" exception. */ diff --git a/sysdeps/i386/fpu/fesetround.c b/sysdeps/i386/fpu/fesetround.c index ef6fc3af1b..ea1f9096b5 100644 --- a/sysdeps/i386/fpu/fesetround.c +++ b/sysdeps/i386/fpu/fesetround.c @@ -19,7 +19,6 @@ #include #include #include -#include int __fesetround (int round) diff --git a/sysdeps/i386/fpu/feupdateenv.c b/sysdeps/i386/fpu/feupdateenv.c index 38ae5f4993..89b000953a 100644 --- a/sysdeps/i386/fpu/feupdateenv.c +++ b/sysdeps/i386/fpu/feupdateenv.c @@ -18,7 +18,6 @@ #include #include -#include #include int diff --git a/sysdeps/i386/fpu/fgetexcptflg.c b/sysdeps/i386/fpu/fgetexcptflg.c index f4c7765beb..be181af162 100644 --- a/sysdeps/i386/fpu/fgetexcptflg.c +++ b/sysdeps/i386/fpu/fgetexcptflg.c @@ -19,7 +19,6 @@ #include #include #include -#include int diff --git a/sysdeps/i386/fpu/ftestexcept.c b/sysdeps/i386/fpu/ftestexcept.c index 25cb027200..2d41ba22ac 100644 --- a/sysdeps/i386/fpu/ftestexcept.c +++ b/sysdeps/i386/fpu/ftestexcept.c @@ -18,7 +18,6 @@ #include #include -#include #include int diff --git a/sysdeps/i386/setfpucw.c b/sysdeps/i386/setfpucw.c index df8fffc6f2..1edfd5be0a 100644 --- a/sysdeps/i386/setfpucw.c +++ b/sysdeps/i386/setfpucw.c @@ -21,7 +21,6 @@ #include #include #include -#include void __setfpucw (fpu_control_t set) diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c index 173499c4c1..e629492583 100644 --- a/sysdeps/mach/hurd/dl-sysdep.c +++ b/sysdeps/mach/hurd/dl-sysdep.c @@ -43,7 +43,6 @@ #include #include -#include #include #include diff --git a/sysdeps/powerpc/fpu/math_private.h b/sysdeps/powerpc/fpu/math_private.h index 7065d276c0..a87ed62c42 100644 --- a/sysdeps/powerpc/fpu/math_private.h +++ b/sysdeps/powerpc/fpu/math_private.h @@ -21,7 +21,6 @@ #include #include -#include #include_next diff --git a/sysdeps/powerpc/hwcapinfo.c b/sysdeps/powerpc/hwcapinfo.c index ca9277bb1e..72e65ac7a0 100644 --- a/sysdeps/powerpc/hwcapinfo.c +++ b/sysdeps/powerpc/hwcapinfo.c @@ -18,7 +18,6 @@ #include #include -#include #include tcbhead_t __tcb __attribute__ ((visibility ("hidden"))); diff --git a/sysdeps/unix/sysv/linux/dl-sysdep.c b/sysdeps/unix/sysv/linux/dl-sysdep.c index b746ac2644..544902e6d2 100644 --- a/sysdeps/unix/sysv/linux/dl-sysdep.c +++ b/sysdeps/unix/sysv/linux/dl-sysdep.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -222,10 +221,6 @@ _dl_show_auxv (void) assert (AT_NULL == 0); assert (AT_IGNORE == 1); - /* Some entries are handled in a special way per platform. */ - if (_dl_procinfo (av->a_type, av->a_un.a_val) == 0) - continue; - if (idx < sizeof (auxvars) / sizeof (auxvars[0]) && auxvars[idx].form != unknown) { diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-conf.c b/sysdeps/unix/sysv/linux/powerpc/elision-conf.c index fe98c6ba71..451897bd3d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-conf.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-conf.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #define TUNABLE_NAMESPACE elision diff --git a/sysdeps/x86/dl-hwcap.h b/sysdeps/x86/dl-hwcap.h index 2384897e60..d48240843e 100644 --- a/sysdeps/x86/dl-hwcap.h +++ b/sysdeps/x86/dl-hwcap.h @@ -25,7 +25,4 @@ enum HWCAP_X86_AVX512_1 = 1 << 2 }; -/* We cannot provide a general printing function. */ -#define _dl_procinfo(type, word) -1 - #endif /* dl-hwcap.h */ From patchwork Wed Feb 26 19:00:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 2052551 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=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Bis3fWj0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4Z33rC2Xp2z1yD0 for ; Thu, 27 Feb 2025 06:07:23 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 46A3A3858D34 for ; Wed, 26 Feb 2025 19:07:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46A3A3858D34 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Bis3fWj0 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 0965A3858C31 for ; Wed, 26 Feb 2025 19:03:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0965A3858C31 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 0965A3858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740596608; cv=none; b=OR8uifBy4FHK1SMfAB+QWjZQ48CXCsjjRfkUZKG5DyrVBU+DKmtRX+1dIJNoVnIZmYpJGs6uN5UHopnGGA1IyS3wGBK9mqExF+gDPkP1rGXPy9nNXLZV2czniOTlSw8xgW9jhpicEeeBRebJ2T3o6VcrUA0Fz2isLGRkPuuGWLk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740596608; c=relaxed/simple; bh=u00ZHAy2ci2aTNQhvhdzzcOAqJT+iE+X6NIx8Vdf1XE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=lJGkKdepM18sg8Ra+vOg1TdT0Js/dJvPGSnO/yZSh2qozETkTe/P7mOao7JeKaueRuSnu27pTfMERaeXy0U0ws/28EJMugA3YLPU5MVs54L/Dvh5K2tOzsZTN4/3xloYVKfdMIn57bpMTxBmoe0Pn8Id8VeFb/Q/gWrbiDEmNw4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0965A3858C31 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-220e83d65e5so1727065ad.1 for ; Wed, 26 Feb 2025 11:03:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740596607; x=1741201407; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=cTiDYJgepqR8fa+YypeegqUUuBCjDp4Lkj5cphk1RiU=; b=Bis3fWj0pMT2bOeztAb8DQHHy26A6Eo0daSdR1Akz7saQFf1Qh9uQLzjBqrMVIdyV+ XS/3Ms+hnm753lRD4725JOwc4s6LtC5Zp+o1XZGFUgELYnoMsxPJtSk1/lLGb4ZJ7ZSP Ko/gHmi+b1IwETtimiCy4zkxyz+QVy48BkhL1Nm8WsZxJOkHYNCZ2cNUvK91X9w7RhBo s+88YYsMtC8/fwmoJRwLlNAIE21tkj0KaLpdUFCHIGPQx8DOJlWpiyyq4tVmtvIBi25Y ch1EMfMozsqUbstWI8kUlNVEdCVCvIuC6KxjuhWWX1chl4J3EtB4v5LIcCx5oDtygjJ4 MvEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740596607; x=1741201407; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cTiDYJgepqR8fa+YypeegqUUuBCjDp4Lkj5cphk1RiU=; b=RAhN6o55N4npbHOi9OBKg1K+QPHxSGddmzKn1hyzcWMvitQBbj8toNLuJtyS7xHNhb YFyxY9/nOgk/xUW6E77oB95X+K4oE7krATfGkkgeoPoqPCvea34AboEd3BCDbCi9jo2f BDe/y/r/xI9kiqdHCJh1kZefqNx93JGL4JMNd5E2s5mBUQNA5mAk0e7Gv+IMeR/UtToW TyOjIN2InkNPAsIEscxA9c77aom4Xi3CnJucEeW2TrpaJ+X/Fd0XzSE7Nn9aUac6XxRk ZfAqbhWpe72TU9m4Jue20zjQmhV1GsSNFeKc8slmMFy0kQu9TGPuUuQ/WnNDti7Shx0M PW0g== X-Gm-Message-State: AOJu0YyIQXnSl7yywh5Vm+LW2Oxc9F1FWvGPkCnTajV3lQ+TaZyXcUA8 9KmkaH+NNAs97vpgjo63s1Q1siYYYKvIv3qXvsNzTvdehe74LvhrV556/pvnfQfzMVCCzVkWr5/ b X-Gm-Gg: ASbGncuG1WDmf2Y7blB8f3ftLXiDiHFTmRvv97go/jIeauRe7YRQBi+fOtt6JUcCTBG TDPbLuLJDQ0wbbXZNN60GsbGKMvt8rjKmYJUgk+AsaW8IS+Oi5ssy8ZK61pXbNuuiZPuacmSc6G 7/I7Om4NVW32l1p2iWdkEhGWN49U/P9t41PJs9btpKelob+//1xKMFTJCMaQra3sithYTMPpJsk dYbQ2Pjpw52KFLIhWR0aapcI/CpN9773T1zxWTqxZV5HhABHUDN2MkS2V/LOg3SLRixIBwv9YtB D+/9JrrFWF3I6Tj+orbWHD8hJNUZd6P6Q8OJxCQ= X-Google-Smtp-Source: AGHT+IH71Igz28H63TnycEkhKDIxD+3N1r1i2Pw+6F3iO/KYpHVvwWke8K1zOp92bNwHz82DUglrRw== X-Received: by 2002:a17:902:e842:b0:220:e9f5:4b7c with SMTP id d9443c01a7336-22320080b3dmr66172235ad.17.1740596606738; Wed, 26 Feb 2025 11:03:26 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c3:f704:a0c6:9418:957f:d5bf]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22344c837e2sm6946185ad.139.2025.02.26.11.03.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2025 11:03:26 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Stefan Liebler , Peter Bergner , Wilco Dijkstra Subject: [PATCH 6/6] linux: Prefix AT_HWCAP with 0x on LD_SHOW_AUXV Date: Wed, 26 Feb 2025 16:00:22 -0300 Message-ID: <20250226190308.2163908-7-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250226190308.2163908-1-adhemerval.zanella@linaro.org> References: <20250226190308.2163908-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 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 Suggested-by: Stefan Liebler Reviewed-by: Stefan Liebler --- sysdeps/unix/sysv/linux/dl-sysdep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/unix/sysv/linux/dl-sysdep.c b/sysdeps/unix/sysv/linux/dl-sysdep.c index 544902e6d2..f17a3e189c 100644 --- a/sysdeps/unix/sysv/linux/dl-sysdep.c +++ b/sysdeps/unix/sysv/linux/dl-sysdep.c @@ -184,7 +184,10 @@ _dl_show_auxv (void) [AT_GID - 2] = { "GID: ", dec }, [AT_EGID - 2] = { "EGID: ", dec }, [AT_PLATFORM - 2] = { "PLATFORM: ", str }, - [AT_HWCAP - 2] = { "HWCAP: ", hex }, + [AT_HWCAP - 2] = { "HWCAP: 0x", hex }, + [AT_HWCAP2 - 2] = { "HWCAP2: 0x", hex }, + [AT_HWCAP3 - 2] = { "HWCAP3: 0x", hex }, + [AT_HWCAP4 - 2] = { "HWCAP4: 0x", hex }, [AT_CLKTCK - 2] = { "CLKTCK: ", dec }, [AT_FPUCW - 2] = { "FPUCW: ", hex }, [AT_DCACHEBSIZE - 2] = { "DCACHEBSIZE: 0x", hex }, @@ -196,9 +199,6 @@ _dl_show_auxv (void) [AT_SYSINFO - 2] = { "SYSINFO: 0x", hex }, [AT_SYSINFO_EHDR - 2] = { "SYSINFO_EHDR: 0x", hex }, [AT_RANDOM - 2] = { "RANDOM: 0x", hex }, - [AT_HWCAP2 - 2] = { "HWCAP2: 0x", hex }, - [AT_HWCAP3 - 2] = { "HWCAP3: 0x", hex }, - [AT_HWCAP4 - 2] = { "HWCAP4: 0x", hex }, [AT_RSEQ_FEATURE_SIZE - 2] = { "RSEQ_FEATURE_SIZE: ", dec }, [AT_RSEQ_ALIGN - 2] = { "RSEQ_ALIGN: ", dec }, [AT_MINSIGSTKSZ - 2] = { "MINSIGSTKSZ: ", dec },