From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"ankur.a.arora@oracle.com" <ankur.a.arora@oracle.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "lersek@redhat.com" <lersek@redhat.com>,
"imammedo@redhat.com" <imammedo@redhat.com>,
"boris.ostrovsky@oracle.com" <boris.ostrovsky@oracle.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
"Liu, Zhiguang" <zhiguang.liu@intel.com>,
Aaron Young <aaron.young@oracle.com>
Subject: Re: [edk2-devel] [PATCH v2 10/10] MdePkg: use CpuPause() in CpuDeadLoop()
Date: Thu, 7 Jan 2021 22:30:39 +0000 [thread overview]
Message-ID: <BL0PR11MB3236A755C7E942F4130C5AD7D2AF0@BL0PR11MB3236.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210107195515.106158-11-ankur.a.arora@oracle.com>
Looks like a good improvement. One minor comment is that the loop
should have {} to follow coding style:
for (Index = 0; Index == 0;) {
CpuPause();
}
With that change:
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Mike
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ankur Arora
> Sent: Thursday, January 7, 2021 11:55 AM
> To: devel@edk2.groups.io
> Cc: lersek@redhat.com; imammedo@redhat.com; boris.ostrovsky@oracle.com; Ankur Arora <ankur.a.arora@oracle.com>; Kinney,
> Michael D <michael.d.kinney@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>;
> Aaron Young <aaron.young@oracle.com>
> Subject: [edk2-devel] [PATCH v2 10/10] MdePkg: use CpuPause() in CpuDeadLoop()
>
> Use CpuPause() to allow the CPU to go into a lower power state
> state while we spin wait.
>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: Aaron Young <aaron.young@oracle.com>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132
> Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
> ---
> MdePkg/Library/BaseLib/CpuDeadLoop.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/MdePkg/Library/BaseLib/CpuDeadLoop.c b/MdePkg/Library/BaseLib/CpuDeadLoop.c
> index 9e110cacbc96..e76312de7b4e 100644
> --- a/MdePkg/Library/BaseLib/CpuDeadLoop.c
> +++ b/MdePkg/Library/BaseLib/CpuDeadLoop.c
> @@ -28,5 +28,6 @@ CpuDeadLoop (
> {
>
> volatile UINTN Index;
>
>
>
> - for (Index = 0; Index == 0;);
>
> + for (Index = 0; Index == 0;)
>
> + CpuPause();>
> }
>
> --
> 2.9.3
>
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#69980): https://edk2.groups.io/g/devel/message/69980
> Mute This Topic: https://groups.io/mt/79507581/1643496
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [michael.d.kinney@intel.com]
> -=-=-=-=-=-=
>
next prev parent reply other threads:[~2021-01-07 22:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 19:55 [PATCH v2 00/10] support CPU hot-unplug Ankur Arora
2021-01-07 19:55 ` [PATCH v2 01/10] OvmfPkg/CpuHotplugSmm: move CPU Hotplug into PlugCpus() Ankur Arora
2021-01-07 19:55 ` [PATCH v2 02/10] OvmfPkg/CpuHotplugSmm: handle Hot-unplug events Ankur Arora
2021-01-07 19:55 ` [PATCH v2 03/10] OvmfPkg/CpuHotplugSmm: add Qemu CpuStatus helper Ankur Arora
2021-01-07 19:55 ` [PATCH v2 04/10] OvmfPkg/CpuHotplugSmm: handle CPU hot-unplug Ankur Arora
2021-01-07 19:55 ` [PATCH v2 05/10] MdePkg: add MmRegisterShutdownInterface() Ankur Arora
2021-01-07 20:48 ` [edk2-devel] " Laszlo Ersek
2021-01-07 21:00 ` Laszlo Ersek
2021-01-07 21:19 ` Ankur Arora
2021-01-07 21:50 ` Laszlo Ersek
2021-01-07 21:45 ` Laszlo Ersek
2021-01-07 23:42 ` Ankur Arora
2021-01-07 19:55 ` [PATCH v2 06/10] UefiCpuPkg/PiSmmCpuDxeSmm: initialize IsBsp Ankur Arora
2021-01-07 19:55 ` [PATCH v2 07/10] UefiCpuPkg/SmmCpuFeaturesLib: add IsBsp as a param to SmmCpuFeaturesRendezvousExit() Ankur Arora
2021-01-07 19:55 ` [PATCH v2 08/10] OvmfCpuPkg/CpuHotplug: add a hot-unplug handler called at SMI exit Ankur Arora
2021-01-07 19:55 ` [PATCH v2 09/10] OvmfPkg/SmmControl2Dxe: negotiate ICH9_LPC_SMI_F_CPU_HOT_UNPLUG Ankur Arora
2021-01-07 19:55 ` [PATCH v2 10/10] MdePkg: use CpuPause() in CpuDeadLoop() Ankur Arora
2021-01-07 22:30 ` Michael D Kinney [this message]
2021-01-07 23:43 ` [edk2-devel] " Ankur Arora
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=BL0PR11MB3236A755C7E942F4130C5AD7D2AF0@BL0PR11MB3236.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