linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Marc Zyngier <maz@kernel.org>,
	Sander Vanheule <sander@svanheule.net>,
	Aleksander Jan Bajkowski <olek2@wp.pl>,
	Hauke Mehrtens <hauke@hauke-m.de>,
	git@birger-koblitz.de, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: smp-mt: enable all hardware interrupts on second VPE
Date: Thu, 7 Jul 2022 12:06:30 +0200	[thread overview]
Message-ID: <20220707100630.GC9894@alpha.franken.de> (raw)
In-Reply-To: <CAFBinCAsj=RNvitj2tXJU6pTLSbanRXdKM9H4vyF=N9N=PP06g@mail.gmail.com>

On Wed, Jul 06, 2022 at 11:56:47AM +0200, Martin Blumenstingl wrote:
> Without this patch all interrupts are fine on VPE 0 and with SMP disabled.

I fully understand the problem. But not everybody uses this interrupt
setup, so changing generic code will have effects there too.

> - why can MIPS CPU interrupt 6 and 7 be enabled unconditionally while
> 2-5 cannot be enabled unconditionally?

7 is timer interrupt and is usually wired for 34K cpus and 6 is
performance counter hopefully handled as well. And I agree that
this still isn't the best approach here

> - seeing that there's also a mips_gic_present() check in the opposite
> case of what Aleksander's patch modifies: does this indicate that
> unmasking CPU interrupt lines for VPE 1 is not handled by the MIPS CPU
> interrupt controller driver at all at this point (and if so: do you
> have any suggestions how to properly fix this)?

I haven't checked how GIC is integrated. Iirc it does something similair
to Lantiq's irq controller and hides all CPU internal interrupts behind
it.

So I see two solutions for your problem.

1. Add "mti,cpu-interrupt-controller" to the DT and wire it up
2. Create your own struct plat_smp_ops using vsmp_smp_ops as
   a template and overload .boot_secondary

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

  reply	other threads:[~2022-07-07 10:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-02 19:07 [PATCH] MIPS: smp-mt: enable all hardware interrupts on second VPE Aleksander Jan Bajkowski
2022-07-03 18:15 ` 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 [this message]
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=20220707100630.GC9894@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --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=maz@kernel.org \
    --cc=olek2@wp.pl \
    --cc=sander@svanheule.net \
    /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).