mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	arturzaprzala@ownmail.net, Pavel Machek <pavel@ucw.cz>
Subject: [PATCH] Fix typo in arch/i386/power/cpu.c
Date: Mon, 22 May 2006 10:15:35 -0700	[thread overview]
Message-ID: <4471F1B7.7020203@vmware.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 177 bytes --]

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.

[-- Attachment #2: i386-bogus-cr2-assignement --]
[-- Type: text/plain, Size: 810 bytes --]

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

             reply	other threads:[~2006-05-22 17:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-22 17:15 Zachary Amsden [this message]
2006-05-22 17:45 ` Pavel Machek

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-all 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=4471F1B7.7020203@vmware.com \
    --to=zach@vmware.com \
    --cc=akpm@osdl.org \
    --cc=arturzaprzala@ownmail.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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

all inboxes | Powered by JetHome®