riscv: select ARCH_USE_SYM_ANNOTATIONS
Subsystems (2)
v2 cover riscv: select ARCH_USE_SYM_ANNOTATIONS
commit 76329c693924 ("riscv: Use SYM_*() assembly macros instead of deprecated ones"), most riscv has been to converted the new style SYM_ assembler annotations. The remaining one is sifive's errata_cip_453.S, so convert to new style SYM_ annotations as well. After that select ARCH_USE_SYM_ANNOTATIONS.
Since v1:
- add new patch to convert sifive's errata_cip_453.S, thank Clément
- update patch2 commit msg
Jisheng Zhang (2):
riscv: errata: sifive: Use SYM_*() assembly macros
riscv: select ARCH_USE_SYM_ANNOTATIONS
arch/riscv/Kconfig | 1 + arch/riscv/errata/sifive/errata_cip_453.S | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-)
Signature · 1 line
2.43.0
PATCH v2 1/2 riscv: errata: sifive: Use SYM_*() assembly macros
ENTRY()/END() macros are deprecated and we should make use of the new SYM_*() macros [1] for better annotation of symbols. Replace the deprecated ones with the new ones.
[1] https://docs.kernel.org/core-api/asm-annotations.html
--- arch/riscv/errata/sifive/errata_cip_453.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/riscv/errata/sifive/errata_cip_453.S +4 -4
@@ -21,7 +21,7 @@ 1: .endm -ENTRY(sifive_cip_453_page_fault_trp) +SYM_FUNC_START(sifive_cip_453_page_fault_trp) ADD_SIGN_EXT a0, t0, t1 #ifdef CONFIG_MMU la t0, do_page_fault
@@ -29,10 +29,10 @@ ENTRY(sifive_cip_453_page_fault_trp) la t0, do_trap_unknown #endif jr t0 -END(sifive_cip_453_page_fault_trp) +SYM_FUNC_END(sifive_cip_453_page_fault_trp) -ENTRY(sifive_cip_453_insn_fault_trp) +SYM_FUNC_START(sifive_cip_453_insn_fault_trp) ADD_SIGN_EXT a0, t0, t1 la t0, do_trap_insn_fault jr t0 -END(sifive_cip_453_insn_fault_trp) +SYM_FUNC_END(sifive_cip_453_insn_fault_trp)
Signature · 1 line
2.43.0
Re: [PATCH v2 1/2] riscv: errata: sifive: Use SYM_*() assembly macros
Quoted 28 lines · Jisheng Zhang
ENTRY()/END() macros are deprecated and we should make use of the new SYM_*() macros [1] for better annotation of symbols. Replace the deprecated ones with the new ones.
[1] https://docs.kernel.org/core-api/asm-annotations.html
Signed-off-by Jisheng Zhang <[email protected]>--- arch/riscv/errata/sifive/errata_cip_453.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)arch/riscv/errata/sifive/errata_cip_453.S +1
-1@@ -21,7 +21,7 @@ 1: .endm -ENTRY(sifive_cip_453_page_fault_trp) +SYM_FUNC_START(sifive_cip_453_page_fault_trp) ADD_SIGN_EXT a0, t0, t1 #ifdef CONFIG_MMU la t0, do_page_fault@@ -29,10 +29,10 @@ ENTRY(sifive_cip_453_page_fault_trp) la t0, do_trap_unknown #endif jr t0
arch/riscv/errata/sifive/errata_cip_453.S ENTRY(sifive_cip_453_page_fault_trp) · line 38
Quoted 10 lines
arch/riscv/errata/sifive/errata_cip_453.S +3
-3-END(sifive_cip_453_page_fault_trp) +SYM_FUNC_END(sifive_cip_453_page_fault_trp) -ENTRY(sifive_cip_453_insn_fault_trp) +SYM_FUNC_START(sifive_cip_453_insn_fault_trp) ADD_SIGN_EXT a0, t0, t1 la t0, do_trap_insn_fault jr t0 -END(sifive_cip_453_insn_fault_trp) +SYM_FUNC_END(sifive_cip_453_insn_fault_trp)
Hi Jisheng,
Thanks !
Clément
PATCH v2 2/2 riscv: select ARCH_USE_SYM_ANNOTATIONS
In reply to Jisheng ZhangNow, riscv has been converted to the new style SYM_ assembler annotations. So select ARCH_USE_SYM_ANNOTATIONS to ensure the deprecated macros such as ENTRY(), END(), WEAK() and so on are not available and we don't regress.
--- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/riscv/Kconfig +1 -0
@@ -62,6 +62,7 @@ config RISCV select ARCH_USE_CMPXCHG_LOCKREF if 64BIT select ARCH_USE_MEMTEST select ARCH_USE_QUEUED_RWLOCKS + select ARCH_USE_SYM_ANNOTATIONS select ARCH_USES_CFI_TRAPS if CFI_CLANG select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH if MMU select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
Signature · 1 line
2.43.0
Quoted 15 lines · Jisheng Zhang
Now, riscv has been converted to the new style
SYM_assembler annotations. So selectARCH_USE_SYM_ANNOTATIONSto ensure the deprecated macros such asENTRY(),END(),WEAK()and so on are not available and we don't regress.Signed-off-by Jisheng Zhang <[email protected]>--- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/riscv/Kconfig +0
-0
arch/riscv/Kconfig config RISCV · line 68
Quoted 7 lines
arch/riscv/Kconfig +1
-0@@ -62,6 +62,7 @@ config RISCV select ARCH_USE_CMPXCHG_LOCKREF if 64BIT select ARCH_USE_MEMTEST select ARCH_USE_QUEUED_RWLOCKS + select ARCH_USE_SYM_ANNOTATIONS select ARCH_USES_CFI_TRAPS if CFI_CLANG select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH if MMU select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
Hi Jisheng,
It now compiles with the previous patch (using the defconfig).
Thanks !
Clément
This series was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:
Hello:
This series was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:
Quoted 8 lines · On Wed, 10 Jul 2024 00:05:20 +0800 you wrote:
commit
76329c693924("riscv: Use SYM_*() assembly macros instead of deprecated ones"), most riscv has been to converted the new styleSYM_assembler annotations. The remaining one is sifive'serrata_cip_453.S, so convert to new styleSYM_annotations as well. After that selectARCH_USE_SYM_ANNOTATIONS.[...]
Here is the summary with links:
- [v2,1/2] riscv: errata: sifive: Use SYM_*() assembly macros
https://git.kernel.org/riscv/c/6868d12e0205 - [v2,2/2] riscv: select ARCH_USE_SYM_ANNOTATIONS https://git.kernel.org/riscv/c/7c9d980e4670
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html