Attention is currently required from: Furquan Shaikh, Tim Wawrzynczak, Julius Werner, Kyösti Mälkki, Rob Barnes, Karthik Ramasubramanian.
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59021 )
Change subject: arch/x86/smp/spinlock: Fix threading when !STAGE_HAS_SPINLOCKS
......................................................................
Patch Set 2:
(1 comment)
File src/arch/x86/include/arch/smp/spinlock.h:
https://review.coreboot.org/c/coreboot/+/59021/comment/6b677db3_578465d7
PS2, Line 50: thread_coop_disable();
This function is attributed with __always_inline but got added a function call into it with CB:56320 […]
I can remove the __always_inline. Not really sure why we need it.
Yeah, if you have two threads trying to print things then we need to serialize the threads. If on the other hand one of the threads is using a DMA controller to perform some operation while the other thread is printing to the console then things are still working in parallel. This is the current goal of coop.
The other option is we add a mutex everywhere we have a spinlock. This doesn't really solve the problem though. We still can't yield while holding a spin lock, so we still need to disable threading.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/59021
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iea621fcdad8f0367acce4f70be42a4e9a68da938
Gerrit-Change-Number: 59021
Gerrit-PatchSet: 2
Gerrit-Owner: Raul Rangel
rrangel@chromium.org
Gerrit-Reviewer: Furquan Shaikh
furquan.m.shaikh@gmail.com
Gerrit-Reviewer: Julius Werner
jwerner@chromium.org
Gerrit-Reviewer: Karthik Ramasubramanian
kramasub@google.com
Gerrit-Reviewer: Rob Barnes
robbarnes@google.com
Gerrit-Reviewer: Tim Wawrzynczak
twawrzynczak@chromium.org
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Kyösti Mälkki
kyosti.malkki@gmail.com
Gerrit-Attention: Furquan Shaikh
furquan.m.shaikh@gmail.com
Gerrit-Attention: Tim Wawrzynczak
twawrzynczak@chromium.org
Gerrit-Attention: Julius Werner
jwerner@chromium.org
Gerrit-Attention: Kyösti Mälkki
kyosti.malkki@gmail.com
Gerrit-Attention: Rob Barnes
robbarnes@google.com
Gerrit-Attention: Karthik Ramasubramanian
kramasub@google.com
Gerrit-Comment-Date: Tue, 09 Nov 2021 19:51:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Raul Rangel
rrangel@chromium.org
Comment-In-Reply-To: Kyösti Mälkki
kyosti.malkki@gmail.com
Gerrit-MessageType: comment