* [PATCH] x86: qemu: Fix broken multi-core boot
@ 2021-02-02 7:04 Bin Meng
2021-02-03 12:59 ` Simon Glass
0 siblings, 1 reply; 3+ messages in thread
From: Bin Meng @ 2021-02-02 7:04 UTC (permalink / raw)
To: u-boot
Unfortunately the multi-core boot for QEMU x86 has been broken since
commit 77a5e2d3bc61 ("x86: mp_init: Set up the CPU numbers at the start").
In order to support QEMU x86 multi-core boot, the /cpus node must be
bound before any actual fix up in qemu_cpu_fixup(). This adds the
uclass_get() call to ensure this, just like what was done before.
Fixes: 77a5e2d3bc61 ("x86: mp_init: Set up the CPU numbers at the start")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---
arch/x86/cpu/qfw_cpu.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/cpu/qfw_cpu.c b/arch/x86/cpu/qfw_cpu.c
index a35de87..b959ead 100644
--- a/arch/x86/cpu/qfw_cpu.c
+++ b/arch/x86/cpu/qfw_cpu.c
@@ -17,10 +17,16 @@ int qemu_cpu_fixup(void)
int ret;
int cpu_num;
int cpu_online;
+ struct uclass *uc;
struct udevice *dev, *pdev;
struct cpu_plat *plat;
char *cpu;
+ /* This will cause the CPUs devices to be bound */
+ ret = uclass_get(UCLASS_CPU, &uc);
+ if (ret)
+ return ret;
+
/* first we need to find '/cpus' */
for (device_find_first_child(dm_root(), &pdev);
pdev;
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] x86: qemu: Fix broken multi-core boot
2021-02-02 7:04 [PATCH] x86: qemu: Fix broken multi-core boot Bin Meng
@ 2021-02-03 12:59 ` Simon Glass
2021-02-03 14:46 ` Bin Meng
0 siblings, 1 reply; 3+ messages in thread
From: Simon Glass @ 2021-02-03 12:59 UTC (permalink / raw)
To: u-boot
On Tue, 2 Feb 2021 at 00:05, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Unfortunately the multi-core boot for QEMU x86 has been broken since
> commit 77a5e2d3bc61 ("x86: mp_init: Set up the CPU numbers at the start").
>
> In order to support QEMU x86 multi-core boot, the /cpus node must be
> bound before any actual fix up in qemu_cpu_fixup(). This adds the
> uclass_get() call to ensure this, just like what was done before.
>
> Fixes: 77a5e2d3bc61 ("x86: mp_init: Set up the CPU numbers at the start")
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
> arch/x86/cpu/qfw_cpu.c | 6 ++++++
> 1 file changed, 6 insertions(+)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] x86: qemu: Fix broken multi-core boot
2021-02-03 12:59 ` Simon Glass
@ 2021-02-03 14:46 ` Bin Meng
0 siblings, 0 replies; 3+ messages in thread
From: Bin Meng @ 2021-02-03 14:46 UTC (permalink / raw)
To: u-boot
On Wed, Feb 3, 2021 at 9:00 PM Simon Glass <sjg@chromium.org> wrote:
>
> On Tue, 2 Feb 2021 at 00:05, Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > Unfortunately the multi-core boot for QEMU x86 has been broken since
> > commit 77a5e2d3bc61 ("x86: mp_init: Set up the CPU numbers at the start").
> >
> > In order to support QEMU x86 multi-core boot, the /cpus node must be
> > bound before any actual fix up in qemu_cpu_fixup(). This adds the
> > uclass_get() call to ensure this, just like what was done before.
> >
> > Fixes: 77a5e2d3bc61 ("x86: mp_init: Set up the CPU numbers at the start")
> > Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> > ---
> >
> > arch/x86/cpu/qfw_cpu.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
applied to u-boot-x86, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-03 14:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-02 7:04 [PATCH] x86: qemu: Fix broken multi-core boot Bin Meng
2021-02-03 12:59 ` Simon Glass
2021-02-03 14:46 ` Bin Meng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.