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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C8BB9C3DA7D for ; Thu, 5 Jan 2023 15:03:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 144F5855A6; Thu, 5 Jan 2023 16:03:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=bootlin.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=bootlin.com header.i=@bootlin.com header.b="jm8r0jcp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4C077855A6; Thu, 5 Jan 2023 16:03:13 +0100 (CET) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7D065855A3 for ; Thu, 5 Jan 2023 16:03:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=miquel.raynal@bootlin.com Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 7D41FC000E; Thu, 5 Jan 2023 15:03:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1672930989; 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=v/xznkGPQwTeG4bHpL4r891nCd3yrThL8ZKY9wDZ2Gg=; b=jm8r0jcpx9x34cK+o7W8v2T7DRCCDzjb5jqDjKb8cUdEuGXvxPCM2fjJ/QGGmXbrstl0t6 mIzIxPlje+6fAQ87uUcwvjLlwIEegJ3Wc8mY2yPkEDz9mEnO3xf14Cc47ewoGKpp/p/WJd JlrCIN3+y1UYHo87o0gYBpBV1TLXuKcohTuZW1s1V4gJpC3fCilyT0BBZfxz/fF0rvAU8Z 6UU7OUeq2UIb2SOi/z78UKCeeL7Tyel+QZnds+ZqLGr/EKGujWz8aW1plyRbuZUiu1rtgl u0VDRwAGexIMfJjrsp35JLs6RU0JtFyhvc8JQQg+hENz+1/PIISx4adctv1zPg== Date: Thu, 5 Jan 2023 16:03:05 +0100 From: Miquel Raynal To: Marek Vasut Cc: Francesco Dolcini , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, Francesco Dolcini , Shawn Guo , linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org, u-boot@lists.denx.de Subject: Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0 Message-ID: <20230105160305.5b08f3e1@xps-13> In-Reply-To: References: <6f5f5b32-d7fe-13cc-b52d-83a27bd9f53e@denx.de> <20221216120155.4b78e5cf@xps-13> <20221216143720.3c8923d8@xps-13> <20221216163501.1c2ace21@xps-13> <20230102104004.6abae6da@xps-13> <20230105123334.7f90c289@xps-13> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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.6 at phobos.denx.de X-Virus-Status: Clean marex@denx.de wrote on Thu, 5 Jan 2023 15:51:10 +0100: > On 1/5/23 13:47, Francesco Dolcini wrote: > > Hello Miquel, =20 >=20 > Hi, >=20 > [...] >=20 > >> Let's move forward with this. Let's assume my fears are baseless. We > >> might consider the situation where someone tries to hide the partitions > >> by setting #size-cell to 0 even wronger and too unlikely. Hopefully we > >> will not break any other existing setups by applying an always-on fix.= =20 > >=20 > > Nice, good! =20 >=20 > Indeed >=20 > >> I would still like to see U-Boot partitions handling evolve, at least: > >> - fix #size-cells in fdt_fixup_mtd() > >> - avoid the fdt_fixup_mtd() call from Collibri boards (ie. an example > >> that can be followed by the other users) =20 > >=20 > > Fine, I can do it. > >=20 > > However I am just not 100% sure about your proposal, I wonder if we > > should just deprecate this function or we should fix it. =20 >=20 > I would say fix it. Well, I think these are two orthogonal changes. The function should be deprecated *and* fixed for the existing users? > > The exact end result will depend on the discussion with the U-Boot > > folks, but I absolutely agree that the current situation needs to > > change. I'll keep you in CC on those patches. > > =20 > >> On Linux side let's fix #size-cells like you proposed without filtering > >> against a list of compatibles. We however need to improve the > >> heuristics: > >> - Do it only when there are partitions declared within a NAND > >> controller node. > >> - Change the warning to avoid mentioning backward compatibility, just > >> mention this is utterly wrong and thus the value will be set to 1 > >> instead of 0. > >> - Mention in the comment above this only works on systems with <4GiB > >> chips. > >> If you think about other conditions please feel free to add them. > >> > >> Do you concur? =20 > > Yes, I do agree. =20 >=20 > Same here, agreed, thanks. >=20 > [...] Thanks, Miqu=C3=A8l