Re: [PATCH v7 02/22] x86/head_64: Store boot_params pointer in callee save register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux