From patchwork Tue Mar 10 00:20:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1251889 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=RKKdX05t; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48bwk64QZQz9sRN for ; Tue, 10 Mar 2020 11:21:07 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2F8F6812B8; Tue, 10 Mar 2020 01:20:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="RKKdX05t"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4B215812D3; Tue, 10 Mar 2020 01:20:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1C85D8037A for ; Tue, 10 Mar 2020 01:20:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pg1-x542.google.com with SMTP id 37so1304761pgm.11 for ; Mon, 09 Mar 2020 17:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SzIcokjZLkUwGH9huozLbaRtg8lPCWdqPBsj2577tDk=; b=RKKdX05tJsjpQJ5a9wQuNQErxT++g25cyUOb9DqvLvfnrK1rqMfL+Js/h2U/YFe5NN zHYdTKujLxAfWQDugRZCBdPFmqvTMBJGsExt1EXDtULdsquixBtJhnUxRtRz9ygC0xIs Ip1iBof1TXSabNCNyIQq4rS/KMvFEhOPxW0b/PndSoWUeoopJVcpTeNrQzQgc1sxIaLk 4D2BS6AWz7bW5Oc5nOwMV9U1vC+iotMcVrRfo9ndREJm+x573ossG2c3AOuk0revzfJq +RhMbSRf56Jf+zLaJbmoucVB8C0BurTbHe6eAjOsVUeoD6r45J5b9e/XIquLuqGNi7yo JYKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SzIcokjZLkUwGH9huozLbaRtg8lPCWdqPBsj2577tDk=; b=QbZgu6zyLQplr5edJjcxe/t7+kPck9Fx5snfCAKJW7s62NkNi+F7R6jrRUSd97p45j htoNkLi7IY7ACWWy/PLf6Tx0fweTUPYXJVDfc6PQyTqh8Xa1ujIQtntXb77gZnkZFbCD L3ufsjhEaOVFIhN01jgqQx5fOrqTZGgf0ZYXswVtOS8Z8UOJRI3hPlJyGcxsUGmQekDp 4lpgtl/N5AclEq6ZeFcYOykVJPCPzp+TMSrqpf6YkZ+mcGKiWpfxivieLsC4aJZo9JpR KCCkSK4v1W31BEtoiId3YMoBUMVpmWA4rSh692Y7wlzFbARHmFuGJ2qr0bOKiHC/fAy7 8qGQ== X-Gm-Message-State: ANhLgQ3WmANdkFF8MvLiFpGVpbue1l6F0vMeXHFdDN+Z/baMdU4NNkC1 Q5g9lIQSj8C1CWLLbbLK5zyE8A== X-Google-Smtp-Source: ADFU+vuhHfqj0Kj9skgeXOmSgOyuigiR9Edi/14OlKs2gltJ8iyvR17YEyXgHjIWClOX5h1qx3enHw== X-Received: by 2002:a63:4912:: with SMTP id w18mr18134292pga.122.1583799617177; Mon, 09 Mar 2020 17:20:17 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id 199sm48954976pfv.81.2020.03.09.17.20.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Mar 2020 17:20:16 -0700 (PDT) From: AKASHI Takahiro To: trini@konsulko.com Cc: swarren@nvidia.com, u-boot@lists.denx.de Subject: [PATCH v2] Makefile: doesn't need check stack size when dtb is not built Date: Tue, 10 Mar 2020 09:20:43 +0900 Message-Id: <20200310002043.15523-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.102.2 at phobos.denx.de X-Virus-Status: Clean The commit 5fed97af20da ("Makefile: ensure DTB doesn't overflow into initial stack") adds an extra check for stack size in BSS if CONFIG_SYS_INIT_SP_BSS_OFFSET is enabled. This check, however, doesn't make sense under the configuration where control dtb won't be built in and it should be void in such cases. Signed-off-by: AKASHI Takahiro Fixes: 5fed97af20da ("Makefile: ensure DTB doesn't overflow into initial stack") Reviewed-by: Stephen Warren --- v2: * guard ALL-y += init_sp_bss_offset_check with simplified "if" condition --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0af89e0a7881..93931c3cb51b 100644 --- a/Makefile +++ b/Makefile @@ -903,7 +903,7 @@ ifneq ($(CONFIG_BUILD_TARGET),) ALL-y += $(CONFIG_BUILD_TARGET:"%"=%) endif -ifdef CONFIG_INIT_SP_RELATIVE +ifeq ($(CONFIG_INIT_SP_RELATIVE)$(CONFIG_OF_SEPARATE),yy) ALL-y += init_sp_bss_offset_check endif @@ -1208,7 +1208,7 @@ binary_size_check: u-boot-nodtb.bin FORCE fi \ fi -ifdef CONFIG_INIT_SP_RELATIVE +ifeq ($(CONFIG_INIT_SP_RELATIVE)$(CONFIG_OF_SEPARATE),yy) ifneq ($(CONFIG_SYS_MALLOC_F_LEN),) subtract_sys_malloc_f_len = space=$$(($${space} - $(CONFIG_SYS_MALLOC_F_LEN))) else