On some board CPU IDs are not contiguous (for instance the Versatile Express
with big.LITTLE supports). If the CPU ID is greater than NR_CPUS Xen will hang
without any message. This is because console driver is not yet initialized and
hypervisor data abort uses printk.
For the moment check the CPU ID and print an warning if an error occured.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
cpuid = dt_read_number((const __be32 *)prop->data, 1);
+ /* TODO: handle non-contiguous CPU ID */
+ if ( cpuid >= NR_CPUS )
+ {
+ dt_printk("fdt: node `%s': reg(0x%x) >= NR_CPUS(%d)\n",
+ name, cpuid, NR_CPUS);
+ return;
+ }
cpumask_set_cpu(cpuid, &cpu_possible_map);
}