cpu/x86/sipi_vector: Simplify loop getting unique CPU number
Get rid of using eax and reload counter on race condition. Change-Id: Ie4b9957d8aa1f272ff1db5caf2c69d1e1f086a03 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47714 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Christian Walter <christian.walter@9elements.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
c96ee7e263
commit
72c6071770
|
@ -84,10 +84,9 @@ _start:
|
||||||
mov idt_ptr, %ebx
|
mov idt_ptr, %ebx
|
||||||
lidt (%ebx)
|
lidt (%ebx)
|
||||||
|
|
||||||
/* Obtain CPU number. */
|
|
||||||
movl ap_count, %eax
|
|
||||||
1:
|
1:
|
||||||
movl %eax, %ecx
|
/* Obtain CPU number. */
|
||||||
|
movl ap_count, %ecx
|
||||||
inc %ecx
|
inc %ecx
|
||||||
lock cmpxchg %ecx, ap_count
|
lock cmpxchg %ecx, ap_count
|
||||||
jnz 1b
|
jnz 1b
|
||||||
|
|
Loading…
Reference in New Issue