From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) by mx.groups.io with SMTP id smtpd.web09.786.1610063046856830957 for ; Thu, 07 Jan 2021 15:44:07 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=O8Jjxfo+; spf=pass (domain: oracle.com, ip: 141.146.126.79, mailfrom: ankur.a.arora@oracle.com) Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 107NYuSI045445; Thu, 7 Jan 2021 23:44:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=phT1u1BV1oeHFgRR+qMLwga/Y4Ax4BlNxeDqMN63C5k=; b=O8Jjxfo+TTOzA1Xv2tDd9QrPDoZ4nj/ODiBN+gdZr8Wt3/a3HmEWpiRkGKfhMCSUQCOW eWSxrDAJD+ruBb9SfsIUK1/OwNNP9N+AsgMUitR0QaSuwYuQ79gSjXdeC66xpx9UZHOD H4GAkP6fBzbXSk+8yw9ryuSKaN57P7KU/jeHd3hXyV1+vYP3J+n2yPsaz9ap/FuP7qDR z2/uMJ/pCjTFx5WFjuSwXrbJ7U4kpRGXS0CL+AhYBvZgJCQysN+UZHEDL9srzv4ChhLi 4v7+zRG/Ub+YfZpVgpShKdzSJZhvg+Q+WDl39stEMd22b4m5et1ZlcEBcTTFkr/Qifjf Vg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 35wcuxy9fh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 07 Jan 2021 23:44:02 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 107NZRAd056447; Thu, 7 Jan 2021 23:44:01 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 35w3g3fn9j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Jan 2021 23:44:01 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 107Ni0Rs029631; Thu, 7 Jan 2021 23:44:00 GMT Received: from [192.168.0.108] (/70.36.60.91) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 07 Jan 2021 15:44:00 -0800 Subject: Re: [edk2-devel] [PATCH v2 10/10] MdePkg: use CpuPause() in CpuDeadLoop() To: "Kinney, Michael D" , "devel@edk2.groups.io" Cc: "lersek@redhat.com" , "imammedo@redhat.com" , "boris.ostrovsky@oracle.com" , Liming Gao , "Liu, Zhiguang" , Aaron Young References: <20210107195515.106158-1-ankur.a.arora@oracle.com> <20210107195515.106158-11-ankur.a.arora@oracle.com> From: "Ankur Arora" Message-ID: <957af39f-542d-0419-6515-30dc3afe2a71@oracle.com> Date: Thu, 7 Jan 2021 15:43:59 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9857 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 adultscore=0 phishscore=0 spamscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101070132 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9857 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 bulkscore=0 clxscore=1015 spamscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 adultscore=0 mlxlogscore=999 lowpriorityscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101070132 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 2021-01-07 2:30 p.m., Kinney, Michael D wrote: > 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 Thanks. Will fix up the coding style and resend with the rest of the series. Ankur > > Mike > >> -----Original Message----- >> From: 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 ; Kinney, >> Michael D ; Liming Gao ; Liu, Zhiguang ; >> Aaron Young >> 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 >> Cc: Liming Gao >> Cc: Zhiguang Liu >> Cc: Laszlo Ersek >> Cc: Igor Mammedov >> Cc: Boris Ostrovsky >> Cc: Aaron Young >> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3132 >> Signed-off-by: Ankur Arora >> --- >> 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] >> -=-=-=-=-=-= >> >