lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 7 Jul 2022 14:57:15 +0200
From:   Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc:     Marc Zyngier <maz@...nel.org>,
        Sander Vanheule <sander@...nheule.net>,
        Aleksander Jan Bajkowski <olek2@...pl>,
        Hauke Mehrtens <hauke@...ke-m.de>, git@...ger-koblitz.de,
        linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] MIPS: smp-mt: enable all hardware interrupts on second VPE

On Thu, Jul 7, 2022 at 12:11 PM Thomas Bogendoerfer
<tsbogend@...ha.franken.de> wrote:
[...]
> > - 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
Thanks for this explanation!

> > - 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
I think this is the preferred way. I tried this before (if you are
curious, see [0] and [1]) and it didn't work.
Are you aware of any MIPS SoC with upstream drivers which do have
working IRQs on VPE 1? Or can you point me to the code in
drivers/irqchip/irq-mips-cpu.c that's responsible for enabling the
interrupts on VPE 1 (is it simply unmask_mips_irq)?

> 2. Create your own struct plat_smp_ops using vsmp_smp_ops as
>    a template and overload .boot_secondary
This would work, but: personally I would like to remove as much Lantiq
platform specific code as possible so it's easier to maintain.


Best regards,
Martin


[0] https://github.com/xdarklight/linux/commit/0e5a5dda0e999a3a2e5a81324fef15405d8c6b4a
[1] https://github.com/xdarklight/linux/commit/97ec4689d2016606442577988d28fef6728c3bbf

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ