From cc698d033504210303ee1df94fab0d18b65e10a0 Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Fri, 15 Dec 2023 09:18:57 +0800 Subject: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Simplify RunningApCount decrement To decrease the count of RunningApCount, InterlockedDecrement is enough to achieve that. This patch is to simplify RunningApCount decrement. Cc: Laszlo Ersek Cc: Eric Dong Cc: Ray Ni Cc: Zeng Star Cc: Gerd Hoffmann Cc: Rahul Kumar Signed-off-by: Jiaxin Wu Reviewed-by: Ray Ni --- UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c index 54542262a2..9b477b6695 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c @@ -1452,7 +1452,7 @@ InternalSmmStartupAllAPs ( // Decrease the count to mark this processor(AP or BSP) as finished. // if (ProcToken != NULL) { - WaitForSemaphore (&ProcToken->RunningApCount); + InterlockedDecrement (&ProcToken->RunningApCount); } } }