]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
x86: Add a 'pause' instruction in __udelay() for QEMU target
authorMiao Yan <yanmiaobest@gmail.com>
Mon, 27 Jul 2015 11:16:07 +0000 (19:16 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:00:49 +0000 (08:00 +0200)
commit1fcd3f6bdd81cc5daec7a203f19e30f95b7f2bf8
tree08676652434bc57dcccbb8ff40346b284ee2f8be
parent21617953dbeaf840e7ae5db70da36458f5cb5c60
x86: Add a 'pause' instruction in __udelay() for QEMU target

When running SMP configuration on QEMU (tcg mode, no kvm), there is
a busy loop in start_aps(), calling udelay(), that waits for APs to
show up online. However, there is a chance that VCPU1 will be timeout
waiting, IOW the secondary VCPUs haven't started their execution yet.

This patch adds a 'pause' instruction in __udelay() only for QEMU
target, to give other VCPUs a chance to run. When QEMU sees the
'pause' instruction, it will yeild the execution to other CPUs.

Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
arch/x86/lib/tsc_timer.c