From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by sourceware.org (Postfix) with ESMTPS id 7FB6F3857B86 for ; Tue, 27 Sep 2022 18:07:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7FB6F3857B86 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=otheo.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=otheo.eu Received: (Authenticated sender: #01#@otheo.eu) by mail.gandi.net (Postfix) with ESMTPSA id DBA1F20003 for ; Tue, 27 Sep 2022 18:07:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=otheo.eu; s=gm1; t=1664302042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pJ6QxteT2SVmBk19fGOI0FeJ4pOn6GRk75M4xry6j68=; b=gMngosly9LhxDDt/jRpXyFPEPo8LiUYjmzHZST6cZEFqAN4wkKSNn3cT24n0Hd30+J8XZ5 qY4o+L7RjMQY/Ji6ghuGyn/oEoT0N2oPh01YmFQDr+NlSprEJ+TCT4su8AGqnjFZO7lV3G dMYno9nXOKpjCb+0OYdUUwr0ipS+2UbMPaMQi3a5FIKeGI6gZxTHwB7bKlOfTULDcJOQf5 6jh01Sn1rVZfOgA9G1lGhmIL2TLEG4T2cQTMdVqmcAKw1jHNhvHgSGmYLWaLUNQqfhGLsY iVLu6RuooLenuPUrl/usY6jHZpTrSUMno6/F3kBHTDMHDqRrdDx7yiFM/dZDgw== Date: Tue, 27 Sep 2022 20:07:24 +0200 From: Javier Pello To: libc-alpha@sourceware.org Subject: [PATCH v3 4/8] elf: Remove hwcap parameter from add_to_cache signature Message-Id: <20220927200724.a18e70e2103e626ec088ad34@otheo.eu> In-Reply-To: <20220927200352.0424a12908a437fef9d3a7bc@otheo.eu> References: <20220905200652.d69204581d15c64647da5cd2@otheo.eu> <87h71l9crb.fsf@oldenburg.str.redhat.com> <20220906201207.e7b3d08272af5649754e76b1@otheo.eu> <87h71i6rfa.fsf@oldenburg.str.redhat.com> <20220914200724.8e685fbbaf441c96d19011c6@otheo.eu> <20220917161748.2b76e1731a27eb78880ee57c@otheo.eu> <20220927200352.0424a12908a437fef9d3a7bc@otheo.eu> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 --- 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 f5f3ef8c..ecbea2a0 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 0d19d847..e6c24e71 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 7cc898db..24222b0f 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); -- 2.37.3