lkml.org 
[lkml]   [2020]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 5/6] RISC-V: Remove do_IRQ() function
On Thu, May 21, 2020 at 6:34 AM Anup Patel <anup.patel@wdc.com> wrote:
>
> The only thing do_IRQ() does is call handle_arch_irq function
> pointer. We can very well call handle_arch_irq function pointer
> directly from assembly and remove do_IRQ() function hence this
> patch.
>
> Signed-off-by: Anup Patel <anup.patel@wdc.com>
> ---
> arch/riscv/kernel/entry.S | 4 +++-
> arch/riscv/kernel/irq.c | 6 ------
> 2 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S
> index 56d071b2c0a1..cae7e6d4c7ef 100644
> --- a/arch/riscv/kernel/entry.S
> +++ b/arch/riscv/kernel/entry.S
> @@ -106,7 +106,9 @@ _save_context:
>
> /* Handle interrupts */
> move a0, sp /* pt_regs */
> - tail do_IRQ
> + la a1, handle_arch_irq
> + REG_L a1, (a1)
> + jr a1
> 1:
> /*
> * Exceptions run with interrupts enabled or disabled depending on the
> diff --git a/arch/riscv/kernel/irq.c b/arch/riscv/kernel/irq.c
> index eb8777642ce6..7207fa08d78f 100644
> --- a/arch/riscv/kernel/irq.c
> +++ b/arch/riscv/kernel/irq.c
> @@ -16,12 +16,6 @@ int arch_show_interrupts(struct seq_file *p, int prec)
> return 0;
> }
>
> -asmlinkage __visible void __irq_entry do_IRQ(struct pt_regs *regs)
> -{
> - if (handle_arch_irq)
> - handle_arch_irq(regs);
> -}
> -
> void __init init_IRQ(void)
> {
> irqchip_init();
> --
> 2.25.1
>
>


Reviewed-by: Atish Patra <atish.patra@wdc.com>
--
Regards,
Atish

\
 
 \ /
  Last update: 2020-05-29 02:34    [W:0.084 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site