public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: "Song, BinX" <binx.song@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Dong, Eric" <eric.dong@intel.com>
Subject: Re: [PATCH] UefiCpuPkg: Singularize function name
Date: Mon, 11 Dec 2017 17:33:19 +0100	[thread overview]
Message-ID: <f702a7f6-8433-f285-82e0-2b97244511bb@redhat.com> (raw)
In-Reply-To: <559D2DF22BC9A3468B4FA1AA547F0EF1025C1CCA@shsmsx102.ccr.corp.intel.com>

On 12/11/17 09:16, Song, BinX wrote:
> Change GetSupportPcds and GetConfigurationPcds to be singular
> 
> 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>
> ---
>  .../RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 48 +++++++++++-----------
>  .../RegisterCpuFeaturesLib/RegisterCpuFeatures.h   |  8 ++--
>  2 files changed, 28 insertions(+), 28 deletions(-)
> 
> diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> index b8f76f1..d72ffec 100644
> --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
> @@ -56,7 +56,7 @@ SetSettingPcd (
>    @return  The pointer to CPU feature bits mask buffer.
>  **/
>  UINT8 *
> -GetSupportPcds (
> +GetSupportPcd (
>    VOID
>    )
>  {
> @@ -77,7 +77,7 @@ GetSupportPcds (
>    @return  The pointer to CPU feature bits mask buffer.
>  **/
>  UINT8 *
> -GetConfigurationPcds (
> +GetConfigurationPcd (
>    VOID
>    )
>  {
> @@ -180,8 +180,8 @@ CpuInitDataInitialize (
>    //
>    // Get support and configuration PCDs
>    //
> -  CpuFeaturesData->SupportPcds       = GetSupportPcds ();
> -  CpuFeaturesData->ConfigurationPcds = GetConfigurationPcds ();
> +  CpuFeaturesData->SupportPcd       = GetSupportPcd ();
> +  CpuFeaturesData->ConfigurationPcd = GetConfigurationPcd ();
>  }
>  
>  /**
> @@ -321,7 +321,7 @@ CollectProcessorData (
>    Entry = GetFirstNode (&CpuFeaturesData->FeatureList);
>    while (!IsNull (&CpuFeaturesData->FeatureList, Entry)) {
>      CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);
> -    if (IsBitMaskMatch (CpuFeaturesData->SupportPcds, CpuFeature->FeatureMask)) {
> +    if (IsBitMaskMatch (CpuFeaturesData->SupportPcd, CpuFeature->FeatureMask)) {
>        if (CpuFeature->SupportFunc == NULL) {
>          //
>          // If SupportFunc is NULL, then the feature is supported.
> @@ -444,29 +444,29 @@ AnalysisProcessorFeatures (
>    CPU_FEATURES_DATA                    *CpuFeaturesData;
>  
>    CpuFeaturesData = GetCpuFeaturesData ();
> -  CpuFeaturesData->CapabilityPcds = AllocatePool (CpuFeaturesData->BitMaskSize);
> -  ASSERT (CpuFeaturesData->CapabilityPcds != NULL);
> -  SetMem (CpuFeaturesData->CapabilityPcds, CpuFeaturesData->BitMaskSize, 0xFF);
> +  CpuFeaturesData->CapabilityPcd = AllocatePool (CpuFeaturesData->BitMaskSize);
> +  ASSERT (CpuFeaturesData->CapabilityPcd != NULL);
> +  SetMem (CpuFeaturesData->CapabilityPcd, CpuFeaturesData->BitMaskSize, 0xFF);
>    for (ProcessorNumber = 0; ProcessorNumber < NumberOfCpus; ProcessorNumber++) {
>      CpuInitOrder = &CpuFeaturesData->InitOrder[ProcessorNumber];
>      //
>      // Calculate the last capability on all processors
>      //
> -    SupportedMaskAnd (CpuFeaturesData->CapabilityPcds, CpuInitOrder->FeaturesSupportedMask);
> +    SupportedMaskAnd (CpuFeaturesData->CapabilityPcd, CpuInitOrder->FeaturesSupportedMask);
>    }
>    //
>    // Calculate the last setting
>    //
>  
> -  CpuFeaturesData->SettingPcds = AllocateCopyPool (CpuFeaturesData->BitMaskSize, CpuFeaturesData->CapabilityPcds);
> -  ASSERT (CpuFeaturesData->SettingPcds != NULL);
> -  SupportedMaskAnd (CpuFeaturesData->SettingPcds, CpuFeaturesData->ConfigurationPcds);
> +  CpuFeaturesData->SettingPcd = AllocateCopyPool (CpuFeaturesData->BitMaskSize, CpuFeaturesData->CapabilityPcd);
> +  ASSERT (CpuFeaturesData->SettingPcd != NULL);
> +  SupportedMaskAnd (CpuFeaturesData->SettingPcd, CpuFeaturesData->ConfigurationPcd);
>  
>    //
>    // Save PCDs and display CPU PCDs
>    //
> -  SetCapabilityPcd (CpuFeaturesData->CapabilityPcds);
> -  SetSettingPcd (CpuFeaturesData->SettingPcds);
> +  SetCapabilityPcd (CpuFeaturesData->CapabilityPcd);
> +  SetSettingPcd (CpuFeaturesData->SettingPcd);
>  
>    //
>    // Dump the last CPU feature list
> @@ -476,8 +476,8 @@ AnalysisProcessorFeatures (
>      Entry = GetFirstNode (&CpuFeaturesData->FeatureList);
>      while (!IsNull (&CpuFeaturesData->FeatureList, Entry)) {
>        CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);
> -      if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcds)) {
> -        if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->SettingPcds)) {
> +      if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcd)) {
> +        if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->SettingPcd)) {
>            DEBUG ((DEBUG_INFO, "[Enable   ] "));
>          } else {
>            DEBUG ((DEBUG_INFO, "[Disable  ] "));
> @@ -489,13 +489,13 @@ AnalysisProcessorFeatures (
>        Entry = Entry->ForwardLink;
>      }
>      DEBUG ((DEBUG_INFO, "PcdCpuFeaturesSupport:\n"));
> -    DumpCpuFeatureMask (CpuFeaturesData->SupportPcds);
> +    DumpCpuFeatureMask (CpuFeaturesData->SupportPcd);
>      DEBUG ((DEBUG_INFO, "PcdCpuFeaturesUserConfiguration:\n"));
> -    DumpCpuFeatureMask (CpuFeaturesData->ConfigurationPcds);
> +    DumpCpuFeatureMask (CpuFeaturesData->ConfigurationPcd);
>      DEBUG ((DEBUG_INFO, "PcdCpuFeaturesCapability:\n"));
> -    DumpCpuFeatureMask (CpuFeaturesData->CapabilityPcds);
> +    DumpCpuFeatureMask (CpuFeaturesData->CapabilityPcd);
>      DEBUG ((DEBUG_INFO, "PcdCpuFeaturesSetting:\n"));
> -    DumpCpuFeatureMask (CpuFeaturesData->SettingPcds);
> +    DumpCpuFeatureMask (CpuFeaturesData->SettingPcd);
>    );
>  
>    for (ProcessorNumber = 0; ProcessorNumber < NumberOfCpus; ProcessorNumber++) {
> @@ -506,7 +506,7 @@ AnalysisProcessorFeatures (
>        // Insert each feature into processor's order list
>        //
>        CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);
> -      if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcds)) {
> +      if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcd)) {
>          CpuFeatureInOrder = AllocateCopyPool (sizeof (CPU_FEATURES_ENTRY), CpuFeature);
>          ASSERT (CpuFeatureInOrder != NULL);
>          InsertTailList (&CpuInitOrder->OrderList, &CpuFeatureInOrder->Link);
> @@ -520,13 +520,13 @@ AnalysisProcessorFeatures (
>      Entry = GetFirstNode (&CpuInitOrder->OrderList);
>      while (!IsNull (&CpuInitOrder->OrderList, Entry)) {
>        CpuFeatureInOrder = CPU_FEATURE_ENTRY_FROM_LINK (Entry);
> -      if (IsBitMaskMatch (CpuFeatureInOrder->FeatureMask, CpuFeaturesData->SettingPcds)) {
> +      if (IsBitMaskMatch (CpuFeatureInOrder->FeatureMask, CpuFeaturesData->SettingPcd)) {
>          Status = CpuFeatureInOrder->InitializeFunc (ProcessorNumber, CpuInfo, CpuFeatureInOrder->ConfigData, TRUE);
>          if (EFI_ERROR (Status)) {
>            //
>            // Clean the CpuFeatureInOrder->FeatureMask in setting PCD.
>            //
> -          SupportedMaskCleanBit (CpuFeaturesData->SettingPcds, CpuFeatureInOrder->FeatureMask);
> +          SupportedMaskCleanBit (CpuFeaturesData->SettingPcd, CpuFeatureInOrder->FeatureMask);
>            if (CpuFeatureInOrder->FeatureName != NULL) {
>              DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature: Name = %a.\n", CpuFeatureInOrder->FeatureName));
>            } else {
> @@ -553,7 +553,7 @@ AnalysisProcessorFeatures (
>      // again during initialize the features.
>      //
>      DEBUG ((DEBUG_INFO, "Dump final value for PcdCpuFeaturesSetting:\n"));
> -    DumpCpuFeatureMask (CpuFeaturesData->SettingPcds);
> +    DumpCpuFeatureMask (CpuFeaturesData->SettingPcd);
>  
>      //
>      // Dump the RegisterTable
> diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h
> index 7731f88..69b4121 100644
> --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h
> +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h
> @@ -59,10 +59,10 @@ typedef struct {
>    LIST_ENTRY               FeatureList;
>  
>    CPU_FEATURES_INIT_ORDER  *InitOrder;
> -  UINT8                    *SupportPcds;
> -  UINT8                    *CapabilityPcds;
> -  UINT8                    *ConfigurationPcds;
> -  UINT8                    *SettingPcds;
> +  UINT8                    *SupportPcd;
> +  UINT8                    *CapabilityPcd;
> +  UINT8                    *ConfigurationPcd;
> +  UINT8                    *SettingPcd;
>  
>    CPU_REGISTER_TABLE       *RegisterTable;
>    CPU_REGISTER_TABLE       *PreSmmRegisterTable;
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


      parent reply	other threads:[~2017-12-11 16:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-11  8:16 [PATCH] UefiCpuPkg: Singularize function name Song, BinX
2017-12-11  8:24 ` Dong, Eric
2017-12-11 16:33 ` Laszlo Ersek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f702a7f6-8433-f285-82e0-2b97244511bb@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox