diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2020-11-18 13:26:10 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-01-12 13:35:31 +0000 |
commit | 72c6071770da42334e2f0f41a1db35f53eb463d2 (patch) | |
tree | 4ccfa071268fc730537c2c78cfd2ddd641697e31 /src | |
parent | c96ee7e2637f06e3df9c4fcd67fc26edbc555fc1 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/x86/sipi_vector.S | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cpu/x86/sipi_vector.S b/src/cpu/x86/sipi_vector.S index 61d9e34466..02ad0d367a 100644 --- a/src/cpu/x86/sipi_vector.S +++ b/src/cpu/x86/sipi_vector.S @@ -84,10 +84,9 @@ _start: mov idt_ptr, %ebx lidt (%ebx) - /* Obtain CPU number. */ - movl ap_count, %eax 1: - movl %eax, %ecx + /* Obtain CPU number. */ + movl ap_count, %ecx inc %ecx lock cmpxchg %ecx, ap_count jnz 1b |