From: "Huang, Kai" <kai.huang@intel.com>
To: "kirill.shutemov@linux.intel.com" <kirill.shutemov@linux.intel.com>
Cc: "hpa@zytor.com" <hpa@zytor.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"jpoimboe@kernel.org" <jpoimboe@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"Wilk, Konrad" <konrad.wilk@oracle.com>
Subject: Re: [PATCH] x86/kexec: Add a comment to relocate_kernel() for better readability
Date: Thu, 8 Jun 2023 04:41:37 +0000 [thread overview]
Message-ID: <538335b164bf8b84b8a55c5654ed15d849479388.camel@intel.com> (raw)
In-Reply-To: <20230607111957.sppocwpkhfb2e2vf@box.shutemov.name>
On Wed, 2023-06-07 at 14:19 +0300, kirill.shutemov@linux.intel.com wrote:
> On Wed, Jun 07, 2023 at 10:39:10PM +1200, Kai Huang wrote:
> > The reason to save %rcx to %r11 before calling swap_pages isn't that
> > obvious w/o looking into the swap_pages itself. Add a comment to
> > improve the readability.
> >
> > Signed-off-by: Kai Huang <kai.huang@intel.com>
> > ---
> > arch/x86/kernel/relocate_kernel_64.S | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
> > index 56cab1bb25f5..97deae3c5e6c 100644
> > --- a/arch/x86/kernel/relocate_kernel_64.S
> > +++ b/arch/x86/kernel/relocate_kernel_64.S
> > @@ -169,6 +169,10 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped)
> > wbinvd
> > 1:
> >
> > + /*
> > + * Save the preserve_context to %r11 as
> > + * swap_pages clobbers %rcx.
> > + */
>
> Line split is not needed. It fits nicely under 80-characters.
>
> + /* Save the preserve_context to %r11 as swap_pages clobbers %rcx. */
>
> Otherwise, LGTM.
Sure. Will do.
With above change, may I add your Acked-by ? :)
>
> > movq %rcx, %r11
> > call swap_pages
> >
> >
> > base-commit: 409bf2895d71bb68bc5b8589036e5ed1ca30bada
> > --
> > 2.40.1
> >
>
next prev parent reply other threads:[~2023-06-08 4:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 10:39 Kai Huang
2023-06-07 11:19 ` kirill.shutemov
2023-06-08 4:41 ` Huang, Kai [this message]
2023-06-08 11:25 ` kirill.shutemov
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=538335b164bf8b84b8a55c5654ed15d849479388.camel@intel.com \
--to=kai.huang@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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®