mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Kai Huang" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Kai Huang <kai.huang@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/cleanups] x86/kexec: Fix a comment of swap_pages() assembly
Date: Sun, 25 Aug 2024 12:37:11 -0000	[thread overview]
Message-ID: <172458943155.2215.14451665523819413189.tip-bot2@tip-bot2> (raw)
In-Reply-To: <adafdfb1421c88efce04420fc9a996c0e2ca1b34.1724573384.git.kai.huang@intel.com>

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     3c41ad39f179c0e41f585975eb6834cd14f286ec
Gitweb:        https://git.kernel.org/tip/3c41ad39f179c0e41f585975eb6834cd14f286ec
Author:        Kai Huang <kai.huang@intel.com>
AuthorDate:    Sun, 25 Aug 2024 20:18:05 +12:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sun, 25 Aug 2024 14:29:39 +02:00

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 <kai.huang@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Link: https://lore.kernel.org/all/adafdfb1421c88efce04420fc9a996c0e2ca1b34.1724573384.git.kai.huang@intel.com

---
 arch/x86/kernel/relocate_kernel_64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index 042c9a0..f7a3ca3 100644
--- a/arch/x86/kernel/relocate_kernel_64.S
+++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -258,7 +258,7 @@ SYM_CODE_END(virtual_mapped)
 	/* Do the copies */
 SYM_CODE_START_LOCAL_NOALIGN(swap_pages)
 	UNWIND_HINT_END_OF_STACK
-	movq	%rdi, %rcx	/* Put the page_list in %rcx */
+	movq	%rdi, %rcx	/* Put the indirection_page in %rcx */
 	xorl	%edi, %edi
 	xorl	%esi, %esi
 	jmp	1f

  reply	other threads:[~2024-08-25 12:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-25  8:18 [PATCH v2 0/2] Misc comments fixup in relocate_kernel_64.S Kai Huang
2024-08-25  8:18 ` [PATCH v2 1/2] x86/kexec: Fix a comment of swap_pages() assembly Kai Huang
2024-08-25 12:37   ` tip-bot2 for Kai Huang [this message]
2024-08-25  8:18 ` [PATCH v2 2/2] x86/kexec: Add comments around swap_pages() assembly to improve readability Kai Huang
2024-08-25 12:37   ` [tip: x86/cleanups] " tip-bot2 for Kai Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=172458943155.2215.14451665523819413189.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=kai.huang@intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®