Commit 7de8f4aa authored by Rob Herring's avatar Rob Herring

x86: DT: use for_each_of_cpu_node iterator

Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This
has the side effect of defaulting to iterating using "cpu" node names in
preference to the deprecated (for FDT) device_type == "cpu".

Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 8cabf5bc
...@@ -140,7 +140,7 @@ static void __init dtb_cpu_setup(void) ...@@ -140,7 +140,7 @@ static void __init dtb_cpu_setup(void)
int ret; int ret;
version = GET_APIC_VERSION(apic_read(APIC_LVR)); version = GET_APIC_VERSION(apic_read(APIC_LVR));
for_each_node_by_type(dn, "cpu") { for_each_of_cpu_node(dn) {
ret = of_property_read_u32(dn, "reg", &apic_id); ret = of_property_read_u32(dn, "reg", &apic_id);
if (ret < 0) { if (ret < 0) {
pr_warn("%pOF: missing local APIC ID\n", dn); pr_warn("%pOF: missing local APIC ID\n", dn);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment