From: "H. Peter Anvin" <hpa@zytor.com>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: tglx@linutronix.de, mingo@redhat.com,
linux-kernel@vger.kernel.org, jirislaby@gmail.com
Subject: Re: [patch 1/2] x86: head_64.S cleanup - use straight move to CR4 register
Date: Tue, 13 May 2008 10:11:34 -0700 [thread overview]
Message-ID: <4829CBC6.2040202@zytor.com> (raw)
In-Reply-To: <20080513170956.GF6921@cvg>
Cyrill Gorcunov wrote:
> [H. Peter Anvin - Tue, May 13, 2008 at 10:03:42AM -0700]
>> Cyrill Gorcunov wrote:
>>> There is no need for testing the values because we already know
>>> what they should be. Just set them in straight way.
>> He isn't testing them, he's setting individual bits.
>>
>> Either of these is pretty silly; the right way to do this is:
>>
>> movl $(X86_CR4_PAE|X86_CR4_PGE), %eax
>> movq %rax, %cr4
>>
>> A movl in 64-bit mode zero extends.
>>
>> -hpa
>>
>
> Here is updated version
> ---
> [PATCH] x86: head_64.S cleanup - use straight move to CR4 register
>
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> ---
>
> Index: linux-2.6.git/arch/x86/kernel/head_64.S
> ===================================================================
> --- linux-2.6.git.orig/arch/x86/kernel/head_64.S 2008-05-13 20:04:23.000000000 +0400
> +++ linux-2.6.git/arch/x86/kernel/head_64.S 2008-05-13 21:08:20.000000000 +0400
> @@ -155,9 +155,7 @@ ENTRY(secondary_startup_64)
> */
>
> /* Enable PAE mode and PGE */
> - xorq %rax, %rax
> - btsq $5, %rax
> - btsq $7, %rax
> + movl $(X86_CR4_PAE | X86_CR4_PGE), %rax
> movq %rax, %cr4
>
Syntax error. %eax, not %rax.
-hpa
next prev parent reply other threads:[~2008-05-13 17:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080513165538.952646389@gmail.com>
2008-05-13 16:55 ` Cyrill Gorcunov
2008-05-13 17:03 ` H. Peter Anvin
2008-05-13 17:07 ` Cyrill Gorcunov
2008-05-13 17:09 ` Cyrill Gorcunov
2008-05-13 17:11 ` H. Peter Anvin [this message]
2008-05-13 17:14 ` Cyrill Gorcunov
2008-05-13 16:55 ` [patch 2/2] x86: head_64.S cleanup - use PMD_SHIFT instead of numeric constant 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=4829CBC6.2040202@zytor.com \
--to=hpa@zytor.com \
--cc=gorcunov@gmail.com \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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®