Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47714 )
Change subject: cpu/x86/sipi_vector: Simplify loop getting unique CPU number ......................................................................
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 --- M src/cpu/x86/sipi_vector.S 1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/47714/1
diff --git a/src/cpu/x86/sipi_vector.S b/src/cpu/x86/sipi_vector.S index 394c03a..199a12b 100644 --- a/src/cpu/x86/sipi_vector.S +++ b/src/cpu/x86/sipi_vector.S @@ -89,10 +89,9 @@ 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
Christian Walter has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47714 )
Change subject: cpu/x86/sipi_vector: Simplify loop getting unique CPU number ......................................................................
Patch Set 1: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47714 )
Change subject: cpu/x86/sipi_vector: Simplify loop getting unique CPU number ......................................................................
Patch Set 1: Code-Review+1
Attention is currently required from: Patrick Rudolph. Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47714 )
Change subject: cpu/x86/sipi_vector: Simplify loop getting unique CPU number ......................................................................
Patch Set 2: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47714 )
Change subject: cpu/x86/sipi_vector: Simplify loop getting unique CPU number ......................................................................
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 --- M src/cpu/x86/sipi_vector.S 1 file changed, 2 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved Angel Pons: Looks good to me, but someone else must approve Christian Walter: Looks good to me, approved
diff --git a/src/cpu/x86/sipi_vector.S b/src/cpu/x86/sipi_vector.S index 61d9e34..02ad0d3 100644 --- a/src/cpu/x86/sipi_vector.S +++ b/src/cpu/x86/sipi_vector.S @@ -84,10 +84,9 @@ 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