[U-Boot] [PATCH 1/2] x86: Add a 'pause' instruction in __udelay() for QEMU target

Simon Glass sjg at chromium.org
Mon Aug 3 01:35:57 CEST 2015


On 2 August 2015 at 15:24, Simon Glass <sjg at chromium.org> wrote:
> On 27 July 2015 at 05:16, Bin Meng <bmeng.cn at gmail.com> wrote:
>> From: Miao Yan <yanmiaobest at gmail.com>
>>
>> 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 at gmail.com>
>> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
>> ---
>>
>>  arch/x86/lib/tsc_timer.c | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>
> Acked-by: Simon Glass <sjg at chromium.org>
> Tested-by: Simon Glass <sjg at chromium.org>

Applied to u-boot-x86, thanks!


More information about the U-Boot mailing list