Skip to content

Commit 3c41ad3

Browse files
kaihuangKAGA-KOKO
authored andcommitted
x86/kexec: Fix a comment of swap_pages() assembly
When relocate_kernel() gets called, %rdi holds 'indirection_page' and %rsi holds 'page_list'. And %rdi always holds 'indirection_page' when swap_pages() is called. Therefore the comment of the first line code of swap_pages() movq %rdi, %rcx /* Put the page_list in %rcx */ .. isn't correct because it actually moves the 'indirection_page' to the %rcx. Fix it. Signed-off-by: Kai Huang <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Kirill A. Shutemov <[email protected]> Link: https://lore.kernel.org/all/adafdfb1421c88efce04420fc9a996c0e2ca1b34.1724573384.git.kai.huang@intel.com
1 parent c6e6a3c commit 3c41ad3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/relocate_kernel_64.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ SYM_CODE_END(virtual_mapped)
258258
/* Do the copies */
259259
SYM_CODE_START_LOCAL_NOALIGN(swap_pages)
260260
UNWIND_HINT_END_OF_STACK
261-
movq %rdi, %rcx /* Put the page_list in %rcx */
261+
movq %rdi, %rcx /* Put the indirection_page in %rcx */
262262
xorl %edi, %edi
263263
xorl %esi, %esi
264264
jmp 1f

0 commit comments

Comments
 (0)