summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/PiSmmCpuDxeSmm
diff options
context:
space:
mode:
authorDong, Eric <eric.dong@intel.com>2020-04-10 14:54:01 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-04-13 03:13:36 +0000
commit1cae0d42155771bdaa9712868bef507666efa85c (patch)
tree1824d07cfda9f0134a2ad33cf3e2846b16892a0c /UefiCpuPkg/PiSmmCpuDxeSmm
parentd84f090fd7629d026a70d592a7be081d1447357d (diff)
downloadedk2-1cae0d42155771bdaa9712868bef507666efa85c.tar.gz
edk2-1cae0d42155771bdaa9712868bef507666efa85c.tar.bz2
edk2-1cae0d42155771bdaa9712868bef507666efa85c.zip
UefiCpuPkg/PiSmmCpuDxeSmm: Remove useless code in ResetTokens.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2388 After remove Used parameter, below code in ResetTokens can also be removed: 1. The RunningApCount parameter will be reset in GetFreeToken. 2. The ReleaseSpinLock should be called in ReleaseToken function, Code in this function seems like a later fix if ReleaseToken not Release it. We should remove code here and fix the real issue if existed. Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'UefiCpuPkg/PiSmmCpuDxeSmm')
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
index 305bffa9bc..57e788c01b 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c
@@ -433,26 +433,6 @@ ResetTokens (
VOID
)
{
- LIST_ENTRY *Link;
- PROCEDURE_TOKEN *ProcToken;
-
- Link = GetFirstNode (&gSmmCpuPrivate->TokenList);
- while (!IsNull (&gSmmCpuPrivate->TokenList, Link)) {
- ProcToken = PROCEDURE_TOKEN_FROM_LINK (Link);
-
- ProcToken->RunningApCount = 0;
-
- //
- // Check the spinlock status and release it if not released yet.
- //
- if (!AcquireSpinLockOrFail(ProcToken->SpinLock)) {
- DEBUG((DEBUG_ERROR, "Risk::SpinLock still not released!"));
- }
- ReleaseSpinLock (ProcToken->SpinLock);
-
- Link = GetNextNode (&gSmmCpuPrivate->TokenList, Link);
- }
-
//
// Reset the FirstFreeToken to the beginning of token list upon exiting SMI.
//