From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [Patch v2] xen/x86: Be more power-efficient when waiting forever Date: Mon, 2 Dec 2013 15:34:41 +0000 Message-ID: <1385998481-6822-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: George Dunlap , Andrew Cooper , Jan Beulich List-Id: xen-devel@lists.xenproject.org The effect is unchanged, but the processor will be spending most of its time in the C1 or C1E power state rather than C0. Signed-off-by: Andrew Cooper Acked-by: Keir Fraser CC: Jan Beulich CC: George Dunlap --- Changes in v2: * Only change do_early_page_fault(). Leave the EFI dead code till 4.5 This was discovered while I was playing about in the early_page_fault() handler with the IBM box which was corruption the Xen code section. There is one final for(;;); loop, but is in common code and immediately following a call to panic(), so is actually dead code and will be cleaned up in v2 of my "noreturn" series at the start of 4.5 George: I am requesting that this get a freeze exception, under the qualification of #2 "An awesome release", given no function change threatening --- xen/arch/x86/traps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index d8b3eac..8c355e5 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1448,7 +1448,8 @@ void __init do_early_page_fault(struct cpu_user_regs *regs) printk("Stack dump: "); while ( ((long)stk & ((PAGE_SIZE - 1) & ~(BYTES_PER_LONG - 1))) != 0 ) printk("%p ", _p(*stk++)); - for ( ; ; ) ; + for ( ; ; ) + halt(); } } -- 1.7.10.4