[patch 1/2] x86: head_64.S cleanup - use straight move to CR4 register

摘自: LKML  被阅读次数: 30


由'机器人'于 2008-05-14 01:01:29 提供


DateTue, 13 May 2008 20:55:39 +0400
FromCyrill Gorcunov <>
Subject[patch 1/2] x86: head_64.S cleanup - use straight move to CR4 register
There is no need for testing the values because we already know
what they should be. Just set them in straight way.

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 19:17:31.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/head_64.S	2008-05-13 19:35:11.000000000 +0400
@@ -155,9 +155,7 @@ ENTRY(secondary_startup_64)
 	 */
 
 	/* Enable PAE mode and PGE */
-	xorq	%rax, %rax
-	btsq	$5, %rax
-	btsq	$7, %rax
+	movq	$(X86_CR4_PAE | X86_CR4_PGE), %rax
 	movq	%rax, %cr4
 
 	/* Setup early boot stage 4 level pagetables. */
-- 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

原文链接: http://lkml.org/lkml/2008/5/13/283
下载该patch