aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/head.S
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-07-29 00:15:48 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-29 00:46:02 -0400
commit3829ee6b1be03d5aa3005fe7d19f30088b539836 (patch)
treebe7a9f93c38662905509f1033ef935436d8b02a3 /arch/x86_64/kernel/head.S
parent3ba80e7595f3e308e5e7135445b513779fc0ba3b (diff)
[PATCH] x86_64: Small assembly improvements
Save a byte here and there. Ultimatively useless, but these things always catch my eyes when reading the code so just fix them for now. Also I got at least one patch fixing of them already, which gives a good excuse. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/head.S')
-rw-r--r--arch/x86_64/kernel/head.S16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S
index 8d765aa77a2..98ff5eb32b9 100644
--- a/arch/x86_64/kernel/head.S
+++ b/arch/x86_64/kernel/head.S
@@ -137,14 +137,14 @@ startup_64:
137 wrmsr 137 wrmsr
138 138
139 /* Setup cr0 */ 139 /* Setup cr0 */
140 xorq %rax, %rax 140#define CR0_PM 1 /* protected mode */
141 btsq $31, %rax /* Enable paging */ 141#define CR0_MP (1<<1)
142 btsq $0, %rax /* Enable protected mode */ 142#define CR0_ET (1<<4)
143 btsq $1, %rax /* Enable MP */ 143#define CR0_NE (1<<5)
144 btsq $4, %rax /* Enable ET */ 144#define CR0_WP (1<<16)
145 btsq $5, %rax /* Enable NE */ 145#define CR0_AM (1<<18)
146 btsq $16, %rax /* Enable WP */ 146#define CR0_PAGING (1<<31)
147 btsq $18, %rax /* Enable AM */ 147 movl $CR0_PM|CR0_MP|CR0_ET|CR0_NE|CR0_WP|CR0_AM|CR0_PAGING,%eax
148 /* Make changes effective */ 148 /* Make changes effective */
149 movq %rax, %cr0 149 movq %rax, %cr0
150 150