Skip to content

Commit 6487c15

Browse files
committed
of: Support matching cpu nodes with no 'reg' property
For some single core ARM systems, the DTs can have a single cpu node without a reg property and #address-cells == 0. This case is valid and should match on cpu #0. Cc: Frank Rowand <frowand.list@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
1 parent f1f207e commit 6487c15

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/of/base.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ static bool __of_find_n_match_cpu_property(struct device_node *cpun,
327327

328328
ac = of_n_addr_cells(cpun);
329329
cell = of_get_property(cpun, prop_name, &prop_len);
330+
if (!cell && !ac && arch_match_cpu_phys_id(cpu, 0))
331+
return true;
330332
if (!cell || !ac)
331333
return false;
332334
prop_len /= sizeof(*cell) * ac;

0 commit comments

Comments
 (0)