mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
of: reserved_mem: clarify fdt_scan_reserved_mem*() functions
Rename fdt_scan_reserved_mem_reg_nodes() to fdt_scan_reserved_mem_late() to clearly show how it differs from fdt_scan_reserved_mem() and update description of both functions. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://patch.msgid.link/20260325090023.3175348-7-m.szyprowski@samsung.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
This commit is contained in:
committed by
Rob Herring (Arm)
parent
427864f793
commit
bf66171579
@@ -1274,7 +1274,7 @@ void __init unflatten_device_tree(void)
|
||||
void *fdt = initial_boot_params;
|
||||
|
||||
/* Save the statically-placed regions in the reserved_mem array */
|
||||
fdt_scan_reserved_mem_reg_nodes();
|
||||
fdt_scan_reserved_mem_late();
|
||||
|
||||
/* Populate an empty root node when bootloader doesn't provide one */
|
||||
if (!fdt) {
|
||||
|
||||
@@ -186,7 +186,7 @@ static inline struct device_node *__of_get_dma_parent(const struct device_node *
|
||||
#endif
|
||||
|
||||
int fdt_scan_reserved_mem(void);
|
||||
void __init fdt_scan_reserved_mem_reg_nodes(void);
|
||||
void __init fdt_scan_reserved_mem_late(void);
|
||||
|
||||
bool of_fdt_device_is_available(const void *blob, unsigned long node);
|
||||
|
||||
|
||||
@@ -265,16 +265,15 @@ static void __init __rmem_check_for_overlap(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* fdt_scan_reserved_mem_reg_nodes() - Store info for the "reg" defined
|
||||
* reserved memory regions.
|
||||
* fdt_scan_reserved_mem_late() - Scan FDT and initialize remaining reserved
|
||||
* memory regions.
|
||||
*
|
||||
* This function is used to scan through the DT and store the
|
||||
* information for the reserved memory regions that are defined using
|
||||
* the "reg" property. The region node number, name, base address, and
|
||||
* size are all stored in the reserved_mem array by calling the
|
||||
* fdt_reserved_mem_save_node() function.
|
||||
* This function is used to scan again through the DT and initialize the
|
||||
* "static" reserved memory regions, that are defined using the "reg"
|
||||
* property. Each such region is then initialized with its specific init
|
||||
* function and stored in the global reserved_mem array.
|
||||
*/
|
||||
void __init fdt_scan_reserved_mem_reg_nodes(void)
|
||||
void __init fdt_scan_reserved_mem_late(void)
|
||||
{
|
||||
const void *fdt = initial_boot_params;
|
||||
phys_addr_t base, size;
|
||||
@@ -328,7 +327,14 @@ void __init fdt_scan_reserved_mem_reg_nodes(void)
|
||||
static int __init __reserved_mem_alloc_size(unsigned long node, const char *uname);
|
||||
|
||||
/*
|
||||
* fdt_scan_reserved_mem() - scan a single FDT node for reserved memory
|
||||
* fdt_scan_reserved_mem() - reserve and allocate memory occupied by
|
||||
* reserved memory regions.
|
||||
*
|
||||
* This function is used to scan through the FDT and mark memory occupied
|
||||
* by all static (defined by the "reg" property) reserved memory regions.
|
||||
* Then memory for all dynamic regions (defined by size & alignment) is
|
||||
* allocated, a region specific init function is called and region information
|
||||
* is stored in the reserved_mem array.
|
||||
*/
|
||||
int __init fdt_scan_reserved_mem(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user