]> git.dujemihanovic.xyz Git - u-boot.git/commit
x86: qemu: fix cpu device in smp boot
authorMiao Yan <yanmiaobest@gmail.com>
Thu, 7 Jan 2016 09:32:04 +0000 (01:32 -0800)
committerBin Meng <bmeng.cn@gmail.com>
Wed, 13 Jan 2016 04:20:16 +0000 (12:20 +0800)
commitde752c5e73d8fa02a3cc585ca346dae0be86c14d
tree662e5f568a281eeac201be2ebe92213f210397a6
parentb28cecdfb8976a88d208879df0aff1ca69c07de5
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>
arch/x86/cpu/mp_init.c
arch/x86/cpu/qemu/cpu.c