All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jisheng Zhang <jszhang@kernel.org>
To: Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Charlie Jenkins <charlie@rivosinc.com>,
	Deepak Gupta <debug@rivosinc.com>,
	Clement Leger <cleger@rivosinc.com>
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/7] riscv: traps: staticalize handle_break()
Date: Sun, 21 Jul 2024 01:12:26 +0800	[thread overview]
Message-ID: <20240720171232.1753-2-jszhang@kernel.org> (raw)
In-Reply-To: <20240720171232.1753-1-jszhang@kernel.org>

handle_break() is only called in traps.c, make it static.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 arch/riscv/include/asm/entry-common.h | 1 -
 arch/riscv/kernel/traps.c             | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/riscv/include/asm/entry-common.h b/arch/riscv/include/asm/entry-common.h
index 2293e535f865..1458a41c6536 100644
--- a/arch/riscv/include/asm/entry-common.h
+++ b/arch/riscv/include/asm/entry-common.h
@@ -23,7 +23,6 @@ static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs,
 #define arch_exit_to_user_mode_prepare arch_exit_to_user_mode_prepare
 
 void handle_page_fault(struct pt_regs *regs);
-void handle_break(struct pt_regs *regs);
 
 #ifdef CONFIG_RISCV_MISALIGNED
 int handle_misaligned_load(struct pt_regs *regs);
diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c
index 05a16b1f0aee..84dff89f435d 100644
--- a/arch/riscv/kernel/traps.c
+++ b/arch/riscv/kernel/traps.c
@@ -270,7 +270,7 @@ static bool probe_breakpoint_handler(struct pt_regs *regs)
 	return user ? uprobe_breakpoint_handler(regs) : kprobe_breakpoint_handler(regs);
 }
 
-void handle_break(struct pt_regs *regs)
+static void handle_break(struct pt_regs *regs)
 {
 	if (probe_single_step_handler(regs))
 		return;
-- 
2.43.0


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

WARNING: multiple messages have this Message-ID (diff)
From: Jisheng Zhang <jszhang@kernel.org>
To: Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Charlie Jenkins <charlie@rivosinc.com>,
	Deepak Gupta <debug@rivosinc.com>,
	Clement Leger <cleger@rivosinc.com>
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/7] riscv: traps: staticalize handle_break()
Date: Sun, 21 Jul 2024 01:12:26 +0800	[thread overview]
Message-ID: <20240720171232.1753-2-jszhang@kernel.org> (raw)
In-Reply-To: <20240720171232.1753-1-jszhang@kernel.org>

handle_break() is only called in traps.c, make it static.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 arch/riscv/include/asm/entry-common.h | 1 -
 arch/riscv/kernel/traps.c             | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/riscv/include/asm/entry-common.h b/arch/riscv/include/asm/entry-common.h
index 2293e535f865..1458a41c6536 100644
--- a/arch/riscv/include/asm/entry-common.h
+++ b/arch/riscv/include/asm/entry-common.h
@@ -23,7 +23,6 @@ static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs,
 #define arch_exit_to_user_mode_prepare arch_exit_to_user_mode_prepare
 
 void handle_page_fault(struct pt_regs *regs);
-void handle_break(struct pt_regs *regs);
 
 #ifdef CONFIG_RISCV_MISALIGNED
 int handle_misaligned_load(struct pt_regs *regs);
diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c
index 05a16b1f0aee..84dff89f435d 100644
--- a/arch/riscv/kernel/traps.c
+++ b/arch/riscv/kernel/traps.c
@@ -270,7 +270,7 @@ static bool probe_breakpoint_handler(struct pt_regs *regs)
 	return user ? uprobe_breakpoint_handler(regs) : kprobe_breakpoint_handler(regs);
 }
 
-void handle_break(struct pt_regs *regs)
+static void handle_break(struct pt_regs *regs)
 {
 	if (probe_single_step_handler(regs))
 		return;
-- 
2.43.0


  reply	other threads:[~2024-07-20 17:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-20 17:12 [PATCH v2 0/7] riscv: convert bottom half of exception handling to C Jisheng Zhang
2024-07-20 17:12 ` Jisheng Zhang
2024-07-20 17:12 ` Jisheng Zhang [this message]
2024-07-20 17:12   ` [PATCH v2 1/7] riscv: traps: staticalize handle_break() Jisheng Zhang
2024-07-20 17:12 ` [PATCH v2 2/7] riscv: traps: remove __visible annotation Jisheng Zhang
2024-07-20 17:12   ` Jisheng Zhang
2024-07-20 17:12 ` [PATCH v2 3/7] riscv: convert bottom half of exception handling to C Jisheng Zhang
2024-07-20 17:12   ` Jisheng Zhang
2024-11-26  0:08   ` Deepak Gupta
2024-11-26  0:08     ` Deepak Gupta
2024-07-20 17:12 ` [PATCH v2 4/7] riscv: errata: remove ALT_INSN_FAULT and ALT_PAGE_FAULT Jisheng Zhang
2024-07-20 17:12   ` Jisheng Zhang
2024-07-20 17:12 ` [PATCH v2 5/7] riscv: errata: sifive: remove NOMMU handling Jisheng Zhang
2024-07-20 17:12   ` Jisheng Zhang
2024-07-20 17:12 ` [PATCH v2 6/7] riscv: staticalize and remove asmlinkage from updated functions Jisheng Zhang
2024-07-20 17:12   ` Jisheng Zhang
2024-07-20 17:12 ` [PATCH v2 7/7] riscv: traps: mark do_irq() as __always_inline Jisheng Zhang
2024-07-20 17:12   ` Jisheng Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240720171232.1753-2-jszhang@kernel.org \
    --to=jszhang@kernel.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=charlie@rivosinc.com \
    --cc=cleger@rivosinc.com \
    --cc=debug@rivosinc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.