From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 3080E384B838; Thu, 6 Oct 2022 11:02:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3080E384B838 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665054168; bh=6VIC4yF67kqoIi3mlbidBPJM94uqtZA4ByEsHG1pS+8=; h=From:To:Subject:Date:From; b=Yw2egaUMtIbI6bPLzYMCGuK+YiK+dh9/O337/t64q0iTDdcxVbcNOoon39MvM2VzO q5U2MbFr72rRZ/CyE9gijmwpre24quK4PbPPf8VopGIwKc844pqCMPvQ8rIJLwsT64 Iu2BvSfQCNplP8Ziqzk7Pzv6TgPB45p2zdN5as94= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] elf: Remove hwcap parameter from add_to_cache signature X-Act-Checkin: glibc X-Git-Author: Javier Pello X-Git-Refname: refs/heads/master X-Git-Oldrev: b78ff5a25dc8ba9d8c6df10bb0a533254bdd193f X-Git-Newrev: 4a7094119ce05cadf927f52cc5d723e2195e65f9 Message-Id: <20221006110248.3080E384B838@sourceware.org> Date: Thu, 6 Oct 2022 11:02:48 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4a7094119ce05cadf927f52cc5d723e2195e65f9 commit 4a7094119ce05cadf927f52cc5d723e2195e65f9 Author: Javier Pello Date: Tue Sep 27 20:07:24 2022 +0200 elf: Remove hwcap parameter from add_to_cache signature Last commit made it so that the value passed for that parameter was always 0 at its only call site. Signed-off-by: Javier Pello Reviewed-by: Florian Weimer Diff: --- elf/cache.c | 16 +++------------- elf/ldconfig.c | 3 +-- sysdeps/generic/ldconfig.h | 2 +- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/elf/cache.c b/elf/cache.c index f5f3ef8c4d..ecbea2a0d9 100644 --- a/elf/cache.c +++ b/elf/cache.c @@ -764,7 +764,7 @@ save_cache (const char *cache_name) /* Add one library to the cache. */ void add_to_cache (const char *path, const char *filename, const char *soname, - int flags, unsigned int isa_level, uint64_t hwcap, + int flags, unsigned int isa_level, struct glibc_hwcaps_subdirectory *hwcaps) { struct cache_entry *new_entry = xmalloc (sizeof (*new_entry)); @@ -782,22 +782,12 @@ add_to_cache (const char *path, const char *filename, const char *soname, new_entry->path = path_interned; new_entry->flags = flags; new_entry->isa_level = isa_level; - new_entry->hwcap = hwcap; + new_entry->hwcap = 0; new_entry->hwcaps = hwcaps; new_entry->bits_hwcap = 0; if (hwcaps != NULL) - { - assert (hwcap == 0); - hwcaps->used = true; - } - - /* Count the number of bits set in the masked value. */ - for (size_t i = 0; - (~((1ULL << i) - 1) & hwcap) != 0 && i < 8 * sizeof (hwcap); ++i) - if ((hwcap & (1ULL << i)) != 0) - ++new_entry->bits_hwcap; - + hwcaps->used = true; /* Keep the list sorted - search for right place to insert. */ struct cache_entry *ptr = entries; diff --git a/elf/ldconfig.c b/elf/ldconfig.c index 0d19d84773..e6c24e71a4 100644 --- a/elf/ldconfig.c +++ b/elf/ldconfig.c @@ -980,8 +980,7 @@ search_dir (const struct dir_entry *entry) } if (opt_build_cache) add_to_cache (entry->path, filename, dlib_ptr->soname, - dlib_ptr->flag, dlib_ptr->isa_level, 0, - entry->hwcaps); + dlib_ptr->flag, dlib_ptr->isa_level, entry->hwcaps); } /* Free all resources. */ diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h index 7cc898db61..24222b0f1b 100644 --- a/sysdeps/generic/ldconfig.h +++ b/sysdeps/generic/ldconfig.h @@ -70,7 +70,7 @@ const char *glibc_hwcaps_subdirectory_name extern void add_to_cache (const char *path, const char *filename, const char *soname, int flags, - unsigned int isa_level, uint64_t hwcap, + unsigned int isa_level, struct glibc_hwcaps_subdirectory *); extern void init_aux_cache (void);