lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Jul 2023 10:01:33 +0200
From:   Alexandre Ghiti <alex@...ti.fr>
To:     Nam Cao <namcaov@...il.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] riscv: remove redundant mv instructions

Hi Nam,


On 25/07/2023 07:38, Nam Cao wrote:
> Some mv instructions were useful when first introduced to preserve a0 and
> a1 before function calls. However the code has changed and they are now
> redundant. Remove them.
>
> Signed-off-by: Nam Cao <namcaov@...il.com>
> ---
>   arch/riscv/kernel/head.S | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S
> index 11c3b94c4534..3710ea5d160f 100644
> --- a/arch/riscv/kernel/head.S
> +++ b/arch/riscv/kernel/head.S
> @@ -289,10 +289,6 @@ clear_bss:
>   	blt a3, a4, clear_bss
>   clear_bss_done:
>   #endif
> -	/* Save hart ID and DTB physical address */
> -	mv s0, a0
> -	mv s1, a1
> -
>   	la a2, boot_cpu_hartid
>   	XIP_FIXUP_OFFSET a2
>   	REG_S a0, (a2)
> @@ -306,7 +302,7 @@ clear_bss_done:
>   	la a0, __dtb_start
>   	XIP_FIXUP_OFFSET a0
>   #else
> -	mv a0, s1
> +	mv a0, a1
>   #endif /* CONFIG_BUILTIN_DTB */
>   	call setup_vm
>   #ifdef CONFIG_MMU


You can add:

Reviewed-by: Alexandre Ghiti <alexghiti@...osinc.com>

Thanks,

Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ