aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/s390
diff options
context:
space:
mode:
authorWilco Dijkstra <wilco.dijkstra@arm.com>2025-02-28 16:52:25 +0000
committerWilco Dijkstra <wilco.dijkstra@arm.com>2025-02-28 16:55:18 +0000
commite5893e6349541d871e8a25120bca014551d13ff5 (patch)
tree37bddfd525c777b29f40b06faee20a8ea5478706 /sysdeps/s390
parentc0f380c465915faf30dbd10acccdf8b1affda083 (diff)
downloadglibc-e5893e6349541d871e8a25120bca014551d13ff5.tar.xz
glibc-e5893e6349541d871e8a25120bca014551d13ff5.zip
Remove unused dl-procinfo.h
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. Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/s390')
-rw-r--r--sysdeps/s390/Makefile1
-rw-r--r--sysdeps/s390/cpu-features.c3
-rw-r--r--sysdeps/s390/dl-procinfo-s390.c26
-rw-r--r--sysdeps/s390/dl-procinfo.c3
-rw-r--r--sysdeps/s390/dl-procinfo.h72
-rw-r--r--sysdeps/s390/multiarch/ifunc-resolve.h3
-rw-r--r--sysdeps/s390/s390-32/dl-machine.h1
-rw-r--r--sysdeps/s390/s390-64/dl-hwcaps-subdirs.c1
-rw-r--r--sysdeps/s390/s390-64/dl-machine.h1
9 files changed, 5 insertions, 106 deletions
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 @@
<https://www.gnu.org/licenses/>. */
#include <cpu-features.h>
-
+#include <ldsodefs.h>
+#include <sys/auxv.h>
#include <elf/dl-tunables.h>
#include <ifunc-memcmp.h>
#include <string.h>
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
- <https://www.gnu.org/licenses/>. */
-
-#include <dl-procinfo.h>
-
-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
<https://www.gnu.org/licenses/>. */
-/* 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
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _DL_PROCINFO_H
-#define _DL_PROCINFO_H 1
-#include <ldsodefs.h>
-
-#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 @@
<https://www.gnu.org/licenses/>. */
#include <unistd.h>
-#include <dl-procinfo.h>
#include <cpu-features.h>
+#include <ldsodefs.h>
+#include <sys/auxv.h>
#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 <sys/param.h>
#include <string.h>
#include <link.h>
-#include <sysdeps/s390/dl-procinfo.h>
#include <dl-irel.h>
#include <dl-static-tls.h>
#include <dl-machine-rel.h>
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 <dl-hwcaps.h>
#include <ldsodefs.h>
+#include <sys/auxv.h>
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 <sys/param.h>
#include <string.h>
#include <link.h>
-#include <sysdeps/s390/dl-procinfo.h>
#include <dl-irel.h>
#include <dl-static-tls.h>
#include <dl-machine-rel.h>