linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: John Garry <john.garry@huawei.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	chenxiang <chenxiang66@hisilicon.com>,
	Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"liuqi (BA)" <liuqi115@huawei.com>, <wangxiongfeng2@huawei.com>,
	David Decotigny <decot@google.com>
Subject: Re: PCI MSI issue for maxcpus=1
Date: Mon, 07 Mar 2022 14:03:17 +0000	[thread overview]
Message-ID: <878rtl272y.wl-maz@kernel.org> (raw)
In-Reply-To: <87a6e1276p.wl-maz@kernel.org>

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.

  reply	other threads:[~2022-03-07 14:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 11:23 PCI MSI issue for maxcpus=1 John Garry
2022-01-06 15:49 ` Marc Zyngier
2022-01-07 11:24   ` John Garry
2022-01-16 12:07     ` Marc Zyngier
2022-01-17  9:14       ` Marc Zyngier
2022-01-17 11:59         ` John Garry
2022-01-24 11:22           ` Marc Zyngier
2022-03-04 12:53           ` John Garry
2022-03-05 15:40             ` Marc Zyngier
2022-03-07 13:48               ` John Garry
2022-03-07 14:01                 ` Marc Zyngier
2022-03-07 14:03                   ` Marc Zyngier [this message]
2022-03-08  1:37                     ` David Decotigny
2022-03-08  3:57                 ` Xiongfeng Wang
     [not found]                   ` <87zgm0zfw7.wl-maz@kernel.org>
2022-03-10  3:19                     ` Xiongfeng Wang
     [not found]                       ` <87o82eyxmz.wl-maz@kernel.org>
2022-03-10 12:58                         ` Xiongfeng Wang

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=878rtl272y.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=chenxiang66@hisilicon.com \
    --cc=decot@google.com \
    --cc=john.garry@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuqi115@huawei.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=tglx@linutronix.de \
    --cc=wangxiongfeng2@huawei.com \
    /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).