diff options
author | Jiaxin Wu <jiaxin.wu@intel.com> | 2023-12-15 09:18:57 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-12-20 02:30:56 +0000 |
commit | cc698d033504210303ee1df94fab0d18b65e10a0 (patch) | |
tree | da9c1641bbdd58b5935baeca547901cd88007ae3 | |
parent | 0a248f169d8ffd87f722f1e2ac717e914d29d428 (diff) | |
download | edk2-cc698d033504210303ee1df94fab0d18b65e10a0.tar.gz |
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>
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 2 |
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);
}
}
}
|