Skip to contentSkip to conversation

riscv: select ARCH_USE_SYM_ANNOTATIONS

PATCH Superseded Jisheng Zhang 2 participants 3 messages Jul 5, 2024 – Jul 8, 2024 RISC-V

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: select ARCH_USE_SYM_ANNOTATIONS

After commit 76329c693924 ("riscv: Use SYM_*() assembly macros instead of deprecated ones"), riscv has been 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
index 0525ee2d63c7..c51b32a8ddff 100644
@@ -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
#1 lore raw
Quoted 5 lines · Jisheng Zhang

After commit 76329c693924 ("riscv: Use SYM_*() assembly macros instead of deprecated ones"), riscv has been 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.

Hi Jisheng,

On which branch/series is it based ? I tried it and it fails on errata_cip-435.s which still contains some uses of ENTRY():

ENTRY(sifive_cip_453_page_fault_trp)

Thanks,

Clément

Quoted 18 lines
---
 arch/riscv/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/riscv/Kconfig +1 -0
index 0525ee2d63c7..c51b32a8ddff 100644
@@ -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
#2 lore raw
Quoted 10 lines · Clément Léger
Quoted 5 lines · Jisheng Zhang

After commit 76329c693924 ("riscv: Use SYM_*() assembly macros instead of deprecated ones"), riscv has been 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.

Hi Jisheng,

Hi Clément,

Quoted 5 lines

On which branch/series is it based ? I tried it and it fails on errata_cip-435.s which still contains some uses of ENTRY():

ENTRY(sifive_cip_453_page_fault_trp)

aha, I see what happened. I did some asm -> c convesion [1] two weeks ago. I also converted the sifive_cip_453_page_fault_trp etc. to c as well, but I decided to not bring too many changes in the last minute, so the last patch wasn't sent out, but it's in my repo ;)

I will send out v2 soon. Thank you so much!

Quoted 23 lines

Thanks,

Clément

Quoted 18 lines
---
 arch/riscv/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/riscv/Kconfig +1 -0
index 0525ee2d63c7..c51b32a8ddff 100644
@@ -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