Skip to contentSkip to conversation

irqchip/riscv-intc: Remove asmlinkage

PATCH Applied Jisheng Zhang 5 participants 5 messages Jun 14, 2024 – Jul 26, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irqchip/riscv-intc: Remove asmlinkage

The two functions riscv_intc_aia_irq() and riscv_intc_irq() are only called by C functions.

---

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(-)
drivers/irqchip/irq-riscv-intc.c +2 -2
index 4f3a12383a1e..47f3200476da 100644
@@ -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;
 
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 45 lines · Jisheng Zhang

The two functions riscv_intc_aia_irq() and riscv_intc_irq() are only called by C functions.

---

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(-)
drivers/irqchip/irq-riscv-intc.c +2 -3
index 4f3a12383a1e..47f3200476da 100644
@@ -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;
 
--
Quoted 2 lines

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.

Regards,
Anup

merge bot Applied
#2 lore raw
In reply to Jisheng Zhang
The following commit has been merged into the irq/core branch of tip:

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 <[email protected]>
AuthorDate:    Fri, 14 Jun 2024 23:19:55 +08:00
Committer:     Thomas Gleixner <[email protected]>
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.

---
 drivers/irqchip/irq-riscv-intc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/irqchip/irq-riscv-intc.c +2 -2
index 9e71c44..983538a 100644
@@ -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;
 
#3 lore raw
In reply to Jisheng Zhang
This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Quoted 9 lines · 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.

---

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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
#4 lore raw
Quoted 2 lines · patchwork-bot

This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

It's already upstream: 722c9389c7fa ("irqchip/riscv-intc: Remove asmlinkage")