diff mbox series

[1/3] Bump LMB_MAX_REGIONS default to 16

Message ID 20230119083820.2656710-2-sjoerd@collabora.com
State Rejected
Delegated to: Tom Rini
Headers show
Series Fix boot regressions on at least TI am62x | expand

Commit Message

Sjoerd Simons Jan. 19, 2023, 8:38 a.m. UTC
Since commit 06d514d77c37 ("lmb: consider EFI memory map") the EFI regions
are also pushed into the lmb if EFI_LOADER is enabled (which is by
default on most system). Which can cause the number of entries to go
over the maximum as it's default is only 8.

Specifically i ran into this case on an TI am62 which has an fdt with
4 reserved regions (in practice 3 lmb entries due to adjecent ranges).

As this is likely to impact more devices bump the default max
regions to 16 so there is a bit more slack.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
---

 lib/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Jan. 26, 2023, 6:28 p.m. UTC | #1
On Thu, Jan 19, 2023 at 09:38:17AM +0100, Sjoerd Simons wrote:

> Since commit 06d514d77c37 ("lmb: consider EFI memory map") the EFI regions
> are also pushed into the lmb if EFI_LOADER is enabled (which is by
> default on most system). Which can cause the number of entries to go
> over the maximum as it's default is only 8.
> 
> Specifically i ran into this case on an TI am62 which has an fdt with
> 4 reserved regions (in practice 3 lmb entries due to adjecent ranges).
> 
> As this is likely to impact more devices bump the default max
> regions to 16 so there is a bit more slack.
> 
> Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>

I prefer to use:
https://patchwork.ozlabs.org/project/uboot/patch/20230125230823.1567778-1-trini@konsulko.com/
in this case due to it being overall a smaller size increase.
Sjoerd Simons Jan. 27, 2023, 7:55 a.m. UTC | #2
On Thu, 2023-01-26 at 13:28 -0500, Tom Rini wrote:
> On Thu, Jan 19, 2023 at 09:38:17AM +0100, Sjoerd Simons wrote:
> > 
> > As this is likely to impact more devices bump the default max
> > regions to 16 so there is a bit more slack.
> > 
> > Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
> 
> I prefer to use:
> https://patchwork.ozlabs.org/project/uboot/patch/20230125230823.1567778-1-trini@konsulko.com/
> in this case due to it being overall a smaller size increase.

That's fine by me, achieves the same goal i was after for sure; The
other 2 patches in this series are still required to fix the boot
regressions i'm seeing ofcourse :)
Tom Rini Jan. 27, 2023, 1:22 p.m. UTC | #3
On Fri, Jan 27, 2023 at 08:55:42AM +0100, Sjoerd Simons wrote:
> On Thu, 2023-01-26 at 13:28 -0500, Tom Rini wrote:
> > On Thu, Jan 19, 2023 at 09:38:17AM +0100, Sjoerd Simons wrote:
> > > 
> > > As this is likely to impact more devices bump the default max
> > > regions to 16 so there is a bit more slack.
> > > 
> > > Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
> > 
> > I prefer to use:
> > https://patchwork.ozlabs.org/project/uboot/patch/20230125230823.1567778-1-trini@konsulko.com/
> > in this case due to it being overall a smaller size increase.
> 
> That's fine by me, achieves the same goal i was after for sure; The
> other 2 patches in this series are still required to fix the boot
> regressions i'm seeing ofcourse :)

Right, I'll be getting those soon.
Tom Rini Feb. 8, 2023, 8 p.m. UTC | #4
On Thu, Jan 19, 2023 at 09:38:17AM +0100, Sjoerd Simons wrote:

> Since commit 06d514d77c37 ("lmb: consider EFI memory map") the EFI regions
> are also pushed into the lmb if EFI_LOADER is enabled (which is by
> default on most system). Which can cause the number of entries to go
> over the maximum as it's default is only 8.
> 
> Specifically i ran into this case on an TI am62 which has an fdt with
> 4 reserved regions (in practice 3 lmb entries due to adjecent ranges).
> 
> As this is likely to impact more devices bump the default max
> regions to 16 so there is a bit more slack.
> 
> Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>

As Philippe Schenker explained, I was mis-interpreting what my attempted
solution would do, so I've reverted that and this patch here makes the
most sense to use as a general fix. As such I've now applied this to
u-boot/master.
diff mbox series

Patch

diff --git a/lib/Kconfig b/lib/Kconfig
index def36f275ce..7eb0e7addc7 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -1005,7 +1005,7 @@  config LMB_USE_MAX_REGIONS
 config LMB_MAX_REGIONS
 	int "Number of memory and reserved regions in lmb lib"
 	depends on LMB && LMB_USE_MAX_REGIONS
-	default 8
+	default 16
 	help
 	  Define the number of supported regions, memory and reserved, in the
 	  library logical memory blocks.