public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] riscv: Rework the arch_kgdb_breakpoint() implementation
@ 2025-04-11  7:29 WangYuli
  2025-04-11  7:32 ` [PATCH v4 1/2] riscv: KGDB: Do not inline arch_kgdb_breakpoint() WangYuli
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: WangYuli @ 2025-04-11  7:29 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou, alex
  Cc: wangyuli, chenhuacai, linux-riscv, linux-kernel, vincent.chen,
	palmerdabbelt, samuel.holland, zhanjun, niecheng1, guanwentao

1. The arch_kgdb_breakpoint() function defines the kgdb_compiled_break
   symbol using inline assembly.
    
   There's a potential issue where the compiler might inline
   arch_kgdb_breakpoint(), which would then define the kgdb_compiled_break
   symbol multiple times, leading to fail to link vmlinux.o.
    
   This isn't merely a potential compilation problem. The intent here
   is to determine the global symbol address of kgdb_compiled_break,
   and if this function is inlined multiple times, it would logically
   be a grave error.

2. Remove ".option norvc/.option rvc" to fix a bug that the C extension
   would unconditionally enable even if the kernel is being built with
   CONFIG_RISCV_ISA_C=n.

WangYuli (2):
  riscv: KGDB: Do not inline arch_kgdb_breakpoint()
  riscv: KGDB: Remove ".option norvc/.option rvc" for
    kgdb_compiled_break

 arch/riscv/include/asm/kgdb.h | 9 +--------
 arch/riscv/kernel/kgdb.c      | 6 ++++++
 2 files changed, 7 insertions(+), 8 deletions(-)

-- 
2.49.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-16 18:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-11  7:29 [PATCH v4 0/2] riscv: Rework the arch_kgdb_breakpoint() implementation WangYuli
2025-04-11  7:32 ` [PATCH v4 1/2] riscv: KGDB: Do not inline arch_kgdb_breakpoint() WangYuli
2025-04-11  7:32 ` [PATCH v4 2/2] riscv: KGDB: Remove ".option norvc/.option rvc" for kgdb_compiled_break WangYuli
2025-04-16 18:42 ` [PATCH v4 0/2] riscv: Rework the arch_kgdb_breakpoint() implementation patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox