From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id EFA0874004D for ; Fri, 15 Dec 2023 09:55:37 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=xjS+gTL6xMHq9gZcNzmFiCKr2xfGlW+WliVVQ7osVyA=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe; s=20140610; t=1702634136; v=1; b=wSzTswaH0lAC1uBn2EQfLTvo48sEsagWVRi78i9f6BoLkpZYthJI1/gexJvfH2KuDSc2SUc7 Q15QSy5mZ5ox6hh84nnsUzq46bZMs8QnGLKk1ZZf5kNtHHY/HRzlY7H+DGgwSD1BbK/mXY+K+LK U8HQEQRcIruf/b+RNp5q41os= X-Received: by 127.0.0.2 with SMTP id gwPyYY7687511x96Lw6VKvPX; Fri, 15 Dec 2023 01:55:36 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by mx.groups.io with SMTP id smtpd.web10.59154.1702634120783643851 for ; Fri, 15 Dec 2023 01:55:36 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="2343122" X-IronPort-AV: E=Sophos;i="6.04,278,1695711600"; d="scan'208";a="2343122" X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2023 01:55:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="750884313" X-IronPort-AV: E=Sophos;i="6.04,278,1695711600"; d="scan'208";a="750884313" X-Received: from sh1gapp1009.ccr.corp.intel.com ([10.239.189.219]) by orsmga006.jf.intel.com with ESMTP; 15 Dec 2023 01:55:34 -0800 From: "Wu, Jiaxin" To: devel@edk2.groups.io Cc: Laszlo Ersek , Eric Dong , Ray Ni , Zeng Star , Gerd Hoffmann , Rahul Kumar Subject: [edk2-devel] [PATCH v4 7/8] UefiCpuPkg/PiSmmCpuDxeSmm: Simplify RunningApCount decrement Date: Fri, 15 Dec 2023 17:55:14 +0800 Message-Id: <20231215095515.9484-8-jiaxin.wu@intel.com> In-Reply-To: <20231215095515.9484-1-jiaxin.wu@intel.com> References: <20231215095515.9484-1-jiaxin.wu@intel.com> Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jiaxin.wu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 6rkzZjdOxT8Ee2ISpg1JjkwEx7686176AA= X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=wSzTswaH; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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 --- 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 @@ -1450,11 +1450,11 @@ InternalSmmStartupAllAPs ( // // Decrease the count to mark this processor(AP or BSP) as finished. // if (ProcToken != NULL) { - WaitForSemaphore (&ProcToken->RunningApCount); + InterlockedDecrement (&ProcToken->RunningApCount); } } } ReleaseAllAPs (); -- 2.16.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112599): https://edk2.groups.io/g/devel/message/112599 Mute This Topic: https://groups.io/mt/103187897/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-