public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Andi Kleen <ak@suse.de>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86 cleanup: suspend_asm_64.S - use X86_CR4_PGE instead of numeric value
Date: Sun, 17 Feb 2008 19:17:16 +0100	[thread overview]
Message-ID: <20080217181716.GY6006@elte.hu> (raw)
In-Reply-To: <20080208214913.GB6787@cvg>


* Cyrill Gorcunov <gorcunov@gmail.com> wrote:

> By including <asm/processor-flags.h> we're allowed to use X86_CR4_PGE 
> instead of numeric constant.
> 
> md5 sums of compiled files are differ due to this inclusion but .text 
> section remains the same.

thanks Cyrill, picked it up. (the merged version is below - the target 
files moved meanwhile)

	Ingo

------------->
Subject: x86 cleanup: suspend_asm_64.S - use X86_CR4_PGE instead of numeric value
From: Cyrill Gorcunov <gorcunov@gmail.com>
Date: Sat, 9 Feb 2008 00:49:13 +0300

By including <asm/processor-flags.h> we're allowed to use
X86_CR4_PGE instead of numeric constant.

md5 sums of compiled files are differ due to this inclusion
but .text section remains the same.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/power/hibernate_asm_64.S |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-x86.q/arch/x86/power/hibernate_asm_64.S
===================================================================
--- linux-x86.q.orig/arch/x86/power/hibernate_asm_64.S
+++ linux-x86.q/arch/x86/power/hibernate_asm_64.S
@@ -20,6 +20,7 @@
 #include <asm/segment.h>
 #include <asm/page.h>
 #include <asm/asm-offsets.h>
+#include <asm/processor-flags.h>
 
 ENTRY(swsusp_arch_suspend)
 	movq	$saved_context, %rax
@@ -60,7 +61,7 @@ ENTRY(restore_image)
 	/* Flush TLB */
 	movq	mmu_cr4_features(%rip), %rax
 	movq	%rax, %rdx
-	andq	$~(1<<7), %rdx	# PGE
+	andq	$~(X86_CR4_PGE), %rdx
 	movq	%rdx, %cr4;  # turn off PGE
 	movq	%cr3, %rcx;  # flush TLB
 	movq	%rcx, %cr3;
@@ -112,7 +113,7 @@ ENTRY(restore_registers)
 	/* Flush TLB, including "global" things (vmalloc) */
 	movq	mmu_cr4_features(%rip), %rax
 	movq	%rax, %rdx
-	andq	$~(1<<7), %rdx;  # PGE
+	andq	$~(X86_CR4_PGE), %rdx
 	movq	%rdx, %cr4;  # turn off PGE
 	movq	%cr3, %rcx;  # flush TLB
 	movq	%rcx, %cr3

  reply	other threads:[~2008-02-17 18:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-08 21:49 [PATCH] x86 cleanup: suspend_asm_64.S - use X86_CR4_PGE instead of numeric value Cyrill Gorcunov
2008-02-17 18:17 ` Ingo Molnar [this message]
2008-02-17 18:41   ` Cyrill Gorcunov

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=20080217181716.GY6006@elte.hu \
    --to=mingo@elte.hu \
    --cc=ak@suse.de \
    --cc=gorcunov@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --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