lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAhSdy0b16f8JAZ3r=drSuRA+hmWfGgAcX_scnH+=OOaaUh+dw@mail.gmail.com>
Date: Fri, 14 Jun 2024 22:02:54 +0530
From: Anup Patel <anup@...infault.org>
To: Jisheng Zhang <jszhang@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, Paul Walmsley <paul.walmsley@...ive.com>, 
	Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>, 
	linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] irqchip/riscv-intc: Remove asmlinkage

On Fri, Jun 14, 2024 at 9:03 PM Jisheng Zhang <jszhang@...nel.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@...nel.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@...infault.org>

Regards,
Anup

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ