lkml.org 
[lkml]   [2022]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: PCI MSI issue for maxcpus=1
Thanks, Marc! That solved the issue on our end as well.

On Mon, Mar 7, 2022 at 6:03 AM Marc Zyngier <maz@kernel.org> wrote:
>
> On Mon, 07 Mar 2022 14:01:02 +0000,
> Marc Zyngier <maz@kernel.org> wrote:
> >
> > Hi John,
> >
> > On Mon, 07 Mar 2022 13:48:11 +0000,
> > John Garry <john.garry@huawei.com> wrote:
> > >
> > > Hi Marc,
> > >
> > > >
> > > > diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
> > > > index 2bdfce5edafd..97e9eb9aecc6 100644
> > > > --- a/kernel/irq/msi.c
> > > > +++ b/kernel/irq/msi.c
> > > > @@ -823,6 +823,19 @@ static int msi_init_virq(struct irq_domain *domain, int virq, unsigned int vflag
> > > > if (!(vflags & VIRQ_ACTIVATE))
> > > > return 0;
> > > > + if (!(vflags & VIRQ_CAN_RESERVE)) {
> > > > + /*
> > > > + * If the interrupt is managed but no CPU is available
> > > > + * to service it, shut it down until better times.
> > > > + */
> > > > + if (irqd_affinity_is_managed(irqd) &&
> > > > + !cpumask_intersects(irq_data_get_affinity_mask(irqd),
> > > > + cpu_online_mask)) {
> > > > + irqd_set_managed_shutdown(irqd);
> > > > + return 0;
> > > > + }
> > > > + }
> > > > +
> > > > ret = irq_domain_activate_irq(irqd, vflags & VIRQ_CAN_RESERVE);
> > > > if (ret)
> > > > return ret;
> > > >
> > >
> > > Yeah, that seems to solve the issue. I will test it a bit more.
> >
> > Thanks. For the record, I have pushed a branch at [1]. The patch is
> > extremely similar, just moved up a tiny bit to avoid duplicating the
> > !VIRQ_CAN_RESERVE case.
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=irq/msi-shutdown-on-init
>
> --
> Without deviation from the norm, progress is not possible.

\
 
 \ /
  Last update: 2022-03-08 02:40    [W:0.029 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site