Attention is currently required from: Arthur Heymans, Kane Chen. Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/63553 )
Change subject: cpu/x86/mp_init.c: Add wait_finished_mp_run_on_all_cpus ......................................................................
Patch Set 3:
(1 comment)
File src/cpu/x86/mp_init.c:
https://review.coreboot.org/c/coreboot/+/63553/comment/8f28e44a_76ca915e PS3, Line 1014: * running a function call but does not wait for them to finish it. : * APs only accept a new task when the the previous one is finished : * so to make sure that the post_cpus_add_romcache() is not overwritten : * by an AP thread we do a NOOP call on the APs which will ensure the : * previous function actually finished running. : */ nit: this comment is really specific; I would say that this could be used when synchronization of APs after work is done is required.
Although this still isn't as "atomic", as it introduces another task. Does it make sense to explicitly introduce a synchronization point in the ap_wait_for_instruction/run_on_all_aps for after the work function is done?