* [PATCH] irqchip/riscv-intc: Remove asmlinkage
@ 2024-06-14 15:19 Jisheng Zhang
2024-06-14 16:32 ` Anup Patel
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jisheng Zhang @ 2024-06-14 15:19 UTC (permalink / raw)
To: Anup Patel, Thomas Gleixner, Paul Walmsley, Palmer Dabbelt,
Albert Ou
Cc: linux-riscv, linux-kernel
The two functions riscv_intc_aia_irq() and riscv_intc_irq()
are only called by C functions.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
Hi riscv maintainers and all,
Related question:
I believe the asmlinkage in riscv is a nop, is it OK to
remove asmlinkage from all riscv code?
Anyway, no matter what will be the decision, it's correct to
remove asmlinkage in riscv intc driver as this patch does.
thanks
drivers/irqchip/irq-riscv-intc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-intc.c
index 4f3a12383a1e..47f3200476da 100644
--- a/drivers/irqchip/irq-riscv-intc.c
+++ b/drivers/irqchip/irq-riscv-intc.c
@@ -26,7 +26,7 @@ static unsigned int riscv_intc_nr_irqs __ro_after_init = BITS_PER_LONG;
static unsigned int riscv_intc_custom_base __ro_after_init = BITS_PER_LONG;
static unsigned int riscv_intc_custom_nr_irqs __ro_after_init;
-static asmlinkage void riscv_intc_irq(struct pt_regs *regs)
+static void riscv_intc_irq(struct pt_regs *regs)
{
unsigned long cause = regs->cause & ~CAUSE_IRQ_FLAG;
@@ -34,7 +34,7 @@ static asmlinkage void riscv_intc_irq(struct pt_regs *regs)
pr_warn_ratelimited("Failed to handle interrupt (cause: %ld)\n", cause);
}
-static asmlinkage void riscv_intc_aia_irq(struct pt_regs *regs)
+static void riscv_intc_aia_irq(struct pt_regs *regs)
{
unsigned long topi;
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] irqchip/riscv-intc: Remove asmlinkage
2024-06-14 15:19 [PATCH] irqchip/riscv-intc: Remove asmlinkage Jisheng Zhang
@ 2024-06-14 16:32 ` Anup Patel
2024-06-21 18:41 ` [tip: irq/core] " tip-bot2 for Jisheng Zhang
2024-07-25 13:20 ` [PATCH] " patchwork-bot+linux-riscv
2 siblings, 0 replies; 5+ messages in thread
From: Anup Patel @ 2024-06-14 16:32 UTC (permalink / raw)
To: Jisheng Zhang
Cc: Thomas Gleixner, Paul Walmsley, Palmer Dabbelt, Albert Ou,
linux-riscv, linux-kernel
On Fri, Jun 14, 2024 at 9:03 PM Jisheng Zhang <jszhang@kernel.org> wrote:
>
> The two functions riscv_intc_aia_irq() and riscv_intc_irq()
> are only called by C functions.
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>
> Hi riscv maintainers and all,
>
> Related question:
>
> I believe the asmlinkage in riscv is a nop, is it OK to
> remove asmlinkage from all riscv code?
>
> Anyway, no matter what will be the decision, it's correct to
> remove asmlinkage in riscv intc driver as this patch does.
>
> thanks
>
> drivers/irqchip/irq-riscv-intc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-intc.c
> index 4f3a12383a1e..47f3200476da 100644
> --- a/drivers/irqchip/irq-riscv-intc.c
> +++ b/drivers/irqchip/irq-riscv-intc.c
> @@ -26,7 +26,7 @@ static unsigned int riscv_intc_nr_irqs __ro_after_init = BITS_PER_LONG;
> static unsigned int riscv_intc_custom_base __ro_after_init = BITS_PER_LONG;
> static unsigned int riscv_intc_custom_nr_irqs __ro_after_init;
>
> -static asmlinkage void riscv_intc_irq(struct pt_regs *regs)
> +static void riscv_intc_irq(struct pt_regs *regs)
> {
> unsigned long cause = regs->cause & ~CAUSE_IRQ_FLAG;
>
> @@ -34,7 +34,7 @@ static asmlinkage void riscv_intc_irq(struct pt_regs *regs)
> pr_warn_ratelimited("Failed to handle interrupt (cause: %ld)\n", cause);
> }
>
> -static asmlinkage void riscv_intc_aia_irq(struct pt_regs *regs)
> +static void riscv_intc_aia_irq(struct pt_regs *regs)
> {
> unsigned long topi;
>
> --
> 2.43.0
>
Yes, these asmlinkage can be removed.
Previously, we used to call these handlers from low-level trap handlers
which is not true anymore.
Reviewed-by: Anup Patel <anup@brainfault.org>
Regards,
Anup
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip: irq/core] irqchip/riscv-intc: Remove asmlinkage
2024-06-14 15:19 [PATCH] irqchip/riscv-intc: Remove asmlinkage Jisheng Zhang
2024-06-14 16:32 ` Anup Patel
@ 2024-06-21 18:41 ` tip-bot2 for Jisheng Zhang
2024-07-25 13:20 ` [PATCH] " patchwork-bot+linux-riscv
2 siblings, 0 replies; 5+ messages in thread
From: tip-bot2 for Jisheng Zhang @ 2024-06-21 18:41 UTC (permalink / raw)
To: linux-tip-commits
Cc: Jisheng Zhang, Thomas Gleixner, Anup Patel, x86, linux-kernel,
maz
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 722c9389c7fa91d1b6c665252f655b352b3a32b8
Gitweb: https://git.kernel.org/tip/722c9389c7fa91d1b6c665252f655b352b3a32b8
Author: Jisheng Zhang <jszhang@kernel.org>
AuthorDate: Fri, 14 Jun 2024 23:19:55 +08:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 21 Jun 2024 20:35:24 +02:00
irqchip/riscv-intc: Remove asmlinkage
The two functions riscv_intc_aia_irq() and riscv_intc_irq()
are only called by C functions.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20240614151955.1949-1-jszhang@kernel.org
---
drivers/irqchip/irq-riscv-intc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-intc.c
index 9e71c44..983538a 100644
--- a/drivers/irqchip/irq-riscv-intc.c
+++ b/drivers/irqchip/irq-riscv-intc.c
@@ -26,7 +26,7 @@ static unsigned int riscv_intc_nr_irqs __ro_after_init = BITS_PER_LONG;
static unsigned int riscv_intc_custom_base __ro_after_init = BITS_PER_LONG;
static unsigned int riscv_intc_custom_nr_irqs __ro_after_init;
-static asmlinkage void riscv_intc_irq(struct pt_regs *regs)
+static void riscv_intc_irq(struct pt_regs *regs)
{
unsigned long cause = regs->cause & ~CAUSE_IRQ_FLAG;
@@ -34,7 +34,7 @@ static asmlinkage void riscv_intc_irq(struct pt_regs *regs)
pr_warn_ratelimited("Failed to handle interrupt (cause: %ld)\n", cause);
}
-static asmlinkage void riscv_intc_aia_irq(struct pt_regs *regs)
+static void riscv_intc_aia_irq(struct pt_regs *regs)
{
unsigned long topi;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] irqchip/riscv-intc: Remove asmlinkage
2024-06-14 15:19 [PATCH] irqchip/riscv-intc: Remove asmlinkage Jisheng Zhang
2024-06-14 16:32 ` Anup Patel
2024-06-21 18:41 ` [tip: irq/core] " tip-bot2 for Jisheng Zhang
@ 2024-07-25 13:20 ` patchwork-bot+linux-riscv
2024-07-26 11:12 ` Thomas Gleixner
2 siblings, 1 reply; 5+ messages in thread
From: patchwork-bot+linux-riscv @ 2024-07-25 13:20 UTC (permalink / raw)
To: Jisheng Zhang
Cc: linux-riscv, anup, tglx, paul.walmsley, palmer, aou, linux-kernel
Hello:
This patch was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@rivosinc.com>:
On Fri, 14 Jun 2024 23:19:55 +0800 you wrote:
> The two functions riscv_intc_aia_irq() and riscv_intc_irq()
> are only called by C functions.
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>
> Hi riscv maintainers and all,
>
> [...]
Here is the summary with links:
- irqchip/riscv-intc: Remove asmlinkage
https://git.kernel.org/riscv/c/96333a020615
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] irqchip/riscv-intc: Remove asmlinkage
2024-07-25 13:20 ` [PATCH] " patchwork-bot+linux-riscv
@ 2024-07-26 11:12 ` Thomas Gleixner
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Gleixner @ 2024-07-26 11:12 UTC (permalink / raw)
To: patchwork-bot+linux-riscv, Jisheng Zhang
Cc: linux-riscv, anup, paul.walmsley, palmer, aou, linux-kernel
On Thu, Jul 25 2024 at 13:20, patchwork-bot wrote:
> This patch was applied to riscv/linux.git (for-next)
> by Palmer Dabbelt <palmer@rivosinc.com>:
It's already upstream: 722c9389c7fa ("irqchip/riscv-intc: Remove asmlinkage")
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-07-26 11:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-14 15:19 [PATCH] irqchip/riscv-intc: Remove asmlinkage Jisheng Zhang
2024-06-14 16:32 ` Anup Patel
2024-06-21 18:41 ` [tip: irq/core] " tip-bot2 for Jisheng Zhang
2024-07-25 13:20 ` [PATCH] " patchwork-bot+linux-riscv
2024-07-26 11:12 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox