linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aleksander Jan Bajkowski <olek2@wp.pl>
To: tsbogend@alpha.franken.de, olek2@wp.pl,
	martin.blumenstingl@googlemail.com, hauke@hauke-m.de,
	git@birger-koblitz.de, sander@svanheule.net,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] MIPS: smp-mt: enable all hardware interrupts on second VPE
Date: Sat,  2 Jul 2022 21:07:05 +0200	[thread overview]
Message-ID: <20220702190705.5319-1-olek2@wp.pl> (raw)

This patch is needed to handle interrupts by the second VPE on
the Lantiq xRX200, xRX300 and xRX330 SoCs. In these chips, 32 ICU
interrupts are connected to each hardware line. The SoC supports
a total of 160 interrupts. Currently changing smp_affinity to the
second VPE hangs interrupts.

This problem affects multithreaded SoCs with a custom interrupt
controller. Chips with 1004Kc core and newer use the MIPS GIC.

Also CC'ed Birger Koblitz and Sander Vanheule. Both are working
on support for Realtek RTL930x chips with 34Kc core and Birger
has added a patch in OpenWRT that also enables all interrupt
lines. So it looks like this patch is useful for more SoCs.

Tested on lantiq xRX200 and xRX330.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
---
 arch/mips/kernel/smp-mt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index 5f04a0141068..f21cd0eb1fa7 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -113,8 +113,7 @@ static void vsmp_init_secondary(void)
 					 STATUSF_IP4 | STATUSF_IP5 |
 					 STATUSF_IP6 | STATUSF_IP7);
 	else
-		change_c0_status(ST0_IM, STATUSF_IP0 | STATUSF_IP1 |
-					 STATUSF_IP6 | STATUSF_IP7);
+		set_c0_status(ST0_IM);
 }
 
 static void vsmp_smp_finish(void)
-- 
2.30.2


             reply	other threads:[~2022-07-02 19:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-02 19:07 Aleksander Jan Bajkowski [this message]
2022-07-03 18:15 ` [PATCH] MIPS: smp-mt: enable all hardware interrupts on second VPE Sander Vanheule
2022-07-06  7:05   ` Marc Zyngier
2022-07-06  8:19     ` Thomas Bogendoerfer
2022-07-06  9:53       ` Marc Zyngier
2022-07-07  9:57         ` Thomas Bogendoerfer
2022-07-06  9:56       ` Martin Blumenstingl
2022-07-07 10:06         ` Thomas Bogendoerfer
2022-07-07 12:57           ` Martin Blumenstingl
2022-07-07 14:39             ` Thomas Bogendoerfer
2022-07-07 15:12               ` Sander Vanheule
2022-07-09 16:11                 ` Birger Koblitz
2022-07-28 15:50               ` Martin Blumenstingl
2022-08-01 15:25                 ` Thomas Bogendoerfer
2022-08-01 16:02                   ` Sander Vanheule
2022-08-02  7:15                     ` Birger Koblitz
2022-09-10 10:53               ` Aleksander Bajkowski
2022-09-12 14:02                 ` Thomas Bogendoerfer
2022-07-05 10:35 ` Thomas Bogendoerfer

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=20220702190705.5319-1-olek2@wp.pl \
    --to=olek2@wp.pl \
    --cc=git@birger-koblitz.de \
    --cc=hauke@hauke-m.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=sander@svanheule.net \
    --cc=tsbogend@alpha.franken.de \
    /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;
as well as URLs for NNTP newsgroup(s).