From: "Zeng, Star" <star.zeng@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"niruiyu@users.noreply.github.com"
<niruiyu@users.noreply.github.com>
Cc: "Ni, Ray" <ray.ni@intel.com>, "Dong, Eric" <eric.dong@intel.com>
Subject: Re: [edk2-devel] [PATCH v2 2/3] UefiCpuPkg/RegisterCpuFeaturesLib: Rename [Before|After]FeatureBitMask
Date: Wed, 25 Dec 2019 09:44:04 +0000 [thread overview]
Message-ID: <0C09AFA07DD0434D9E2A0C6AEB04831040496078@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20191126061550.494828-3-niruiyu@users.noreply.github.com>
Minor comment added.
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Ray Ni
> Sent: Tuesday, November 26, 2019 2:16 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: [edk2-devel] [PATCH v2 2/3] UefiCpuPkg/RegisterCpuFeaturesLib:
> Rename [Before|After]FeatureBitMask
>
> From: Ray Ni <ray.ni@intel.com>
>
> The patch doesn't have any functionality impact.
>
> Signed-off-by: Ray Ni <ray.ni@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> ---
> .../RegisterCpuFeatures.h | 4 +-
> .../RegisterCpuFeaturesLib.c | 68 +++++++++++--------
> 2 files changed, 40 insertions(+), 32 deletions(-)
>
> diff --git
[Trimmed]
>
> FeatureMask = NULL;
> - BeforeFeatureBitMask = NULL;
> - AfterFeatureBitMask = NULL;
> + ThreadBeforeFeatureBitMask = NULL;
> + ThreadAfterFeatureBitMask = NULL;
> CoreBeforeFeatureBitMask = NULL;
> CoreAfterFeatureBitMask = NULL;
> PackageBeforeFeatureBitMask = NULL;
> @@ -850,10 +850,18 @@ RegisterCpuFeature (
> VA_START (Marker, InitializeFunc);
> Feature = VA_ARG (Marker, UINT32);
> while (Feature != CPU_FEATURE_END) {
> - ASSERT ((Feature & (CPU_FEATURE_BEFORE | CPU_FEATURE_AFTER))
> - != (CPU_FEATURE_BEFORE | CPU_FEATURE_AFTER));
> + //
> + // It's invalid to require a feature is before AND after all other features.
> + //
> ASSERT ((Feature & (CPU_FEATURE_BEFORE_ALL |
> CPU_FEATURE_AFTER_ALL))
> != (CPU_FEATURE_BEFORE_ALL | CPU_FEATURE_AFTER_ALL));
> +
> + //
> + // It's invalid to require feature A is before AND after before feature B,
"after before" should be just "after", right?
With it corrected, Reviewed-by: Star Zeng <star.zeng@intel.com>
Thanks,
Star
> + // either in thread level, core level or package level.
> + //
> + ASSERT ((Feature & (CPU_FEATURE_THREAD_BEFORE |
> CPU_FEATURE_THREAD_AFTER))
> + != (CPU_FEATURE_THREAD_BEFORE |
> CPU_FEATURE_THREAD_AFTER));
> ASSERT ((Feature & (CPU_FEATURE_CORE_BEFORE |
> CPU_FEATURE_CORE_AFTER))
> != (CPU_FEATURE_CORE_BEFORE | CPU_FEATURE_CORE_AFTER));
> ASSERT ((Feature & (CPU_FEATURE_PACKAGE_BEFORE |
> CPU_FEATURE_PACKAGE_AFTER))
> @@ -865,9 +873,9 @@ RegisterCpuFeature (
> ASSERT (FeatureMask == NULL);
> SetCpuFeaturesBitMask (&FeatureMask, Feature, CpuFeaturesData-
> >BitMaskSize);
> } else if ((Feature & CPU_FEATURE_THREAD_BEFORE) != 0) {
> - SetCpuFeaturesBitMask (&BeforeFeatureBitMask, Feature &
> ~CPU_FEATURE_THREAD_BEFORE, CpuFeaturesData->BitMaskSize);
> + SetCpuFeaturesBitMask (&ThreadBeforeFeatureBitMask, Feature &
> ~CPU_FEATURE_THREAD_BEFORE, CpuFeaturesData->BitMaskSize);
> } else if ((Feature & CPU_FEATURE_THREAD_AFTER) != 0) {
> - SetCpuFeaturesBitMask (&AfterFeatureBitMask, Feature &
> ~CPU_FEATURE_THREAD_AFTER, CpuFeaturesData->BitMaskSize);
> + SetCpuFeaturesBitMask (&ThreadAfterFeatureBitMask, Feature &
> ~CPU_FEATURE_THREAD_AFTER, CpuFeaturesData->BitMaskSize);
> } else if ((Feature & CPU_FEATURE_CORE_BEFORE) != 0) {
> SetCpuFeaturesBitMask (&CoreBeforeFeatureBitMask, Feature &
> ~CPU_FEATURE_CORE_BEFORE, CpuFeaturesData->BitMaskSize);
> } else if ((Feature & CPU_FEATURE_CORE_AFTER) != 0) {
> @@ -885,8 +893,8 @@ RegisterCpuFeature (
> ASSERT (CpuFeature != NULL);
> CpuFeature->Signature = CPU_FEATURE_ENTRY_SIGNATURE;
> CpuFeature->FeatureMask = FeatureMask;
> - CpuFeature->BeforeFeatureBitMask = BeforeFeatureBitMask;
> - CpuFeature->AfterFeatureBitMask = AfterFeatureBitMask;
> + CpuFeature->ThreadBeforeFeatureBitMask =
> ThreadBeforeFeatureBitMask;
> + CpuFeature->ThreadAfterFeatureBitMask = ThreadAfterFeatureBitMask;
> CpuFeature->CoreBeforeFeatureBitMask = CoreBeforeFeatureBitMask;
> CpuFeature->CoreAfterFeatureBitMask = CoreAfterFeatureBitMask;
> CpuFeature->PackageBeforeFeatureBitMask =
> PackageBeforeFeatureBitMask;
> --
> 2.21.0.windows.1
>
>
>
next prev parent reply other threads:[~2019-12-25 9:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 6:15 [PATCH v2 0/3] UefiCpuPkg/CpuFeature: Introduce First to indicate 1st unit Ray Ni
2019-11-26 6:15 ` [PATCH v2 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Delete CPU_FEATURE_[BEFORE|AFTER] Ray Ni
2019-12-25 9:35 ` Zeng, Star
2019-11-26 6:15 ` [PATCH v2 2/3] UefiCpuPkg/RegisterCpuFeaturesLib: Rename [Before|After]FeatureBitMask Ray Ni
2019-12-25 9:44 ` Zeng, Star [this message]
2019-11-26 6:15 ` [PATCH v2 3/3] UefiCpuPkg/CpuFeature: Introduce First to indicate 1st unit Ray Ni
2019-12-25 9:58 ` Zeng, Star
2020-01-02 3:14 ` Ni, Ray
2020-02-03 5:59 ` Zeng, Star
2020-02-12 6:08 ` Dong, Eric
2020-02-13 8:04 ` [edk2-devel] [PATCH v2 0/3] " Dong, Eric
2020-02-13 14:15 ` Ni, Ray
2020-02-13 23:13 ` Laszlo Ersek
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=0C09AFA07DD0434D9E2A0C6AEB04831040496078@shsmsx102.ccr.corp.intel.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