From nobody Thu Nov 14 17:08:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+70385+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70385+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1610696874; cv=none; d=zohomail.com; s=zohoarc; b=ih7UVsMIAxDFzMzkrDmQQDWoF7oOyUKRkBPjGkq8wc28ZXkwXuFLjMT8Ve+ICb/v2rDggNyCS/2t6CGI9gROdoV/vzHZcQQ6lVbhIxLwkFDsNcdCVaAmFThuMrmj5Cg/a5YrFIRYh2Blv0+6DErK3lZReNLDVji8yhWRn+N5IiM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610696874; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=l/qxS62WPJyQ+ihhKA4BhivOWRGdF+ENuM3E5ipJ7GY=; b=PpD66wMEp7yXLmd1JRyq3bJz97trGX2OGYlhvusouLxOP98jmvtMj50ZRL9Qrxjrwx2TOhIGvqu76gVj7JZKzs2kCf4E6KGkP3H8WWZnkysYwYjFNaOKq+fZR/7qMs9IBiw0RV83LkuQMhEX4n8fgVp7YFElYRobq+0DU+Y253g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70385+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1610696874093730.6732507554752; Thu, 14 Jan 2021 23:47:54 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id wARVYY1788612xyrdec8imiK; Thu, 14 Jan 2021 23:47:53 -0800 X-Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) by mx.groups.io with SMTP id smtpd.web08.1041.1610696873262228321 for ; Thu, 14 Jan 2021 23:47:53 -0800 X-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10F7jQQs124615; Fri, 15 Jan 2021 07:47:50 GMT X-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 360kvkbnnw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Jan 2021 07:47:49 +0000 X-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10F7efD0005641; Fri, 15 Jan 2021 07:45:49 GMT X-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 360kfapwpg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Jan 2021 07:45:49 +0000 X-Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 10F7jmik020894; Fri, 15 Jan 2021 07:45:48 GMT X-Received: from localhost.localdomain (/70.36.60.91) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 14 Jan 2021 23:45:48 -0800 From: "Ankur Arora" To: devel@edk2.groups.io Cc: imammedo@redhat.com, lersek@redhat.com, Ankur Arora , Michael D Kinney , Liming Gao , Zhiguang Liu , Boris Ostrovsky , Aaron Young Subject: [edk2-devel] [PATCH v3 10/10] MdePkg: use CpuPause() in CpuDeadLoop() Date: Thu, 14 Jan 2021 23:45:33 -0800 Message-Id: <20210115074533.277448-11-ankur.a.arora@oracle.com> In-Reply-To: <20210115074533.277448-1-ankur.a.arora@oracle.com> References: <20210115074533.277448-1-ankur.a.arora@oracle.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ankur.a.arora@oracle.com X-Gm-Message-State: OxdbP4IAVwVC2QQ4AMRkCpcnx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1610696873; bh=e4hOzXDH0XQ6CN9baGqXZmo2KIv0qGRT88Du3rFZEgE=; h=Cc:Date:From:Reply-To:Subject:To; b=LfLpcARyxKHYI1sQUvgT8vY4caiju2JwqXj2v2ELm9Cb55yUoNG9uyEK5mxaB1tQBMG Kz2OT6n8wZtizx4zB7dtQ29fq9eYvvKW7qYKY3xoN4Fv6ILsw9IC3l3Bze2GiWNnKrgAl rjJar9iZd5xT2BPJOS0Q1tY3GcvwC935cos= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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=3D3132 Signed-off-by: Ankur Arora Reviewed-by: Michael D Kinney --- MdePkg/Library/BaseLib/CpuDeadLoop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MdePkg/Library/BaseLib/CpuDeadLoop.c b/MdePkg/Library/BaseLib/= CpuDeadLoop.c index 9e110cacbc96..8fa5a783e90e 100644 --- a/MdePkg/Library/BaseLib/CpuDeadLoop.c +++ b/MdePkg/Library/BaseLib/CpuDeadLoop.c @@ -28,5 +28,7 @@ CpuDeadLoop ( { volatile UINTN Index; =20 - for (Index =3D 0; Index =3D=3D 0;); + for (Index =3D 0; Index =3D=3D 0;) { + CpuPause(); + } } --=20 2.9.3 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#70385): https://edk2.groups.io/g/devel/message/70385 Mute This Topic: https://groups.io/mt/79697166/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-