Add workaround for livelock problem when starting APs.

With more than 1 AP present, an AP could fail to properly release
the mp lock before waiting for smp_started to become nonzero.

With early startup of APs, the BSP could fail to properly release
the mp lock before waiting for smp_started to become nonzero.
This commit is contained in:
Tor Egge 2000-08-07 02:28:37 +00:00
parent ce7ca0624c
commit 5d25b0f6fb
2 changed files with 8 additions and 0 deletions

View File

@ -121,6 +121,8 @@ mp_begin: /* now running relocated at KERNBASE */
call _ap_init
call _rel_mplock
lock /* Avoid livelock (PIII Errata 39) */
addl $0,-4(%esp)
2:
cmpl $0, CNAME(smp_started) /* Wait for last AP to be ready */
jz 2b
@ -133,6 +135,8 @@ NON_GPROF_ENTRY(wait_ap)
pushl %ebp
movl %esp, %ebp
call _rel_mplock
lock /* Avoid livelock (PIII Errata 39) */
addl $0,0(%esp)
movl %eax, 8(%ebp)
1:
cmpl $0, CNAME(smp_started)

View File

@ -121,6 +121,8 @@ mp_begin: /* now running relocated at KERNBASE */
call _ap_init
call _rel_mplock
lock /* Avoid livelock (PIII Errata 39) */
addl $0,-4(%esp)
2:
cmpl $0, CNAME(smp_started) /* Wait for last AP to be ready */
jz 2b
@ -133,6 +135,8 @@ NON_GPROF_ENTRY(wait_ap)
pushl %ebp
movl %esp, %ebp
call _rel_mplock
lock /* Avoid livelock (PIII Errata 39) */
addl $0,0(%esp)
movl %eax, 8(%ebp)
1:
cmpl $0, CNAME(smp_started)