diff options
author | Miao Yan <yanmiaobest@gmail.com> | 2016-01-07 09:32:04 (GMT) |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2016-01-13 04:20:16 (GMT) |
commit | de752c5e73d8fa02a3cc585ca346dae0be86c14d (patch) | |
tree | 662e5f568a281eeac201be2ebe92213f210397a6 /arch/x86/cpu/qemu | |
parent | b28cecdfb8976a88d208879df0aff1ca69c07de5 (diff) | |
download | u-boot-de752c5e73d8fa02a3cc585ca346dae0be86c14d.tar.xz |
x86: qemu: fix cpu device in smp boot
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@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/qemu')
-rw-r--r-- | arch/x86/cpu/qemu/cpu.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/arch/x86/cpu/qemu/cpu.c b/arch/x86/cpu/qemu/cpu.c index a4bf53d..a1b70c6 100644 --- a/arch/x86/cpu/qemu/cpu.c +++ b/arch/x86/cpu/qemu/cpu.c @@ -13,16 +13,6 @@ DECLARE_GLOBAL_DATA_PTR; -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; -} - int cpu_qemu_get_desc(struct udevice *dev, char *buf, int size) { if (size < CPU_MAX_NAME_LEN) @@ -52,6 +42,5 @@ U_BOOT_DRIVER(cpu_qemu_drv) = { .name = "cpu_qemu", .id = UCLASS_CPU, .of_match = cpu_qemu_ids, - .bind = cpu_qemu_bind, .ops = &cpu_qemu_ops, }; |