Message ID | PAWPR08MB89829DFDC571EEB7B041047D83532@PAWPR08MB8982.eurprd08.prod.outlook.com |
---|---|
State | New |
Headers | show |
Series | AArch64: Remove unused _dl_aarch64_cap_flags | expand |
On 06/11/24 10:42, Wilco Dijkstra wrote: > > Remove the _dl_aarch64_cap_flags since they are unused and not kept up to date. > > OK for commit? > > --- > > 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 b85d4ad8a32e41fb6f884517108f806ad62bf93b..0000000000000000000000000000000000000000 > --- 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-2024 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 <sys/auxv.h> > -#include <unistd.h> > -#include <ldsodefs.h> > -#include <sysdep.h> > - > -/* 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/aarch64/dl-procinfo.c b/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c > index 7af232de523e8e2cc95554a49fcf26842ad7ecaa..f303d7ab47903af547b05436c473eea1df9be5e2 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 > I think it should be ok to remove all _dl_hwcap_string support since it is unused since 6099908fb84debee4c3bcb05d88769410c2aecd1.
Hi Adhemerval, > I think it should be ok to remove all _dl_hwcap_string support since it > is unused since 6099908fb84debee4c3bcb05d88769410c2aecd1. I can easily remove the other unused ones. There are a few targets that define their own _dl_procinfo which then manually prints out the HWCAPS. Is it useful to keep those? Generic code could just dump HWCAPs as hex if deemed useful for debugging. Cheers, Wilco
On 06/11/24 14:48, Wilco Dijkstra wrote: > Hi Adhemerval, > >> I think it should be ok to remove all _dl_hwcap_string support since it >> is unused since 6099908fb84debee4c3bcb05d88769410c2aecd1. > > I can easily remove the other unused ones. There are a few targets that > define their own _dl_procinfo which then manually prints out the HWCAPS. > Is it useful to keep those? I guess not anymore, previously it would map to subfolder selection during ldconfig, but now it is just for pretty printer for hwcap. > > Generic code could just dump HWCAPs as hex if deemed useful for > debugging. Agreed. > > Cheers, > Wilco
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 b85d4ad8a32e41fb6f884517108f806ad62bf93b..0000000000000000000000000000000000000000 --- 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-2024 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 <sys/auxv.h> -#include <unistd.h> -#include <ldsodefs.h> -#include <sysdep.h> - -/* 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/aarch64/dl-procinfo.c b/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c index 7af232de523e8e2cc95554a49fcf26842ad7ecaa..f303d7ab47903af547b05436c473eea1df9be5e2 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