From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DC073CA0ED3 for ; Mon, 2 Sep 2024 12:36:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pMNC5ty34RdhBKe6L7YDk14aHUvfdW1HM5AW82SYpmM=; b=rBwS7BlBmqINqeM1begwpNKCG8 HMalN5tMS2/shJeCCqeCoL9bXTZjayHCr39kmxY1LPerxNXTI6kZ7TBTSWVlH4WtdJ4ZyYL4jxUWs 2bW4WlewMjp+APfQBw3hpNumP5imPN6zETfEZyhHVDt3JyDL/Hcx4WdjvHceJft3ZUr66hbGmsvpd REE73sF0UClu3tSCw4ei+YEqwCjWnti2haEPbxHf/2Sng6YtL0QQzAmgangXZnSusuvi2SLMU/soS UQN7p1jN/cnZkrkZ32/mPiQnKt0HMn6UbiQ6EFC4YUKHGWzovj4eH3V4ITcXwFNE6yQj7TkqAL9P4 TD1gHd5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sl6IT-0000000EJjS-0S44; Mon, 02 Sep 2024 12:36:41 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sl6HY-0000000EJZu-1hYR for linux-arm-kernel@lists.infradead.org; Mon, 02 Sep 2024 12:35:46 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 5CD6E40004; Mon, 2 Sep 2024 12:35:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1725280537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pMNC5ty34RdhBKe6L7YDk14aHUvfdW1HM5AW82SYpmM=; b=ITMHhA41QC9ZzPAitSYJpYdeNW11GjAeu6eXHkdAp0SBbJBsHOuXR0WLK/7wI5FPzMmwe4 tAwx6FxuYhKdzUuIukW1TgBlhruk13xcuGLfk5kMbVxRoCDB8gaKfbbCrgviIVSBVBLqaD qN3NcDs4dmu0y4a9h6QWI+rz6lScOIlpECuiMUXuQuQUGNZM/ANcmDHDnk0Fm4hTZpftIM LxzAJfDjL9MiHZYZ3/4DZo+U7kUF+H1dEZQpN/euAC0LVj2vhHjXp2IjfQcNo7ZTk4LGN/ GXg0zq2D9L5+vUBdojpNM/NM3mesK3+jFJTUiNG2Ke9KclTich4HkzF5tIxv/A== From: Gregory CLEMENT To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Andrew Lunn , Sebastian Hesselbarth , Thomas Petazzoni Cc: linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2] ARM: mvebu: Warn about memory chunks too small for DDR training In-Reply-To: <20240712081302.901842-2-u.kleine-koenig@baylibre.com> References: <20240712081302.901842-2-u.kleine-koenig@baylibre.com> Date: Mon, 02 Sep 2024 14:35:35 +0200 Message-ID: <87seuifd2g.fsf@BLaptop.bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: gregory.clement@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240902_053544_599768_023D125F X-CRM114-Status: GOOD ( 18.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Uwe, > For each memory region the first 10K are reserved for DDR training. Emit > a warning if the area happens to be smaller than these 10K. This should > not happen, but if it does this message simplifies diagnosing the > problem. > > This fixes a W=3D1 compiler error: > > arch/arm/mach-mvebu/board-v7.c: In function =E2=80=98mvebu_scan_mem=E2= =80=99: > arch/arm/mach-mvebu/board-v7.c:84:27: error: variable =E2=80=98size=E2= =80=99 set but not used [-Werror=3Dunused-but-set-variable] > 84 | u64 base, size; > | ^~~~ > > Signed-off-by: Uwe Kleine-K=C3=B6nig Applied on mvebu/arm Thanks, Gregory > --- > Hello, > > the (implicit) first iteration of this patch is available at > https://lore.kernel.org/linux-arm-kernel/20240708093145.1398949-2-u.klein= e-koenig@baylibre.com/ > > In this v2 the size variable is evaluated to emit a warning instead of > being dropped, which was done in v1. > > Best regards > Uwe > > arch/arm/mach-mvebu/board-v7.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v= 7.c > index fd5d0c8ff695..04ad651d13a0 100644 > --- a/arch/arm/mach-mvebu/board-v7.c > +++ b/arch/arm/mach-mvebu/board-v7.c > @@ -86,6 +86,9 @@ static int __init mvebu_scan_mem(unsigned long node, co= nst char *uname, > base =3D dt_mem_next_cell(dt_root_addr_cells, ®); > size =3D dt_mem_next_cell(dt_root_size_cells, ®); >=20=20 > + if (size < MVEBU_DDR_TRAINING_AREA_SZ) > + pr_warn("Too little memory to reserve for DDR training\n"); > + > memblock_reserve(base, MVEBU_DDR_TRAINING_AREA_SZ); > } >=20=20 > --=20 > 2.43.0