lkml.org 
[lkml]   [2023]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v7 02/22] x86/head_64: Store boot_params pointer in callee save register
    On Fri, Jul 28, 2023 at 11:08:56AM +0200, Ard Biesheuvel wrote:
    > Instead of pushing/popping %RSI to/from the stack every time a function
    > is called from startup_64(), store it in a callee preserved register
    > and grab it from there when its value is actually needed.
    >
    > Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
    > ---
    > arch/x86/kernel/head_64.S | 23 +++++---------------
    > 1 file changed, 5 insertions(+), 18 deletions(-)
    >
    > diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
    > index c5b9289837dcbad2..dbc80fe098f86860 100644
    > --- a/arch/x86/kernel/head_64.S
    > +++ b/arch/x86/kernel/head_64.S
    > @@ -62,6 +62,7 @@ SYM_CODE_START_NOALIGN(startup_64)
    > * compiled to run at we first fixup the physical addresses in our page
    > * tables and then reload them.
    > */
    > + mov %rsi, %r15 /* Preserve boot_params pointer */

    Please move those side comments over the insn.

    Thx.

    --
    Regards/Gruss,
    Boris.

    https://people.kernel.org/tglx/notes-about-netiquette

    \
     
     \ /
      Last update: 2023-08-01 13:28    [W:5.775 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site