From patchwork Wed Apr 23 11:31:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 883598 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp2868615wrs; Wed, 23 Apr 2025 04:31:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV2jKpQmeuVCYKeaiI/vqhC4VmTvWgZFyPksgKL4w+teQnJdWs7f7UU3hPPwMU4vHSOxCL77A==@linaro.org X-Google-Smtp-Source: AGHT+IGp7wgrqqdeSm9mGr24LYvfpsJZ2uZAXA/17RdqYUs2W/4mHrIVlbz3i3hbbPXILOTomiOY X-Received: by 2002:a5d:64e3:0:b0:391:319c:1950 with SMTP id ffacd0b85a97d-39efba2bea4mr14916952f8f.8.1745407911105; Wed, 23 Apr 2025 04:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745407911; cv=none; d=google.com; s=arc-20240605; b=Yw5YUZJfsbAc05Og+uaK6qTnNzjU4LcBnxnzbqmdY1jgH2WSK2QGwUmt9rgIjszM/M /wvawc98fysyvu1LEWSrA7AngR/alPLQMMvLhs7UoT0WwsuWM1OQkn1UUp+6aQ1uCfNz AEcJk696Z5/U/YPWM11aIEO2CPbDQwvY54XaH7HYjjnbtCbfZQc1YtBr5tBhmAVclHGU lAga/dh2WgYHhREFkW23c+crbS9hPtjhAI+SyLFsXAICjSjEv/MCbg2D+oJ8nO37gkPO EDr5cefMwqOSoR1PNCWO+6nYEeAhVF7EWlS2ZMTnd9NTMHKEbhc6GW8aSUGzrOetTGFS FvaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=de9Kh6F1x6HC6zXrcViNzSagMmN9OE3EPemh3hOAxJw=; fh=08JUTgpa0A/sy1wetcwWnr/J8MBB06B4A0KCtdMGJ54=; b=lyltdGn0j9uuxNG0Y1f1Zim1AboaZUhRv54ntFxZhwRNCPs3d53ak/gvkLFu8JbkbL 0ZcKbrUPZAAzxRSoBill3y3dXquXO6Ezmaq4maV4d+mIBJgSIipaKQ/LLBVwE8xgYf54 oB/pyKjhXjFtzRaalkM+Pe9bIRosgMvBIEs1/nubK4EXubeC+8TEUqIobUdK9HQJ2or2 tjLiddOUSbh5Js81bk5aDYcjzKDc2w1gHUi9xzCZD7XXutevHALZZKNTeQPLzSNseeLa /Oio9GRaWgHhJ9YAAV6Mik29Pqi4PuLJ2Vb9Xxz7By5yeLvb9yCfwG0D3TDR4YSwrYUt BQow==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id 5b1f17b1804b1-44092d4039fsi10532555e9.190.2025.04.23.04.31.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 04:31:51 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 CD2CB80BA8; Wed, 23 Apr 2025 13:31:49 +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 5B34380BA8; Wed, 23 Apr 2025 13:31:49 +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_DNSWL_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE,SPF_SOFTFAIL 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 46710809A5 for ; Wed, 23 Apr 2025 13:31:47 +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 DEF771063; Wed, 23 Apr 2025 04:31:41 -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 351AF3F66E; Wed, 23 Apr 2025 04:31:44 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Tom Rini , Sughosh Ganu Subject: [PATCH] lmb: use a different bit position for LMB_NOMAP Date: Wed, 23 Apr 2025 17:01:23 +0530 Message-Id: <20250423113123.888700-1-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 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 The LMB memory region attributes flags are used to specify the behaviour of the memory regions with respect to allocations -- for e.g. it is allowed to re-allocate a memory region already reserved with the LMB_NONE flag. The flags use values with different bit positions through the BIT() macro. Move the LMB_NOMAP value to bit position 1, and also move the other flags accordingly. Using bit position 0 for LMB_NOMAP results in the logic in lmb_print_region_flags() to break, which prints an incorrect value for the regions with LMB_NOMAP atribute. Fixes: 3d56c06551d ("lmb: Move enum lmb_flags to a u32") Signed-off-by: Sughosh Ganu --- include/lmb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index 0d316c64c0a..606a92cca48 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -27,9 +27,9 @@ * %LMB_NONOTIFY: Do not notify other modules of changes to this memory region */ #define LMB_NONE 0 -#define LMB_NOMAP BIT(0) -#define LMB_NOOVERWRITE BIT(1) -#define LMB_NONOTIFY BIT(2) +#define LMB_NOMAP BIT(1) +#define LMB_NOOVERWRITE BIT(2) +#define LMB_NONOTIFY BIT(3) /** * enum lmb_map_op - memory map operation