mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Uros Bizjak" <ubizjak@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] x86: Use X86_CR4_PGE in x86/power/hibernate_asm_32.S
Date: Wed, 20 Aug 2008 10:44:47 +0200	[thread overview]
Message-ID: <5787cf470808200144ta2f28b4nd9b2922cbec73d78@mail.gmail.com> (raw)

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
---
diff --git a/arch/x86/power/hibernate_asm_32.S
b/arch/x86/power/hibernate_asm_32.S
index 4fc7e87..6fa219e 100644
--- a/arch/x86/power/hibernate_asm_32.S
+++ b/arch/x86/power/hibernate_asm_32.S
@@ -1,5 +1,3 @@
-.text
-
 /*
  * This may not use any stack, nor any variable that is not "NoSave":
  *
@@ -8,21 +6,21 @@
  * your own stack under you is bad idea.
  */

+	.text
 #include <linux/linkage.h>
 #include <asm/segment.h>
 #include <asm/page.h>
 #include <asm/asm-offsets.h>
-
-	.text
+#include <asm/processor-flags.h>

 ENTRY(swsusp_arch_suspend)
-
 	movl %esp, saved_context_esp
 	movl %ebx, saved_context_ebx
 	movl %ebp, saved_context_ebp
 	movl %esi, saved_context_esi
 	movl %edi, saved_context_edi
-	pushfl ; popl saved_context_eflags
+	pushfl
+	popl saved_context_eflags

 	call swsusp_save
 	ret
@@ -59,7 +57,7 @@ done:
 	movl	mmu_cr4_features, %ecx
 	jecxz	1f	# cr4 Pentium and higher, skip if zero
 	movl	%ecx, %edx
-	andl	$~(1<<7), %edx;  # PGE
+	andl	$~(X86_CR4_PGE), %edx
 	movl	%edx, %cr4;  # turn off PGE
 1:
 	movl	%cr3, %eax;  # flush TLB
@@ -74,7 +72,8 @@ done:
 	movl saved_context_esi, %esi
 	movl saved_context_edi, %edi

-	pushl saved_context_eflags ; popfl
+	pushl saved_context_eflags
+	popfl

 	xorl	%eax, %eax

             reply	other threads:[~2008-08-20  8:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20  8:44 Uros Bizjak [this message]
2008-08-20  9:53 ` Ingo Molnar
2008-08-20 13:01   ` Rafael J. Wysocki
2008-08-20 19:25   ` 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=5787cf470808200144ta2f28b4nd9b2922cbec73d78@mail.gmail.com \
    --to=ubizjak@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®