From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1CE0721A18AAA for ; Tue, 18 Apr 2017 00:23:16 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP; 18 Apr 2017 00:23:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,218,1488873600"; d="scan'208";a="75459250" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 18 Apr 2017 00:23:15 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 18 Apr 2017 00:23:14 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 18 Apr 2017 00:23:14 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.178]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.117]) with mapi id 14.03.0319.002; Tue, 18 Apr 2017 15:23:12 +0800 From: "Wu, Hao A" To: "Fan, Jeff" , "edk2-devel@lists.01.org" CC: "Tian, Feng" , "Kinney, Michael D" Thread-Topic: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Lock should be acquired Thread-Index: AQHSt+nMdXBAu+upzkeQOYT3La/CJKHKuW3A Date: Tue, 18 Apr 2017 07:23:11 +0000 Message-ID: References: <20170418021606.8776-1-jeff.fan@intel.com> In-Reply-To: <20170418021606.8776-1-jeff.fan@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Lock should be acquired X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2017 07:23:16 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Hao Wu Best Regards, Hao Wu > -----Original Message----- > From: Fan, Jeff > Sent: Tuesday, April 18, 2017 10:16 AM > To: edk2-devel@lists.01.org > Cc: Wu, Hao A; Tian, Feng; Kinney, Michael D > Subject: [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Lock should be acquired >=20 > SMM BSP's *busy* state should be acquired. We could use AcquireSpinLock() > instead of AcquireSpinLockOrFail(). >=20 > Cc: Hao Wu > Cc: Feng Tian > Cc: Michael Kinney > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jeff Fan > --- > 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 a1d16b4..e03f1e0 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c > @@ -407,7 +407,7 @@ BSPHandler ( > // > // The BUSY lock is initialized to Acquired state > // > - AcquireSpinLockOrFail (mSmmMpSyncData->CpuData[CpuIndex].Busy); > + AcquireSpinLock (mSmmMpSyncData->CpuData[CpuIndex].Busy); >=20 > // > // Perform the pre tasks > -- > 2.9.3.windows.2