From nobody Mon Feb 9 18:46:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112708+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112708+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1702970343; cv=none; d=zohomail.com; s=zohoarc; b=myA5ECJSK9OE5e7qP4f8SDRhZUwBxVUC51hlS9OZH4mqezlSFn5OcDimB45HUW6wFh7208C/ADMB3jkX8kA6q1ufpmdi7h+O9RlPP5gYEF17Hm9preHKRa6TKmsGvHio5S1VIfVek6OVDe/ukFMbNXZY2gwRf0iXC+gaigb0pEk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1702970343; h=Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=rJjvFmZ+6R4eUN0Ak21GxvEEsWlyA8OTHanvteei5yE=; b=NCdp0KCeA2y1H/ML8E2RerdUq88ytHU8pXroA7Dm0rXJSLKCsdBXC1ssJQAjvbIwuM+t7BBcvBeQLmwvutseb9cOiLQ2LMs7+f0ZBnkugAksMN/aK3ClTkBfVb1GhJURiAWMj42jLln36r90aN7DEUjA4uTmSlqu06vr/ZlHrXo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112708+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1702970343232879.6761655415891; Mon, 18 Dec 2023 23:19:03 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=PGOc/hUYAGu58YGDjCFIdyvfbrYqe5S0kvWOTyh6SkI=; 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=lAVRDg4sw4bTykJoheAVbW5iU+sueOXm7KMXUu8fDjpPOQQjuK9SlQCoLDN+WA5p5DjTD4jV 6gCCENNhOt59/mr2z1DFB6KuNh08OmRsDC0HzdChf1STeOW8BLBOWYCmspGenOgiULY4gR8XwMU d2DNV49OINB09WtEzBIyPoj4= X-Received: by 127.0.0.2 with SMTP id QvTqYY1788612xfg5PDcaNBO; 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: JvaszO00pNThtuY9SA4wXWkZx1787277AA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1702970343757100029 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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/PiSmmCpuDxe= Smm/MpService.c index 54542262a2..9b477b6695 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c @@ -1450,11 +1450,11 @@ InternalSmmStartupAllAPs ( =20 // // Decrease the count to mark this processor(AP or BSP) as finished. // if (ProcToken !=3D NULL) { - WaitForSemaphore (&ProcToken->RunningApCount); + InterlockedDecrement (&ProcToken->RunningApCount); } } } =20 ReleaseAllAPs (); --=20 2.16.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- 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/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-