Skip to contentSkip to conversation

of: of_reserved_mem: Increase limit on number of reserved regions

PATCH Applied Isaac J. Manjarres 3 participants 3 messages Feb 24, 2020 – Feb 26, 2020 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: of_reserved_mem: Increase limit on number of reserved regions

From: Patrick Daly <[email protected]>

Certain SoCs need to support a large amount of reserved memory regions. For example, Qualcomm's SM8150 SoC requires that 20 regions of memory be reserved for a variety of reasons (e.g. loading a peripheral subsystem's firmware image into a particular space).

When adding more reserved memory regions to cater to different usecases, the remaining number of reserved memory regions--12 to be exact--becomes too small. Thus, double the existing limit of reserved memory regions.

---
 drivers/of/of_reserved_mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/of_reserved_mem.c +1 -1
index 6bd610e..1a84bc0 100644
@@ -22,7 +22,7 @@
 #include <linux/slab.h>
 #include <linux/memblock.h>
 
-#define MAX_RESERVED_REGIONS	32
+#define MAX_RESERVED_REGIONS	64
 static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS];
 static int reserved_mem_count;
 
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
maintainer Applied
#1 lore raw
Quoted 13 lines · Isaac J. Manjarres

From: Patrick Daly <[email protected]>

Certain SoCs need to support a large amount of reserved memory regions. For example, Qualcomm's SM8150 SoC requires that 20 regions of memory be reserved for a variety of reasons (e.g. loading a peripheral subsystem's firmware image into a particular space).

When adding more reserved memory regions to cater to different usecases, the remaining number of reserved memory regions--12 to be exact--becomes too small. Thus, double the existing limit of reserved memory regions.

Quoted 6 lines
---
 drivers/of/of_reserved_mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Rob

#2 lore raw
In reply to Isaac J. Manjarres

Hi Isaac,

Quoted 8 lines · Isaac J. Manjarres

From: Patrick Daly <[email protected]>

Certain SoCs need to support a large amount of reserved memory regions. For example, Qualcomm's SM8150 SoC requires that 20 regions of memory be reserved for a variety of reasons (e.g. loading a peripheral subsystem's firmware image into a particular space).

Quoted 7 lines

When adding more reserved memory regions to cater to different usecases, the remaining number of reserved memory regions--12 to be exact--becomes too small. Thus, double the existing limit of reserved memory regions.

Thanks for your patch!

drivers/of/of_reserved_mem.c line 27

Quoted 10 lines
drivers/of/of_reserved_mem.c +1 -1
@@ -22,7 +22,7 @@
 #include <linux/slab.h>
 #include <linux/memblock.h>
 
-#define MAX_RESERVED_REGIONS   32
+#define MAX_RESERVED_REGIONS   64
 static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS];
 static int reserved_mem_count;

This increases the size of reserved_mem[] by 896 (32-bit), 1280 (32-bit LPAE), or 1792 (64-bit) bytes. While some systems don't need reserved memory regions at all, and may be RAM-limited.

Perhaps this array can be replaced by some dynamically increasing structure?

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds