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 D3713941051 for ; Tue, 19 Dec 2023 03:55:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=3vxXa38qmzKREaE6a/CcVKh1S0Jwj0T7QD0r5Di4Ykg=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1702958113; v=1; b=cLWaqH2Di2o02yAhfE1+sULFPvyKG2y5el3PhYJMvX8IGdh6T3YgQaeo7+4DAwD+jcHeaEZT 4IpQ+edEpuP+G03DcZGIJLboiJPvKXV9nR1cjruajbYIeZWmHLkHLT9XY3j0EUA1qQPDERHRDSj URsJmCLzJ7Fd3RVxG9aG0SXs= X-Received: by 127.0.0.2 with SMTP id cUTKYY7687511xvc5ZB6E3uD; Mon, 18 Dec 2023 19:55:13 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web10.4994.1702958113073805560 for ; Mon, 18 Dec 2023 19:55:13 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="426733194" X-IronPort-AV: E=Sophos;i="6.04,287,1695711600"; d="scan'208";a="426733194" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2023 19:55:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="804751196" X-IronPort-AV: E=Sophos;i="6.04,287,1695711600"; d="scan'208";a="804751196" X-Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga008.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 18 Dec 2023 19:55:12 -0800 X-Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 18 Dec 2023 19:55:11 -0800 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Mon, 18 Dec 2023 19:55:11 -0800 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 18 Dec 2023 19:55:11 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ltM4NGVwSmyLdfFVwfGOp5DUQhtWhpXjYNfU3WTSUeCl6P6efH1nn6w3GRNHNnK7aCXffIHBEvNiRdVoKVEYABkVSN1sTBlXnEHrVZGYSX9jZG/DuwABeDMAVzy7bqpkwbPTFHzFcIR6q70mk7p33MULpYAX3psDoTfuC1lHp8L+z6+s2vLp8QWmFcRCHlJ9WDjN/ltoX5h4SR26xcm/SgdiQQNB1d5WWHMGjpUVPT8PPBn6Utfd5eePK4kpHVFALPkeiiUSDOU+8kykN/WAtjT1MuU+gPGQ/n8bucdjDBDacDKpZuXVuL1S4HGCQu8a6YvrloR9Wwk9h7/WIxzWhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Vmlnphee9FBNwCX9Z16RIHmVTGVwcmzRox99GE81sMI=; b=kcyA6VNCQcr5VZB3CwnFiuRTtV73VbslzvO3ynEr/M5U1w7MWAvWryc9TJyPWfIc8f2f0abaYGqrfSOchVHKb4YWIvmMuQr2IVWLsTeHf2TlGAzKC58JSNQNglx1nm+1Af1j/46a/CUorLxvI0LbsLEDTq38dRyu52k0Aqg/ENn42R8L5iaGBvneNLyBcLIuFSaAvJ+HsV6kA7XWhBotN88Jm8tNWTddckJ86lutkLoq22j2bxHkO/v/pKFPVTZsJqUBidiRIxR9SecnXEb00ecdKEMAyAsqzTWAZRQxk51SabHycb2eXlJS3dDeuk9FTaJDW2Emu9yL0cRd0Q9G8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by DS7PR11MB6040.namprd11.prod.outlook.com (2603:10b6:8:77::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Tue, 19 Dec 2023 03:55:09 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::b614:1f5e:8b0c:9858]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::b614:1f5e:8b0c:9858%4]) with mapi id 15.20.7091.034; Tue, 19 Dec 2023 03:55:09 +0000 From: "Ni, Ray" To: "Wu, Jiaxin" , "devel@edk2.groups.io" CC: Laszlo Ersek , "Dong, Eric" , "Zeng, Star" , Gerd Hoffmann , "Kumar, Rahul R" Subject: Re: [edk2-devel] [PATCH v4 7/8] UefiCpuPkg/PiSmmCpuDxeSmm: Simplify RunningApCount decrement Thread-Topic: [PATCH v4 7/8] UefiCpuPkg/PiSmmCpuDxeSmm: Simplify RunningApCount decrement Thread-Index: AQHaLzze/feoAnNYM0+97eyugLp60bCv/6AA Date: Tue, 19 Dec 2023 03:55:09 +0000 Message-ID: References: <20231215095515.9484-1-jiaxin.wu@intel.com> <20231215095515.9484-8-jiaxin.wu@intel.com> In-Reply-To: <20231215095515.9484-8-jiaxin.wu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|DS7PR11MB6040:EE_ x-ms-office365-filtering-correlation-id: 724a25b1-91c0-4634-d12b-08dc00464b77 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: ozZSrQqxG/UM6Co+K5rKJ9JQ9qO8qwc71hEJ9/4l+s/sQMNI/FAEPyXRdwT6bKhS1Mwc/JEM7NdPD/dW3jerzMSzQninsWoax3Za2s+xKgj+Cvf5awCVeGi+tpSmSeWG3rvVQmG4DaBdpHwyIFcyMexLUvGatqs8n1ODmG9uSQHb1PKMDSf1Co2Uydlh5ob9nYW6X1rpBWzejFFNhlWkRvIjEj7qr1m4APHTw7k/mIPZuuyHQ2yZEEdZc87u+0z4ZqrqtjpSggxLl3dgIus7RntM1wAroYJIviC62uiNYfheJUhAKjcTrCLdS1ELm0XwVLUIFQ4U3sSV7dc3SOFnSjh/We4tVMpflfiD9kSQb3dgCf1B2AiaPL/FBnWMIIttgESwATyt0ah0fI9zrqfZsLLBPxLZBLdJSS82TwwuYguLxthm0gpYpN1FqHt3xWK67r4Wa8Kq7BLzDqrFMcNFfzZkdD8zgqI5lMr4+F1AxJ+DV/qSG7IsvaXgUbGt8lcuJd9QYX7s2MldO8H3bwuGGbV9mW7NGoOl+tv5txH9mJDcRgTKOoYVwauVuixvaRa5HxdmLKKZjAtgetObpTWdCN+NFJyfPF/+S3DQ4va9v/65mTq2iqTLTGnRBdz40m4H x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wC2HvLwU/Lf82KTFyHTwSLT828FrgqNU85jqAzEAdHgrfzS1JR84tbBudYbQ?= =?us-ascii?Q?HihnhRgQHj8SlJXEul9M28Kz4up8xeAbGb21j+f02d5+DPdHOgwrdBP2hS8H?= =?us-ascii?Q?4879jo7XKIeiz9z1PD4dbm7qyZrW9gG0kDC1cQXXGEy0izkAh5V9z9hiyKtU?= =?us-ascii?Q?Droar6Au3OvhZ1U0DQSHMvWG9phSBd32IkVcvH4vWsAI9mH4Hv1X65buxOEh?= =?us-ascii?Q?f4KLRzU/NQUjfeQy0k6hD/AC4oi5G1XAIMJjzrNY868xOVa/RGQ8+YslCEdP?= =?us-ascii?Q?csD2+DCBBw7+hoBHj80bY2dL/87qFTwJh5NKaMGpiIE1mPK/5vMFu8+Sx7kP?= =?us-ascii?Q?4Xdzt5mmQpN0pE37XkbfoEvbnpqxY1dSXHmYcN/IsZ3SmpW8O5/gNpRG/cvs?= =?us-ascii?Q?Kx6cleuTKLmsowxgHKOGeaLWfRlxyUsSU+3L7BVi/UCNCewCpqmB5++GABt9?= =?us-ascii?Q?5gYcQVFI1sk+NoBbbYTstJCv7VfDI4e0G0g5qhRRXfA1xv01PPUpwyBVJ6qC?= =?us-ascii?Q?978aMNzziEaeFODWJn7AaRkaNwHKEb7KlyOlR+sQYE1tXiKv+lz3Q5nbvlo/?= =?us-ascii?Q?0kk1SZjcKZkWdt0zrypLSSJT0xrqbQGBISnMt41qgphepUy7MjmRdPD1OC7s?= =?us-ascii?Q?NXNePY9CxcwYVsHShNl91ELQioEMI4l4upLkhbgWs10nTJCsMQ77tQBphlvm?= =?us-ascii?Q?kzGE9f6oZAJ1nj1dFJVxzymygokfbYAyRIOXkqkF+HO9i6BAAZA9btszw2vx?= =?us-ascii?Q?PHUrHJb6jfMh0IS5MRQUB4tBaR7kJ2k3HE0BKrb/3U/btBb4KL+93YSruUwE?= =?us-ascii?Q?aArSwNl+FpUOjB5i8s+X2zUWVfoQhNeooTdoTBH7OJjYbZh/kc03PBSIshqR?= =?us-ascii?Q?kN+ZGSwkvS6CVphE5b7PPO7XnLAkn+wBQ2xNz8AcRjfqI+H5KtCFhvPxlCQ1?= =?us-ascii?Q?a6MFz0JfLHAqdY5/NqOACQkmCV61bmGwfpiJSXAc6qIjE0Fi7i8yJex2KS3v?= =?us-ascii?Q?3pzAv+EBfEJTYr+pmd11Tscnpy/4eXxhb0HvasYvH1DwIS6VKEz0ptpGxU0y?= =?us-ascii?Q?Qa2VqToh8H8rEEgg1Y6YyhSmrf+T0tNTA3MJXsA6rkFyWit38yeBA824Ikyk?= =?us-ascii?Q?JsJbnGJgM/Fky7d3ZKOnPQ6k6NQwDyzFS3a85ji6VwyCdArnKT0fbhHS0E4c?= =?us-ascii?Q?ui/OaHAIjF8jDzE/3VZv4ZGd08+HxE5ZfSxF+jjN1K82JnOGHAZ4fDGTIylg?= =?us-ascii?Q?AY6t0H6oh7/0H30YuOkQSEX+V8l1RSMO+PjJtlyv4aeyPTa549JCS9pYE6Sb?= =?us-ascii?Q?Er2Fng0wixGFr75kas8jvFlVvbPHFVsHnrwKP8iHSwsLn2Ah571yjq/MSZoA?= =?us-ascii?Q?cNELsQpDcIbynfGSFsrkBLpSlGCrIHzJ/cm2HCSaqCIiSsas3DUT16qTTMab?= =?us-ascii?Q?0s5XNsJoD5qTNGzL19UxEPIIlEAhrKUKebU+JreCrjYW1vXKeMEsCibaw+Bp?= =?us-ascii?Q?51l3SY2jiwF7QdLCbBcHDeAlD7cZyaB9+QxBfCeY4plJGOB8lqHCU4c2+j1a?= =?us-ascii?Q?Pyec7b4zhobdALQizr0=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 724a25b1-91c0-4634-d12b-08dc00464b77 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Dec 2023 03:55:09.3405 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: mPYm4uboHShTwBm1DMJaEInZlwDWzJJamNWsK1KZ/tPn2q/XIHyxqKsL2vT3qDgaWU09uVZNXQ0e8Cc1IIkH5A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6040 X-OriginatorOrg: 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,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: fqjNnWy0TaV2coLOzkYQZyPJx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=cLWaqH2D; 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 Reviewed-by: Ray Ni Thanks, Ray > -----Original Message----- > From: Wu, Jiaxin > Sent: Friday, December 15, 2023 5:55 PM > To: devel@edk2.groups.io > Cc: Laszlo Ersek ; Dong, Eric ; N= i, > Ray ; Zeng, Star ; Gerd Hoffmann > ; Kumar, Rahul R > Subject: [PATCH v4 7/8] UefiCpuPkg/PiSmmCpuDxeSmm: Simplify > RunningApCount decrement >=20 > To decrease the count of RunningApCount, InterlockedDecrement is > enough to achieve that. >=20 > This patch is to simplify RunningApCount decrement. >=20 > 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(-) >=20 > 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 ( >=20 > // > // Decrease the count to mark this processor(AP or BSP) as finishe= d. > // > if (ProcToken !=3D NULL) { > - WaitForSemaphore (&ProcToken->RunningApCount); > + InterlockedDecrement (&ProcToken->RunningApCount); > } > } > } >=20 > ReleaseAllAPs (); > -- > 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 (#112678): https://edk2.groups.io/g/devel/message/112678 Mute This Topic: https://groups.io/mt/103187897/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-