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 EB39AC3DA7A for ; Thu, 5 Jan 2023 14:51:15 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 55826855B3; Thu, 5 Jan 2023 15:51:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1672930273; bh=/KCS/HHilS8xqDlNaidjuTiF/A4a1HascV4VFQAEG5M=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=dYc5WRpgJOiDBynQZbRYFLTS0vYeBu2FwwPigczsfh5IiLc6D3rRtVCAkYOpLdWD6 8yp1vsjY/vpEB4w/Pv9C99ZumrJ6wBSTOR9w6jTpbKYdsSw/muG6fK9Oe8Wx1ntdi0 i3ysFxTVrUt32tfHLtN/0CKm5RW/ppOCeGpSb1Fc2wU8LjtHTkG0WbE1JpX28hQ8dQ B0dhV3MJLymbYHzNgUnuKMpvo1sQYNtaHrtFDgcgSX1rbtrMidTEAhKWB/sP55hly/ OkTIzsaRi3dNZZoO2Pxg2/E7lpYiR4exz6VagpQ3LIOlPws8UmmuGMlcMrik/id3GP U90jLKbchXALg== Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 4CF5E855A8; Thu, 5 Jan 2023 15:51:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1672930271; bh=/KCS/HHilS8xqDlNaidjuTiF/A4a1HascV4VFQAEG5M=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Sb+lLl5yZaaTODqgFDM6YIV1/0aNdGBaA33R/0SCYPuFlTDcxtk45wadMfj+CI2cj NWGXEyq2CQZmavXOA3sxkH/ZaBOX3APs5F3zN/txxb3erUI+uKJGI4/rrdwOwAbY4j ggUbNjOgsgD/J+qwa92DQdrTti8ZQpsu88yA6rvNnn4BNK+M5jt/zPoKb43KNMf7+8 RuIiyGlDHhbAb4f7quueMEYOfQx1z+ncw61YFHg0HTMSSGKMENl5iqgmdFgG8s5oMh CavwIl8PUsPYwySlMQ5Bj/zxOuWObJJZUEJxJsAZQcNOfCH7oKih7gxZEUjMQ+tXVl 6h1tG7/uR7eKQ== Message-ID: Date: Thu, 5 Jan 2023 15:51:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v1] mtd: parsers: ofpart: Fix parsing when size-cells is 0 Content-Language: en-US To: Francesco Dolcini , Miquel Raynal Cc: 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 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> From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 1/5/23 13:47, Francesco Dolcini wrote: > Hello Miquel, Hi, [...] >> 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. > > Nice, good! Indeed >> 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) > > Fine, I can do it. > > However I am just not 100% sure about your proposal, I wonder if we > should just deprecate this function or we should fix it. I would say fix it. > 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. > >> 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? > Yes, I do agree. Same here, agreed, thanks. [...]