Skip to content

Commit 6c55121

Browse files
author
CKI KWF Bot
committed
Merge: of: reserved_mem: Restructure how the reserved memory regions are processed
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1688 # Merge Request Required Information ## Summary of Changes This MR backports a number of upstream commits to the OpenFirmware reserved memory handling code to remove the hard limits of 64 regions that we've hit on some ARM SoCs, for example the Qualcomm 8775. ## Approved Development Ticket(s) JIRA: https://issues.redhat.com/browse/RHEL-125402 Signed-off-by: Maxime Ripard <mripard@redhat.com> Approved-by: Jerry Snitselaar <jsnitsel@redhat.com> Approved-by: Eric Chanudet <echanude@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 8adacbc + d9ba885 commit 6c55121

File tree

7 files changed

+317
-71
lines changed

7 files changed

+317
-71
lines changed

drivers/of/fdt.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,6 @@ void __init early_init_fdt_scan_reserved_mem(void)
511511
break;
512512
memblock_reserve(base, size);
513513
}
514-
515-
fdt_init_reserved_mem();
516514
}
517515

518516
/**
@@ -1212,6 +1210,9 @@ void __init unflatten_device_tree(void)
12121210
{
12131211
void *fdt = initial_boot_params;
12141212

1213+
/* Save the statically-placed regions in the reserved_mem array */
1214+
fdt_scan_reserved_mem_reg_nodes();
1215+
12151216
/* Don't use the bootloader provided DTB if ACPI is enabled */
12161217
if (!acpi_disabled)
12171218
fdt = NULL;

drivers/of/of_private.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#define FDT_ALIGN_SIZE 8
12+
#define MAX_RESERVED_REGIONS 64
1213

1314
/**
1415
* struct alias_prop - Alias property in 'aliases' node
@@ -183,7 +184,7 @@ static inline struct device_node *__of_get_dma_parent(const struct device_node *
183184
#endif
184185

185186
int fdt_scan_reserved_mem(void);
186-
void fdt_init_reserved_mem(void);
187+
void __init fdt_scan_reserved_mem_reg_nodes(void);
187188

188189
bool of_fdt_device_is_available(const void *blob, unsigned long node);
189190

0 commit comments

Comments
 (0)