public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] UefiCpuPkg: Delete redundant PcdGetSize PcdCpuFeaturesSupport
@ 2017-12-21 12:01 Song, BinX
  2017-12-27  7:27 ` Dong, Eric
  0 siblings, 1 reply; 2+ messages in thread
From: Song, BinX @ 2017-12-21 12:01 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: Dong, Eric, lersek@redhat.com

When CpuCommonFeaturesLib use RegisterCpuFeaturesLib to register
CPU features, the CpuFeaturesData->BitMaskSize has already been
initialized. So delete redundant PcdGetSize PcdCpuFeaturesSupport
in CpuInitDataInitialize.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bell Song <binx.song@intel.com>
---
 UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
index b8f76f1..2fbde34 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
@@ -149,7 +149,6 @@ CpuInitDataInitialize (
   CpuFeaturesData = GetCpuFeaturesData ();
   CpuFeaturesData->InitOrder = AllocateZeroPool (sizeof (CPU_FEATURES_INIT_ORDER) * NumberOfCpus);
   ASSERT (CpuFeaturesData->InitOrder != NULL);
-  CpuFeaturesData->BitMaskSize = (UINT32) PcdGetSize (PcdCpuFeaturesSupport);
 
   //
   // Collect CPU Features information
-- 
2.10.2.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] UefiCpuPkg: Delete redundant PcdGetSize PcdCpuFeaturesSupport
  2017-12-21 12:01 [PATCH] UefiCpuPkg: Delete redundant PcdGetSize PcdCpuFeaturesSupport Song, BinX
@ 2017-12-27  7:27 ` Dong, Eric
  0 siblings, 0 replies; 2+ messages in thread
From: Dong, Eric @ 2017-12-27  7:27 UTC (permalink / raw)
  To: Song, BinX, edk2-devel@lists.01.org; +Cc: lersek@redhat.com

Reviewed-by: Eric Dong <eric.dong@intel.com>

-----Original Message-----
From: Song, BinX 
Sent: Thursday, December 21, 2017 8:01 PM
To: edk2-devel@lists.01.org
Cc: Dong, Eric <eric.dong@intel.com>; lersek@redhat.com
Subject: [PATCH] UefiCpuPkg: Delete redundant PcdGetSize PcdCpuFeaturesSupport

When CpuCommonFeaturesLib use RegisterCpuFeaturesLib to register CPU features, the CpuFeaturesData->BitMaskSize has already been initialized. So delete redundant PcdGetSize PcdCpuFeaturesSupport in CpuInitDataInitialize.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bell Song <binx.song@intel.com>
---
 UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
index b8f76f1..2fbde34 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
@@ -149,7 +149,6 @@ CpuInitDataInitialize (
   CpuFeaturesData = GetCpuFeaturesData ();
   CpuFeaturesData->InitOrder = AllocateZeroPool (sizeof (CPU_FEATURES_INIT_ORDER) * NumberOfCpus);
   ASSERT (CpuFeaturesData->InitOrder != NULL);
-  CpuFeaturesData->BitMaskSize = (UINT32) PcdGetSize (PcdCpuFeaturesSupport);
 
   //
   // Collect CPU Features information
--
2.10.2.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-27  7:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-21 12:01 [PATCH] UefiCpuPkg: Delete redundant PcdGetSize PcdCpuFeaturesSupport Song, BinX
2017-12-27  7:27 ` Dong, Eric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox