summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/PiSmmCpuDxeSmm
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2023-12-15 09:18:57 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-12-20 02:30:56 +0000
commitcc698d033504210303ee1df94fab0d18b65e10a0 (patch)
treeda9c1641bbdd58b5935baeca547901cd88007ae3 /UefiCpuPkg/PiSmmCpuDxeSmm
parent0a248f169d8ffd87f722f1e2ac717e914d29d428 (diff)
downloadedk2-cc698d033504210303ee1df94fab0d18b65e10a0.tar.gz
edk2-cc698d033504210303ee1df94fab0d18b65e10a0.tar.bz2
edk2-cc698d033504210303ee1df94fab0d18b65e10a0.zip
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 <lersek@redhat.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Zeng Star <star.zeng@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'UefiCpuPkg/PiSmmCpuDxeSmm')
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c2
1 files changed, 1 insertions, 1 deletions
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);
}
}
}