lkml.org 
[lkml]   [2008]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/2] x86: head_64.S cleanup - use straight move to CR4 register
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


\
 
 \ /
  Last update: 2008-05-13 19:15    [W:0.072 / U:1.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site