diff mbox series

irqchip/riscv-intc: Remove asmlinkage

Message ID 20240614151955.1949-1-jszhang@kernel.org (mailing list archive)
State Accepted
Commit 96333a020615b44dde9c960d7b2c64565f584a91
Headers show
Series irqchip/riscv-intc: Remove asmlinkage | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR success PR summary
conchuod/patch-1-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh
conchuod/patch-1-test-2 success .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh
conchuod/patch-1-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh
conchuod/patch-1-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh
conchuod/patch-1-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh
conchuod/patch-1-test-6 success .github/scripts/patches/tests/checkpatch.sh
conchuod/patch-1-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh
conchuod/patch-1-test-8 success .github/scripts/patches/tests/header_inline.sh
conchuod/patch-1-test-9 success .github/scripts/patches/tests/kdoc.sh
conchuod/patch-1-test-10 success .github/scripts/patches/tests/module_param.sh
conchuod/patch-1-test-11 success .github/scripts/patches/tests/verify_fixes.sh
conchuod/patch-1-test-12 success .github/scripts/patches/tests/verify_signedoff.sh

Commit Message

Jisheng Zhang June 14, 2024, 3:19 p.m. UTC
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(-)

Comments

Anup Patel June 14, 2024, 4:32 p.m. UTC | #1
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
patchwork-bot+linux-riscv@kernel.org July 25, 2024, 1:20 p.m. UTC | #2
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!
Thomas Gleixner July 26, 2024, 11:12 a.m. UTC | #3
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")
diff mbox series

Patch

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;