lkml.org 
[lkml]   [2006]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Fix typo in arch/i386/power/cpu.c
Fix a typo which caused us to corrupt CR2 (not likely a problem) and 
fail to restore CR0 (potentially a problem on APM systems, since TS/EM
bits might be lost) after suspend.
Fix a typo in suspend code noticed by Artur Zaprzala. I'm unsure if this
actually causes a bug in practice, since the ACPI wakeup code also restores
CR0, and the APM code returns to protected mode, but the fix is obviously much
better.

Signed-off-by: Zachary Amsden <zach@vmware.com>


Index: linux-2.6.17-rc/arch/i386/power/cpu.c
===================================================================
--- linux-2.6.17-rc.orig/arch/i386/power/cpu.c 2006-03-19 21:53:29.000000000 -0800
+++ linux-2.6.17-rc/arch/i386/power/cpu.c 2006-05-22 09:50:50.000000000 -0700
@@ -92,7 +92,7 @@ void __restore_processor_state(struct sa
write_cr4(ctxt->cr4);
write_cr3(ctxt->cr3);
write_cr2(ctxt->cr2);
- write_cr2(ctxt->cr0);
+ write_cr0(ctxt->cr0);

/*
* now restore the descriptor tables to their proper values
\
 
 \ /
  Last update: 2006-05-22 19:18    [W:0.020 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site