提交 da653130 编写于 作者: M Michael Ellerman 提交者: Rob Herring

of/fdt: Remove PPC32 longtrail hack in memory scan

When the OF code was originally made common by Grant in commit
51975db0 ("of/flattree: merge early_init_dt_scan_memory() common
code") (Feb 2010), the common code inherited a hack to handle
PPC "longtrail" machines, which had a "memory@0" node with no
device_type.

That check was then made to only apply to PPC32 in b44aa25d ("of:
Handle memory@0 node on PPC32 only") (May 2014).

But according to Paul Mackerras the "longtrail" machines are long
dead, if they were ever seen in the wild at all. If someone does still
have one, we can handle this firmware wart in powerpc platform code.

So remove the hack once and for all.
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: NRob Herring <robh@kernel.org>
上级 791d3ef2
...@@ -1034,14 +1034,7 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname, ...@@ -1034,14 +1034,7 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
bool hotpluggable; bool hotpluggable;
/* We are scanning "memory" nodes only */ /* We are scanning "memory" nodes only */
if (type == NULL) { if (type == NULL || strcmp(type, "memory") != 0)
/*
* The longtrail doesn't have a device_type on the
* /memory node, so look for the node called /memory@0.
*/
if (!IS_ENABLED(CONFIG_PPC32) || depth != 1 || strcmp(uname, "memory@0") != 0)
return 0;
} else if (strcmp(type, "memory") != 0)
return 0; return 0;
reg = of_get_flat_dt_prop(node, "linux,usable-memory", &l); reg = of_get_flat_dt_prop(node, "linux,usable-memory", &l);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册