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 C14FFC05027 for ; Wed, 8 Feb 2023 14:55:26 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B2C1885232; Wed, 8 Feb 2023 15:55:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="Mvtsu1dD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4728A85EB2; Wed, 8 Feb 2023 15:55:23 +0100 (CET) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (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 773CE85232 for ; Wed, 8 Feb 2023 15:55:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x829.google.com with SMTP id 5so11008048qtp.9 for ; Wed, 08 Feb 2023 06:55:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ptMcI3gZ9gashexhCjvbkY+SrNOC4nT6Fez2PE7u5WQ=; b=Mvtsu1dD8CsEkb3Uo3CGcmkMBZC1CPcOYsTy5ZUl7nq9A74D9NqnprQUBSmtSXKPqT A5aQFwHkArw9ghs1fGfei/4TyILRe8OxTCiObzS5UJfDQ3DKAgFy9rG0AIohM4/gmT+H VUJ3VbwFOGh9fEBmep8Q/uZRoDLhGeLAHHcrI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ptMcI3gZ9gashexhCjvbkY+SrNOC4nT6Fez2PE7u5WQ=; b=zbIOCDFhU65sme53zSk5A70dS3NvUsAvXREbN1vTKIs4g8WevPc2687frGlbxahOwU PojBqYnRbGVtsgN1Xs0lVftcqjuGfFfH9KZfLPxF7qW0UKHXTwErzDgmp24ftyRsnhUM Vu/slzhDnCSnL70BPKGm5CCvsE+YPebZbsjh9BMVRd/lRo6K6P8dPVfDCHeVRGpWSWvH F55Q4Zqtjt7FDs+dK2syKTANzzyTblb4KiN4P6OLUrVRwPg+mdxB3W1wiwQOJqne5uJO mgbenxuxOn96Y+5wjU6xn6M7d/lS0SwTxx+ZcMXKLfLmt7G+/3QYVZFC4l8kUFCOE08o y+rQ== X-Gm-Message-State: AO0yUKU6e58phc6I3S6H5kVfc1P8887zbndoddiuz5WiYS27uPVNbQiv 5k0Ce6StZobGOLjSpZvCMBb4CA== X-Google-Smtp-Source: AK7set/yr7d4peAON4aYbZL4B+SrcvfHx0Yx/j4T1LyQ3mxgC3ENzVTOdG40y9F4Ngy2/LLX+lLuyA== X-Received: by 2002:a05:622a:1b8c:b0:3bb:75f1:85d8 with SMTP id bp12-20020a05622a1b8c00b003bb75f185d8mr4951166qtb.55.1675868119270; Wed, 08 Feb 2023 06:55:19 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-90cc-7e59-435b-3104.res6.spectrum.com. [2603:6081:7b00:6400:90cc:7e59:435b:3104]) by smtp.gmail.com with ESMTPSA id i9-20020a05620a0a0900b0071d0f1d01easm11530214qka.57.2023.02.08.06.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 06:55:18 -0800 (PST) Date: Wed, 8 Feb 2023 09:55:16 -0500 From: Tom Rini To: Sjoerd Simons Cc: u-boot@lists.denx.de, Ashok Reddy Soma , Heinrich Schuchardt , Michal Simek , Patrice Chotard Subject: Re: [PATCH 3/3] lmb: Treat a region which is a subset as equal Message-ID: References: <20230119083820.2656710-1-sjoerd@collabora.com> <20230119083820.2656710-4-sjoerd@collabora.com> <0493bcdc4a936b69619a635f84b202215ed55d59.camel@collabora.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7WTviAZkczL7fSrj" Content-Disposition: inline In-Reply-To: <0493bcdc4a936b69619a635f84b202215ed55d59.camel@collabora.com> X-Clacks-Overhead: GNU Terry Pratchett 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 --7WTviAZkczL7fSrj Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 08, 2023 at 08:37:15AM +0100, Sjoerd Simons wrote: > On Mon, 2023-02-06 at 13:04 -0500, Tom Rini wrote: > > On Thu, Jan 19, 2023 at 09:38:19AM +0100, Sjoerd Simons wrote: > >=20 > > > In various cases logical memory blocks are coalesced; As a result > > > doing > > > a strict check whether memory blocks are the same doesn't > > > necessarily > > > work as a previous addition of a given block might have been merged > > > into > > > a bigger block. > > >=20 > > > Fix this by considering a block is already registered if it's a > > > pure > > > subset of one of the existing blocks. > > >=20 > > > Signed-off-by: Sjoerd Simons > > > --- > > >=20 > > > =A0lib/lmb.c | 2 +- > > > =A01 file changed, 1 insertion(+), 1 deletion(-) > > >=20 > > > diff --git a/lib/lmb.c b/lib/lmb.c > > > index f447c639a60..b09a043f4c2 100644 > > > --- a/lib/lmb.c > > > +++ b/lib/lmb.c > > > @@ -248,7 +248,7 @@ static long lmb_add_region_flags(struct > > > lmb_region *rgn, phys_addr_t base, > > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0phys_size_t rgnsize = =3D rgn->region[i].size; > > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0phys_size_t rgnflags = =3D rgn->region[i].flags; > > > =A0 > > > -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (rgnbase =3D=3D base= && rgnsize =3D=3D size) { > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0if (rgnbase <=3D base &= & rgnbase + rgnsize >=3D base + > > > size) { > > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0if (flags =3D=3D rgnflags) > > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0/* Already have this region, so > > > we're done */ > > > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0return 0; > >=20 > > This breaks lib_test_lmb_simple, lib_test_lmb_simple_x2 and > > lib_test_lmb_alloc_addr. >=20 > Oh sorry for missing that; I'll get those fixed. Does the direction at > least seem sensible to you ? I think so, yes. --=20 Tom --7WTviAZkczL7fSrj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmPjt9QACgkQFHw5/5Y0 tywQ6wv+JWllLGzOpK5/iZQW7GaykRSTI4mF4tUVwWFjvjrBsoAAmJvi93RsFaYw /fH3oQS+EuGzyYuvrxhHzPjGEIomRd9iZjye1Ml6vs3LkomlKanUFFI8WhLeGxuy VE6HfpM3tdStjTR3fMUqwz+qZtp3FG7YTYlIUh/pDado2FY49mJ/grIcCQLg4C2P 2S/M9pDQS3GzW7aa8SYgzVEI1er/b9xIXeBKO9DW1BjpdJvd5FMQ1VIQMgB47QLH BhQUsSdLY/N7clg2ubmb3l1OfGTzDGn4Za1yLzL8y6Efa/PN3I/jLgxBB57Gnb4d SdNAfkdojPqwwytCO22/kHrvBUk6wS01n9ZVFZQSJzsQ+AEW7fWh5AQt6Ul/Y+J8 wJcycHq5DoLDnjedfHEbPpNHTa+nSUzbyuNgJ+WPiae/dm30//BtN7OHXU7/fmUN DFlCJM0CENTdrWctI8T0lqgTmbQSYo3+wGpn1dxzxkiVURTLVeOzolxo8jlGC7e5 ySs6Dz01 =bQl1 -----END PGP SIGNATURE----- --7WTviAZkczL7fSrj--