UPSTREAM: cpu/x86: add a barrier with timeout
In case something goes wrong on one of the
cpus, add the ability to use a barrier with
timeout so that other cpus don't wait forever.
Remove static from barrier wait and release.
BUG=chrome-os-partner:59875
BRANCH=reef
TEST=None
Change-Id: I51079396aa35bcebb5282e30ecf2235d9694b512
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 9b76f0b27b
Original-Change-Id: Iab6bd30ddf7632c7a5785b338798960c26016b24
Original-Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18107
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/457366
This commit is contained in:
parent
3754c09cc7
commit
0e4f5c9718
2 changed files with 35 additions and 2 deletions
|
|
@ -150,5 +150,15 @@ int mp_park_aps(void);
|
|||
void smm_initiate_relocation_parallel(void);
|
||||
/* Send SMI to self with single execution. */
|
||||
void smm_initiate_relocation(void);
|
||||
/* Make a CPU wait until the barrier is released */
|
||||
void barrier_wait(atomic_t *b);
|
||||
/*
|
||||
* Make a CPU wait until the barrier is released, or timeout occurs
|
||||
* returns 1 if timeout occurs before barier is released.
|
||||
* returns 0 if barrier is released before timeout.
|
||||
*/
|
||||
int barrier_wait_timeout(atomic_t *b, uint32_t timeout_ms);
|
||||
/* Release a barrier so that other CPUs waiting for that barrier can continue */
|
||||
void release_barrier(atomic_t *b);
|
||||
|
||||
#endif /* _X86_MP_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue