From patchwork Mon Aug 26 11:59:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 822448 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp1477467wrh; Mon, 26 Aug 2024 05:02:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWVXPm4Wuk6dmjWfEQMgo+s5v4OotSVT3w80nTaJCZbuYurAxJSrBaEFK/mPwssx08ytyhmrw==@linaro.org X-Google-Smtp-Source: AGHT+IEHEBTn48OWPK4y4Y2fyQKhlRH5SaC3pUUHokCH/DL0B4q54mKeskW/NCBIwvd6QTkj2ndb X-Received: by 2002:a05:600c:3595:b0:426:6876:83bb with SMTP id 5b1f17b1804b1-42acd57a107mr64665525e9.17.1724673752945; Mon, 26 Aug 2024 05:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724673752; cv=none; d=google.com; s=arc-20160816; b=X7MYce9B0o7gr+k1crmFGpzAm3C2/eMcHsfHwOOx//9yCz93lMtC0C0328pgiic9H/ P3swjzRpvZR1ludDTtUqB+q3dqB9Fymr8sM+MhegeS0G+o1OYoTfSnCuDm5kUIKLU1Z7 arJKGdWpYKGFIFJ8y+gykaq2YmwWM4IJqMuuNzNDF4BSZIhuKbeRP9Vrz9A+R+GLy3Q7 rW7N+DkxsQYLnwKAXV1LM425VlVD59Qnee6XZHkTSswrZFfat2EcFe9NUP/vizlPd7N3 fTgng4H2QfQKKSj3Ow1PLMk1BshENU7qI7PiuQ6yxCUIeVxIb/DnA0G9/vbePpgajPBT WtzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=/WXolYxYTbhGgQ/ev3VUk9qEMIsrgnRZkX7KuPw3ufQ=; fh=8IbOOFAUJYCfGYrzM0jWqtoOP7AaZuPOmdHZ5mvNk1Q=; b=C7vhMrz+GE96vkykR7b4OoFquaY0Zi6qpfirtrm2LwB055uAdKfiUxYr2GNDw76ORi Xi6Lo8aLaizydII5wDGX1Q+06T+Xq6lJqcBtA466Wo4pnbqeYN4l87bP7tFvfC42k0AW sX1tTUQARm3JldiO+RvtgF05RBujWUqOcFbiHy0XI7cpVJ+OZWRdF7+U0m0R6N5CttOw CqQrWLjAwT6e1IUwx6WdBT1FSq9SIiFfOhFFPIji/8NH9Rwmzk7A4Uy9s30PoRFefzeK 1tM+XXsSiss0t/gGe5t2K0RD9RPLr2+XvcLNnG6/HYRdg1N9Jn6ipXwx6Re2U5XtHtP5 pNCA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-37308200522si3958584f8f.421.2024.08.26.05.02.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 05:02:32 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E318C8806A; Mon, 26 Aug 2024 14:01:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 1582F8806A; Mon, 26 Aug 2024 14:01:08 +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=-1.2 required=5.0 tests=BAYES_00, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 1AF2988AFB for ; Mon, 26 Aug 2024 14:01:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BAC1ADA7; Mon, 26 Aug 2024 05:01:31 -0700 (PDT) Received: from a079122.blr.arm.com (a079122.arm.com [10.162.17.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D773B3F762; Mon, 26 Aug 2024 05:01:01 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Heinrich Schuchardt , Marek Vasut , Mark Kettenis , Michal Simek , Patrick DELAUNAY , Patrice CHOTARD , =?utf-8?q?Marek_Beh=C3=BAn?= , Sughosh Ganu Subject: [PATCH v4 14/27] lmb: bootm: remove superfluous lmb stub functions Date: Mon, 26 Aug 2024 17:29:27 +0530 Message-Id: <20240826115940.3233167-15-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240826115940.3233167-1-sughosh.ganu@linaro.org> References: <20240826115940.3233167-1-sughosh.ganu@linaro.org> 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 Remove a couple of superfluous LMB stub functions, and instead put a check for calling the lmb_reserve() function. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass Reviewed-by: Ilias Apalodimas --- Changes since V3: None boot/bootm.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/boot/bootm.c b/boot/bootm.c index ddede08979..a61bbcfb45 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -239,11 +239,6 @@ static int boot_get_kernel(const char *addr_fit, struct bootm_headers *images, return 0; } -#if !CONFIG_IS_ENABLED(LMB) -#define lmb_reserve(base, size) -static inline void boot_start_lmb(void) { } -#endif - static int bootm_start(void) { memset((void *)&images, 0, sizeof(images)); @@ -700,7 +695,9 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress) images->os.end = relocated_addr + image_size; } - lmb_reserve(images->os.load, (load_end - images->os.load)); + if (CONFIG_IS_ENABLED(LMB)) + lmb_reserve(images->os.load, (load_end - images->os.load)); + return 0; }