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 1D4C29412AE for ; Tue, 19 Dec 2023 07:19:03 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=2AE1E+eV0FpYkb+PFvYcDrkUqubkSMjin5liyzPq/Hk=; 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=1702970342; v=1; b=qz50VTKEEB/U1jw+JmQexCnAkexMNuQXe7x/DR6tmHKzLG/jrC3d/hwUUSF2GxwwD7wVzboW de/tAzIhX4kejt1rCGSLTVdsE5SjWrjKGw5iSeWI7fTJAbuWtUAtLRnT1AK6OZmLpQtTDO0wJ61 XyzLqh5BT347O+dku0xJXcMk= X-Received: by 127.0.0.2 with SMTP id WOpQYY7687511xuUtBXETRTb; Mon, 18 Dec 2023 23:19:02 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by mx.groups.io with SMTP id smtpd.web10.7322.1702970325397750965 for ; Mon, 18 Dec 2023 23:19:02 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="2830939" X-IronPort-AV: E=Sophos;i="6.04,287,1695711600"; d="scan'208";a="2830939" X-Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2023 23:19:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="899262088" X-IronPort-AV: E=Sophos;i="6.04,287,1695711600"; d="scan'208";a="899262088" X-Received: from sh1gapp1009.ccr.corp.intel.com ([10.239.189.219]) by orsmga004.jf.intel.com with ESMTP; 18 Dec 2023 23:18:59 -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 v5 7/8] UefiCpuPkg/PiSmmCpuDxeSmm: Simplify RunningApCount decrement Date: Tue, 19 Dec 2023 15:18:38 +0800 Message-Id: <20231219071839.4248-8-jiaxin.wu@intel.com> In-Reply-To: <20231219071839.4248-1-jiaxin.wu@intel.com> References: <20231219071839.4248-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: B79PPJpz30CXFwHEkLaGTD9Ex7686176AA= X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=qz50VTKE; 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 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 @@ -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 (#112708): https://edk2.groups.io/g/devel/message/112708 Mute This Topic: https://groups.io/mt/103259039/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-