Skip to content

Commit 5b414ed

Browse files
robherringgregkh
authored andcommitted
Revert "of: reserved-memory: Fix using wrong number of cells to get property 'alignment'"
commit 75f1f31 upstream. This reverts commit 267b21d. Turns out some DTs do depend on this behavior. Specifically, a downstream Pixel 6 DT. Revert the change at least until we can decide if the DT spec can be changed instead. Cc: stable@vger.kernel.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 84fc361 commit 5b414ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/of/of_reserved_mem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,12 @@ static int __init __reserved_mem_alloc_size(unsigned long node, const char *unam
360360

361361
prop = of_get_flat_dt_prop(node, "alignment", &len);
362362
if (prop) {
363-
if (len != dt_root_size_cells * sizeof(__be32)) {
363+
if (len != dt_root_addr_cells * sizeof(__be32)) {
364364
pr_err("invalid alignment property in '%s' node.\n",
365365
uname);
366366
return -EINVAL;
367367
}
368-
align = dt_mem_next_cell(dt_root_size_cells, &prop);
368+
align = dt_mem_next_cell(dt_root_addr_cells, &prop);
369369
}
370370

371371
nomap = of_get_flat_dt_prop(node, "no-map", NULL) != NULL;

0 commit comments

Comments
 (0)