Revert "of: reserved-memory: Fix using wrong number of cells to get property 'alignment'"
This reverts commit bcf0fb1a4600bae55f4b8417e12fac404ddc5e3c due to breaking parsing of reserved memory with the `alignment` property when reserved memory defines the `alignment` property with `#address-cells != #size-cells`. RobH plans to revert this change as well [1]. Let's preemptively revert this in GKI to not break any downstream devices in the meantime. [1] https://lore.kernel.org/lkml/20250226194505.GA3407277-robh@kernel.org/ Bug: 399400888 Signed-off-by: Will McVicker <willmcvicker@google.com> Change-Id: I276e47a7f133f9d4196d853801581b5dec809b99
This commit is contained in:
committed by
William McVicker
parent
12735c93b9
commit
17322ee4f9
@@ -360,12 +360,12 @@ static int __init __reserved_mem_alloc_size(unsigned long node, const char *unam
|
||||
|
||||
prop = of_get_flat_dt_prop(node, "alignment", &len);
|
||||
if (prop) {
|
||||
if (len != dt_root_size_cells * sizeof(__be32)) {
|
||||
if (len != dt_root_addr_cells * sizeof(__be32)) {
|
||||
pr_err("invalid alignment property in '%s' node.\n",
|
||||
uname);
|
||||
return -EINVAL;
|
||||
}
|
||||
align = dt_mem_next_cell(dt_root_size_cells, &prop);
|
||||
align = dt_mem_next_cell(dt_root_addr_cells, &prop);
|
||||
}
|
||||
|
||||
nomap = of_get_flat_dt_prop(node, "no-map", NULL) != NULL;
|
||||
|
||||
Reference in New Issue
Block a user