[U-Boot] [PATCH v5 6/8] x86: qemu: fix cpu device in smp boot
Bin Meng
bmeng.cn at gmail.com
Thu Jan 7 08:36:02 CET 2016
On Mon, Jan 4, 2016 at 4:00 PM, Miao Yan <yanmiaobest at 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 <yanmiaobest at 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.cn at gmail.com>
Tested-by: Bin Meng <bmeng.cn at gmail.com>
More information about the U-Boot
mailing list