From patchwork Sun Jun 16 17:31:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1948321 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=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=wMiCtn2+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (unknown [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4W2Kn933p0z20Wb for ; Mon, 17 Jun 2024 03:31:25 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 74B23878ED; Sun, 16 Jun 2024 19:31:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.b="wMiCtn2+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8C2FE88122; Sun, 16 Jun 2024 19:31:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 639108812B for ; Sun, 16 Jun 2024 19:31:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from LT2ubnt.fritz.box (ip-178-202-041-025.um47.pools.vodafone-ip.de [178.202.41.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 3EB5140F7C; Sun, 16 Jun 2024 17:31:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1718559066; bh=1eapSsFd5zDuuemIQfOOIZJOtVCHkhaQAjVR1UtTh84=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=wMiCtn2+uAZiXCHVMSbaWWSpJY8PtXebiTfS7p4ZWkhCVqm4vRqIlRy8A1chkI3u9 /NPNZf67XnlDNbvrwEdPdyQBGERU9d26x6X/PdhBqUt1X31uLh7yDJbUtGFFidrcyA 3SmhZM8wjforKY9bLTmbiwJBDwdGHyREsIKBfcIxUkvs9YEO5Sg33DkpJs24CwYytl S0p06W6ZTHqjjKwKQgZiOei8rtSfpWaSplI3zUNQUZiJrH/9uKNrE3b20ZTO+gsN3M gdjZfMvNZke13QDYUpPJvibxhZfpz+sv8FnYWm14AEe3MmXSVLLcxBgnRlvOYTWcVv i3GtRQw0ZgYRg== From: Heinrich Schuchardt To: Tom Rini , Ilias Apalodimas Cc: Marek Vasut , Simon Glass , Dan Carpenter , Richard Henderson , Sam Edwards , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 0/3] cmd: avoid duplicate weak functions Date: Sun, 16 Jun 2024 19:31:02 +0200 Message-ID: <20240616173105.7430-1-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean If we have multiple weak implementations of functions, the linker might choose any of these. ARM and RISC-V already provide a weak implementation of flush_dcache_all() but cmd/cache.c provides another implementation. Add an #ifdef to avoid the duplication. The EFI sub-systems uses invalidate_icache_all() after loading binaries. Both the EFI sub-system and cmd/cache.c provide a weak invalidate_icache_all() function. Remove the EFI instance. For ARM11 functional implementation of invalidate_icache_all is missing. Add it. Heinrich Schuchardt (3): cmd: avoid duplicate weak flush_dcache_all() arm: implement invalidate_icache_all on ARM11 efi_loader: avoid duplicate weak invalidate_icache_all() arch/arm/cpu/arm11/cpu.c | 12 ++++++++++++ cmd/cache.c | 3 +++ lib/efi_loader/efi_image_loader.c | 13 +++++++------ lib/efi_loader/efi_runtime.c | 7 ++++++- 4 files changed, 28 insertions(+), 7 deletions(-)