Skip to content

Commit b261dba

Browse files
geerturobherring
authored andcommitted
arm64: kdump: Remove custom linux,usable-memory-range handling
Remove the architecture-specific code for handling the "linux,usable-memory-range" property under the "/chosen" node in DT, as the platform-agnostic FDT core code already takes care of this. Signed-off-by: Geert Uytterhoeven <[email protected]> Acked-by: Catalin Marinas <[email protected]> Signed-off-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/7356c531c49a24b4a55577bf8e46d93f4d8ae460.1628670468.git.geert+renesas@glider.be
1 parent 57beb9b commit b261dba

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

arch/arm64/mm/init.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -197,45 +197,10 @@ static int __init early_mem(char *p)
197197
}
198198
early_param("mem", early_mem);
199199

200-
static int __init early_init_dt_scan_usablemem(unsigned long node,
201-
const char *uname, int depth, void *data)
202-
{
203-
struct memblock_region *usablemem = data;
204-
const __be32 *reg;
205-
int len;
206-
207-
if (depth != 1 || strcmp(uname, "chosen") != 0)
208-
return 0;
209-
210-
reg = of_get_flat_dt_prop(node, "linux,usable-memory-range", &len);
211-
if (!reg || (len < (dt_root_addr_cells + dt_root_size_cells)))
212-
return 1;
213-
214-
usablemem->base = dt_mem_next_cell(dt_root_addr_cells, &reg);
215-
usablemem->size = dt_mem_next_cell(dt_root_size_cells, &reg);
216-
217-
return 1;
218-
}
219-
220-
static void __init fdt_enforce_memory_region(void)
221-
{
222-
struct memblock_region reg = {
223-
.size = 0,
224-
};
225-
226-
of_scan_flat_dt(early_init_dt_scan_usablemem, &reg);
227-
228-
if (reg.size)
229-
memblock_cap_memory_range(reg.base, reg.size);
230-
}
231-
232200
void __init arm64_memblock_init(void)
233201
{
234202
const s64 linear_region_size = PAGE_END - _PAGE_OFFSET(vabits_actual);
235203

236-
/* Handle linux,usable-memory-range property */
237-
fdt_enforce_memory_region();
238-
239204
/* Remove memory above our supported physical address size */
240205
memblock_remove(1ULL << PHYS_MASK_SHIFT, ULLONG_MAX);
241206

0 commit comments

Comments
 (0)