On Mon, Jan 4, 2016 at 4:00 PM, Miao Yan <yanmiaob...@gmail.com> wrote: > Currently, when booting with more that one CPU enabled, U-Boot scans > 'cpu' node in device tree and calculates CPU number. This does not scale > well as changing CPU number also requires modifying .dts and re-compiling > U-Boot. > > This patch uses fw_cfg interface provided by QEMU to detect online CPU > number at runtime, and dynamically adds 'cpu' device to U-Boot's driver > model. > > Signed-off-by: Miao Yan <yanmiaob...@gmail.com> > --- > arch/x86/cpu/mp_init.c | 73 > +++++++++++++++++++++++++++++++++++++++++++++++++ > arch/x86/cpu/qemu/cpu.c | 5 ---- > 2 files changed, 73 insertions(+), 5 deletions(-) >
[snip] > int cpu_qemu_bind(struct udevice *dev) > { > - struct cpu_platdata *plat = dev_get_parent_platdata(dev); > - > - plat->cpu_id = fdtdec_get_int(gd->fdt_blob, dev->of_offset, > - "intel,apic-id", -1); > - > return 0; > } Yep, this cpu_qemu_bind can be removed. > Reviewed-by: Bin Meng <bmeng...@gmail.com> Tested-by: Bin Meng <bmeng...@gmail.com> _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot