From: "Ni, Ray" <ray.ni@intel.com>
To: "Zeng, Star" <star.zeng@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Dong, Eric" <eric.dong@intel.com>,
"Lou, Yun" <yun.lou@intel.com>,
"Laszlo Ersek" <lersek@redhat.com>
Subject: Re: [PATCH] UefiCpuPkg/CpuFeature: reduce time complexty to calc CpuInfo.First
Date: Fri, 11 Dec 2020 10:39:30 +0000 [thread overview]
Message-ID: <CO1PR11MB49309E7773DF7A5AD77329E58CCA0@CO1PR11MB4930.namprd11.prod.outlook.com> (raw)
In-Reply-To: <DM6PR11MB4058A7B7913E77E445523C7CE3CC0@DM6PR11MB4058.namprd11.prod.outlook.com>
> > + FirstPackage = MAX_UINT32;
> >
> > + for (PackageIndex = 0; PackageIndex < CpuStatus->PackageCount;
> > PackageIndex++) {
> >
> > + FirstCore[PackageIndex] = MAX_UINT32;
> >
> > + for (CoreIndex = 0; CoreIndex < CpuStatus->MaxCoreCount; CoreIndex++)
> > {
> >
> > + FirstThread[PackageIndex * CpuStatus->MaxCoreCount + CoreIndex] =
> > MAX_UINT32;
> >
> > + }
> >
> > + }
>
> Could this code block be replaced by a SetMem32(xxx, xxx, MAX_UINT32) call?
>
Yes. it could. I thought the for loop is more readable. Maybe it doesn't help a lot
on the code readability. Let me send an updated version to use SetMem32.
next prev parent reply other threads:[~2020-12-11 10:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 15:01 [PATCH] UefiCpuPkg/CpuFeature: reduce time complexty to calc CpuInfo.First Ni, Ray
2020-12-09 8:48 ` Zeng, Star
2020-12-11 10:39 ` Ni, Ray [this message]
2020-12-10 8:25 ` 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=CO1PR11MB49309E7773DF7A5AD77329E58CCA0@CO1PR11MB4930.namprd11.prod.outlook.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