public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: guoren@kernel.org
To: chenhuacai@kernel.org, kernel@xen0n.name, zhangqing@loongson.cn,
	arnd@arndb.de, linux-arch@vger.kernel.org, mark.rutland@arm.com,
	frederic@kernel.org
Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org,
	jiaxun.yang@flygoat.com, yangtiezhu@loongson.cn,
	Guo Ren <guoren@linux.alibaba.com>, Guo Ren <guoren@kernel.org>
Subject: [RESEND PATCH] loongarch: irq: Move to generic_handle_arch_irq
Date: Sat, 13 Aug 2022 05:02:40 -0400	[thread overview]
Message-ID: <20220813090240.60481-1-guoren@kernel.org> (raw)

From: Guo Ren <guoren@linux.alibaba.com>

No reason to keep handle_loongarch_irq, and move to the generic one. The
patch also fixup HAVE_CONTEXT_TRACKING_USER feature because
handle_loongarch_irq missed ct_irq_enter/exit.

Fixes: 0603839b18f4 ("LoongArch: Add exception/interrupt handling")
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
---
 arch/loongarch/kernel/traps.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/arch/loongarch/kernel/traps.c b/arch/loongarch/kernel/traps.c
index aa1c95aaf595..06211640ba1f 100644
--- a/arch/loongarch/kernel/traps.c
+++ b/arch/loongarch/kernel/traps.c
@@ -588,17 +588,6 @@ asmlinkage void cache_parity_error(void)
 	panic("Can't handle the cache error!");
 }
 
-asmlinkage void noinstr handle_loongarch_irq(struct pt_regs *regs)
-{
-	struct pt_regs *old_regs;
-
-	irq_enter_rcu();
-	old_regs = set_irq_regs(regs);
-	handle_arch_irq(regs);
-	set_irq_regs(old_regs);
-	irq_exit_rcu();
-}
-
 asmlinkage void noinstr do_vint(struct pt_regs *regs, unsigned long sp)
 {
 	register int cpu;
@@ -608,7 +597,7 @@ asmlinkage void noinstr do_vint(struct pt_regs *regs, unsigned long sp)
 	cpu = smp_processor_id();
 
 	if (on_irq_stack(cpu, sp))
-		handle_loongarch_irq(regs);
+		generic_handle_arch_irq(regs);
 	else {
 		stack = per_cpu(irq_stack, cpu) + IRQ_STACK_START;
 
@@ -619,7 +608,7 @@ asmlinkage void noinstr do_vint(struct pt_regs *regs, unsigned long sp)
 		"move	$s0, $sp		\n" /* Preserve sp */
 		"move	$sp, %[stk]		\n" /* Switch stack */
 		"move	$a0, %[regs]		\n"
-		"bl	handle_loongarch_irq	\n"
+		"bl	generic_handle_arch_irq	\n"
 		"move	$sp, $s0		\n" /* Restore sp */
 		: /* No outputs */
 		: [stk] "r" (stack), [regs] "r" (regs)
-- 
2.36.1


                 reply	other threads:[~2022-08-13  9:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220813090240.60481-1-guoren@kernel.org \
    --to=guoren@kernel.org \
    --cc=arnd@arndb.de \
    --cc=chenhuacai@kernel.org \
    --cc=frederic@kernel.org \
    --cc=guoren@linux.alibaba.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kernel@xen0n.name \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=yangtiezhu@loongson.cn \
    --cc=zhangqing@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox