linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] irqchip/gic-v3: Remove asmlinkage for gic_handle_irq()
@ 2024-07-27  7:36 Jinjie Ruan
  2024-07-27  9:25 ` Thomas Gleixner
  2024-07-27  9:35 ` Marc Zyngier
  0 siblings, 2 replies; 5+ messages in thread
From: Jinjie Ruan @ 2024-07-27  7:36 UTC (permalink / raw)
  To: maz, tglx, joey.gouly, mark.rutland, will, catalin.marinas,
	linux-arm-kernel, linux-kernel
  Cc: ruanjinjie

Since commit 064dbfb41691 ("arm64: entry: convert IRQ+FIQ handlers to C"),
the gic_handle_irq() is only called by C functions, so remove
the asmlinkage.

Fixes: 064dbfb41691 ("arm64: entry: convert IRQ+FIQ handlers to C")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
 drivers/irqchip/irq-gic-v3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index c19083bfb943..0efa3443c323 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -930,7 +930,7 @@ static void __gic_handle_irq_from_irqsoff(struct pt_regs *regs)
 	__gic_handle_nmi(irqnr, regs);
 }
 
-static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
+static void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
 {
 	if (unlikely(gic_supports_nmi() && !interrupts_enabled(regs)))
 		__gic_handle_irq_from_irqsoff(regs);
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] irqchip/gic-v3: Remove asmlinkage for gic_handle_irq()
  2024-07-27  7:36 [PATCH] irqchip/gic-v3: Remove asmlinkage for gic_handle_irq() Jinjie Ruan
@ 2024-07-27  9:25 ` Thomas Gleixner
  2024-07-29  2:36   ` Jinjie Ruan
  2024-07-27  9:35 ` Marc Zyngier
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2024-07-27  9:25 UTC (permalink / raw)
  To: Jinjie Ruan, maz, joey.gouly, mark.rutland, will, catalin.marinas,
	linux-arm-kernel, linux-kernel
  Cc: ruanjinjie

On Sat, Jul 27 2024 at 15:36, Jinjie Ruan wrote:
> Since commit 064dbfb41691 ("arm64: entry: convert IRQ+FIQ handlers to C"),
> the gic_handle_irq() is only called by C functions, so remove
> the asmlinkage.
>
> Fixes: 064dbfb41691 ("arm64: entry: convert IRQ+FIQ handlers to C")
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>

Right. Can we please fix all of that and be done with it?

# git grep -l asmlinkage drivers/irqchip/ | xargs grep set_handle_irq

should find the remaining leftovers of asmlinkage.

Thanks,

        tglx


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] irqchip/gic-v3: Remove asmlinkage for gic_handle_irq()
  2024-07-27  7:36 [PATCH] irqchip/gic-v3: Remove asmlinkage for gic_handle_irq() Jinjie Ruan
  2024-07-27  9:25 ` Thomas Gleixner
@ 2024-07-27  9:35 ` Marc Zyngier
  2024-07-27  9:40   ` Marc Zyngier
  1 sibling, 1 reply; 5+ messages in thread
From: Marc Zyngier @ 2024-07-27  9:35 UTC (permalink / raw)
  To: Jinjie Ruan
  Cc: tglx, joey.gouly, mark.rutland, will, catalin.marinas,
	linux-arm-kernel, linux-kernel

On Sat, 27 Jul 2024 08:36:48 +0100,
Jinjie Ruan <ruanjinjie@huawei.com> wrote:
> 
> Since commit 064dbfb41691 ("arm64: entry: convert IRQ+FIQ handlers to C"),
> the gic_handle_irq() is only called by C functions, so remove
> the asmlinkage.

You clearly haven't looked very far.

> 
> Fixes: 064dbfb41691 ("arm64: entry: convert IRQ+FIQ handlers to C")
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> ---
>  drivers/irqchip/irq-gic-v3.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
> index c19083bfb943..0efa3443c323 100644
> --- a/drivers/irqchip/irq-gic-v3.c
> +++ b/drivers/irqchip/irq-gic-v3.c
> @@ -930,7 +930,7 @@ static void __gic_handle_irq_from_irqsoff(struct pt_regs *regs)
>  	__gic_handle_nmi(irqnr, regs);
>  }
>  
> -static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
> +static void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
>  {
>  	if (unlikely(gic_supports_nmi() && !interrupts_enabled(regs)))
>  		__gic_handle_irq_from_irqsoff(regs);

$ git grep handle_arch_irq arch/arm/
arch/arm/kernel/entry-armv.S:   bl      generic_handle_arch_irq
arch/arm/kernel/entry-armv.S:   mov_l   r0, generic_handle_arch_irq

Until someone rewrites 32bit ARM to have all of its low-level
interrupt handling in C, this stays. This has no effect on arm64
anyway.

	M.

-- 
Without deviation from the norm, progress is not possible.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] irqchip/gic-v3: Remove asmlinkage for gic_handle_irq()
  2024-07-27  9:35 ` Marc Zyngier
@ 2024-07-27  9:40   ` Marc Zyngier
  0 siblings, 0 replies; 5+ messages in thread
From: Marc Zyngier @ 2024-07-27  9:40 UTC (permalink / raw)
  To: Jinjie Ruan
  Cc: tglx, joey.gouly, mark.rutland, will, catalin.marinas,
	linux-arm-kernel, linux-kernel

On Sat, 27 Jul 2024 10:35:45 +0100,
Marc Zyngier <maz@kernel.org> wrote:
> 
> On Sat, 27 Jul 2024 08:36:48 +0100,
> Jinjie Ruan <ruanjinjie@huawei.com> wrote:
> > 
> > Since commit 064dbfb41691 ("arm64: entry: convert IRQ+FIQ handlers to C"),
> > the gic_handle_irq() is only called by C functions, so remove
> > the asmlinkage.
> 
> You clearly haven't looked very far.
> 
> > 
> > Fixes: 064dbfb41691 ("arm64: entry: convert IRQ+FIQ handlers to C")
> > Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> > ---
> >  drivers/irqchip/irq-gic-v3.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
> > index c19083bfb943..0efa3443c323 100644
> > --- a/drivers/irqchip/irq-gic-v3.c
> > +++ b/drivers/irqchip/irq-gic-v3.c
> > @@ -930,7 +930,7 @@ static void __gic_handle_irq_from_irqsoff(struct pt_regs *regs)
> >  	__gic_handle_nmi(irqnr, regs);
> >  }
> >  
> > -static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
> > +static void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
> >  {
> >  	if (unlikely(gic_supports_nmi() && !interrupts_enabled(regs)))
> >  		__gic_handle_irq_from_irqsoff(regs);
> 
> $ git grep handle_arch_irq arch/arm/
> arch/arm/kernel/entry-armv.S:   bl      generic_handle_arch_irq
> arch/arm/kernel/entry-armv.S:   mov_l   r0, generic_handle_arch_irq
> 
> Until someone rewrites 32bit ARM to have all of its low-level
> interrupt handling in C, this stays. This has no effect on arm64
> anyway.

Scratch that, I misread it. We have an indirection, so this patch is fine.

Apologies for the noise.

	M.

-- 
Without deviation from the norm, progress is not possible.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] irqchip/gic-v3: Remove asmlinkage for gic_handle_irq()
  2024-07-27  9:25 ` Thomas Gleixner
@ 2024-07-29  2:36   ` Jinjie Ruan
  0 siblings, 0 replies; 5+ messages in thread
From: Jinjie Ruan @ 2024-07-29  2:36 UTC (permalink / raw)
  To: Thomas Gleixner, maz, joey.gouly, mark.rutland, will,
	catalin.marinas, linux-arm-kernel, linux-kernel



On 2024/7/27 17:25, Thomas Gleixner wrote:
> On Sat, Jul 27 2024 at 15:36, Jinjie Ruan wrote:
>> Since commit 064dbfb41691 ("arm64: entry: convert IRQ+FIQ handlers to C"),
>> the gic_handle_irq() is only called by C functions, so remove
>> the asmlinkage.
>>
>> Fixes: 064dbfb41691 ("arm64: entry: convert IRQ+FIQ handlers to C")
>> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> 
> Right. Can we please fix all of that and be done with it?
> 
> # git grep -l asmlinkage drivers/irqchip/ | xargs grep set_handle_irq
> 
> should find the remaining leftovers of asmlinkage.

You are right,handle_arch_irq() are all only called in C now, we can all
remove the asmlinkage.

> 
> Thanks,
> 
>         tglx


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-07-29  2:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-27  7:36 [PATCH] irqchip/gic-v3: Remove asmlinkage for gic_handle_irq() Jinjie Ruan
2024-07-27  9:25 ` Thomas Gleixner
2024-07-29  2:36   ` Jinjie Ruan
2024-07-27  9:35 ` Marc Zyngier
2024-07-27  9:40   ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).