Skip to contentSkip to conversation

riscv: replace deprecated scall with ecall

PATCH Applied Fangrui Song 3 participants 5 messages Apr 23, 2023 – Jun 20, 2023 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: replace deprecated scall with ecall

scall is a deprecated alias for ecall. ecall is used in several places, so there is no assembler compatibility concern.

---
 arch/riscv/kernel/entry.S             | 4 ++--
 arch/riscv/kernel/vdso/rt_sigreturn.S | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/riscv/kernel/entry.S +2 -2
index 99d38fdf8b18..2f51935612d1 100644
@@ -191,7 +191,7 @@ handle_syscall:
 	REG_S a0, PT_ORIG_A0(sp)
 	/*
 	 * Advance SEPC to avoid executing the original
-	 * scall instruction on sret
+	 * ecall instruction on sret
 	 */
 	addi s2, s2, 0x4
 	REG_S s2, PT_EPC(sp)
@@ -603,6 +603,6 @@ END(excp_vect_table)
 #ifndef CONFIG_MMU
 ENTRY(__user_rt_sigreturn)
 	li a7, __NR_rt_sigreturn
-	scall
+	ecall
 END(__user_rt_sigreturn)
 #endif
arch/riscv/kernel/vdso/rt_sigreturn.S +1 -1
index 0573705eac76..10438c7c626a 100644
@@ -11,6 +11,6 @@ ENTRY(__vdso_rt_sigreturn)
 	.cfi_startproc
 	.cfi_signal_frame
 	li a7, __NR_rt_sigreturn
-	scall
+	ecall
 	.cfi_endproc
 ENDPROC(__vdso_rt_sigreturn)
Signature · 1 line
2.40.0.634.g4ca3ef3211-goog
#1 lore raw
Quoted 44 lines · Fangrui Song

scall is a deprecated alias for ecall. ecall is used in several places, so there is no assembler compatibility concern.

---
 arch/riscv/kernel/entry.S             | 4 ++--
 arch/riscv/kernel/vdso/rt_sigreturn.S | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/riscv/kernel/entry.S +2 -2
index 99d38fdf8b18..2f51935612d1 100644
@@ -191,7 +191,7 @@ handle_syscall:
        REG_S a0, PT_ORIG_A0(sp)
        /*
         * Advance SEPC to avoid executing the original
-        * scall instruction on sret
+        * ecall instruction on sret
         */
        addi s2, s2, 0x4
        REG_S s2, PT_EPC(sp)
@@ -603,6 +603,6 @@ END(excp_vect_table)
 #ifndef CONFIG_MMU
 ENTRY(__user_rt_sigreturn)
        li a7, __NR_rt_sigreturn
-       scall
+       ecall
 END(__user_rt_sigreturn)
 #endif
arch/riscv/kernel/vdso/rt_sigreturn.S +1 -2
index 0573705eac76..10438c7c626a 100644
@@ -11,6 +11,6 @@ ENTRY(__vdso_rt_sigreturn)
        .cfi_startproc
        .cfi_signal_frame
        li a7, __NR_rt_sigreturn
-       scall
+       ecall
        .cfi_endproc
 ENDPROC(__vdso_rt_sigreturn)
--
Quoted 2 lines

2.40.0.634.g4ca3ef3211-goog

Ping:)

Signature · 1 line
宋方睿
#2 lore raw
Quoted 52 lines · Fangrui Song
Quoted 44 lines · Fangrui Song

scall is a deprecated alias for ecall. ecall is used in several places, so there is no assembler compatibility concern.

---
 arch/riscv/kernel/entry.S             | 4 ++--
 arch/riscv/kernel/vdso/rt_sigreturn.S | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/riscv/kernel/entry.S +2 -2
index 99d38fdf8b18..2f51935612d1 100644
@@ -191,7 +191,7 @@ handle_syscall:
        REG_S a0, PT_ORIG_A0(sp)
        /*
         * Advance SEPC to avoid executing the original
-        * scall instruction on sret
+        * ecall instruction on sret
         */
        addi s2, s2, 0x4
        REG_S s2, PT_EPC(sp)
@@ -603,6 +603,6 @@ END(excp_vect_table)
 #ifndef CONFIG_MMU
 ENTRY(__user_rt_sigreturn)
        li a7, __NR_rt_sigreturn
-       scall
+       ecall
 END(__user_rt_sigreturn)
 #endif
arch/riscv/kernel/vdso/rt_sigreturn.S +1 -2
index 0573705eac76..10438c7c626a 100644
@@ -11,6 +11,6 @@ ENTRY(__vdso_rt_sigreturn)
        .cfi_startproc
        .cfi_signal_frame
        li a7, __NR_rt_sigreturn
-       scall
+       ecall
        .cfi_endproc
 ENDPROC(__vdso_rt_sigreturn)
--
Quoted 2 lines

2.40.0.634.g4ca3ef3211-goog

Ping:)

Quoted 2 lines

--
宋方睿

Ping^2 :)

maintainer
#3 lore raw
Quoted 53 lines · On Tue, 13 Jun 2023 14:51:56 PDT (-0700), [email protected] wrote:
Quoted 52 lines · Fangrui Song
Quoted 44 lines · Fangrui Song

scall is a deprecated alias for ecall. ecall is used in several places, so there is no assembler compatibility concern.

---
 arch/riscv/kernel/entry.S             | 4 ++--
 arch/riscv/kernel/vdso/rt_sigreturn.S | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/riscv/kernel/entry.S +2 -2
index 99d38fdf8b18..2f51935612d1 100644
@@ -191,7 +191,7 @@ handle_syscall:
        REG_S a0, PT_ORIG_A0(sp)
        /*
         * Advance SEPC to avoid executing the original
-        * scall instruction on sret
+        * ecall instruction on sret
         */
        addi s2, s2, 0x4
        REG_S s2, PT_EPC(sp)
@@ -603,6 +603,6 @@ END(excp_vect_table)
 #ifndef CONFIG_MMU
 ENTRY(__user_rt_sigreturn)
        li a7, __NR_rt_sigreturn
-       scall
+       ecall
 END(__user_rt_sigreturn)
 #endif
arch/riscv/kernel/vdso/rt_sigreturn.S +1 -2
index 0573705eac76..10438c7c626a 100644
@@ -11,6 +11,6 @@ ENTRY(__vdso_rt_sigreturn)
        .cfi_startproc
        .cfi_signal_frame
        li a7, __NR_rt_sigreturn
-       scall
+       ecall
        .cfi_endproc
 ENDPROC(__vdso_rt_sigreturn)
--
Quoted 2 lines

2.40.0.634.g4ca3ef3211-goog

Ping:)

Quoted 4 lines
Quoted 2 lines

--
宋方睿

Ping^2 :)

Sorry this took a while, I had to fix up some merge issues but I think it's OK. Should be on for-next now.

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

#4 lore raw
In reply to Fangrui Song
This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Quoted 8 lines · On Sun, 23 Apr 2023 22:32:10 +0000 you wrote:

scall is a deprecated alias for ecall. ecall is used in several places, so there is no assembler compatibility concern.

---
 arch/riscv/kernel/entry.S             | 4 ++--
 arch/riscv/kernel/vdso/rt_sigreturn.S | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Here is the summary with links:
- riscv: replace deprecated scall with ecall

    https://git.kernel.org/riscv/c/4681dacadeef

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html