[patch 2/4] x86: relocate_kernel - use PAGE_SIZE instead of numeric constant

gorcunov
2008-03-22T21:04:17Z

[-- Attachment #1: x86-use-PAGE_SIZE --]
[-- Type: text/plain, Size: 1188 bytes --]

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
Index: linux-2.6.git/arch/x86/kernel/relocate_kernel_32.S
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/relocate_kernel_32.S 2008-03-22 21:15:37.000000000 +0300
+++ linux-2.6.git/arch/x86/kernel/relocate_kernel_32.S 2008-03-22 21:16:54.000000000 +0300
@@ -154,7 +154,7 @@ relocate_new_kernel:
movl %eax, %cr3

/* setup a new stack at the end of the physical control page */
- lea 4096(%edi), %esp
+ lea PAGE_SIZE(%edi), %esp

/* jump to identity mapped page */
movl %edi, %eax
Index: linux-2.6.git/arch/x86/kernel/relocate_kernel_64.S
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/relocate_kernel_64.S 2008-03-22 20:58:02.000000000 +0300
+++ linux-2.6.git/arch/x86/kernel/relocate_kernel_64.S 2008-03-22 21:17:13.000000000 +0300
@@ -159,7 +159,7 @@ relocate_new_kernel:
movq %r9, %cr3

/* setup a new stack at the end of the physical control page */
- lea 4096(%r8), %rsp
+ lea PAGE_SIZE(%r8), %rsp

/* jump to identity mapped page */
addq $(identity_mapped - relocate_kernel), %r8

--