linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: "Michael Kelley (LINUX)" <mikelley@microsoft.com>
Cc: Randy Dunlap <rdunlap@infradead.org>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	KY Srinivasan <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	"wei.liu@kernel.org" <wei.liu@kernel.org>,
	Dexuan Cui <decui@microsoft.com>,
	"joro@8bytes.org" <joro@8bytes.org>,
	"will@kernel.org" <will@kernel.org>,
	"robin.murphy@arm.com" <robin.murphy@arm.com>,
	"samuel@sholland.org" <samuel@sholland.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>
Subject: Re: [PATCH 1/1] iommu/hyper-v: Use helper instead of directly accessing affinity
Date: Thu, 04 Aug 2022 10:03:10 +0100	[thread overview]
Message-ID: <87o7x0wfch.wl-maz@kernel.org> (raw)
In-Reply-To: <PH0PR21MB302502058A130F3529FE341DD79C9@PH0PR21MB3025.namprd21.prod.outlook.com>

On Wed, 03 Aug 2022 17:26:10 +0100,
"Michael Kelley (LINUX)" <mikelley@microsoft.com> wrote:
> 
> From: Randy Dunlap <rdunlap@infradead.org> Sent: Monday, July 25, 2022 7:39 PM
> > 
> > On 7/25/22 17:53, Michael Kelley wrote:
> > > Recent changes to solve inconsistencies in handling IRQ masks #ifdef
> > > out the affinity field in irq_common_data for non-SMP configurations.
> > > The current code in hyperv_irq_remapping_alloc() gets a compiler error
> > > in that case.
> > >
> > > Fix this by using the new irq_data_update_affinity() helper, which
> > > handles the non-SMP case correctly.
> > >
> > 
> > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > > Signed-off-by: Michael Kelley <mikelley@microsoft.com>
> > Tested-by: Randy Dunlap <rdunlap@infradead.org>
> > Acked-by: Randy Dunlap <rdunlap@infradead.org>
> > 
> > Thanks.
> > 
> > > ---
> > >  drivers/iommu/hyperv-iommu.c | 4 +---
> > >  1 file changed, 1 insertion(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/iommu/hyperv-iommu.c b/drivers/iommu/hyperv-iommu.c
> > > index 51bd66a..e190bb8 100644
> > > --- a/drivers/iommu/hyperv-iommu.c
> > > +++ b/drivers/iommu/hyperv-iommu.c
> > > @@ -68,7 +68,6 @@ static int hyperv_irq_remapping_alloc(struct irq_domain
> > *domain,
> > >  {
> > >  	struct irq_alloc_info *info = arg;
> > >  	struct irq_data *irq_data;
> > > -	struct irq_desc *desc;
> > >  	int ret = 0;
> > >
> > >  	if (!info || info->type != X86_IRQ_ALLOC_TYPE_IOAPIC || nr_irqs > 1)
> > > @@ -90,8 +89,7 @@ static int hyperv_irq_remapping_alloc(struct irq_domain *domain,
> > >  	 * Hypver-V IO APIC irq affinity should be in the scope of
> > >  	 * ioapic_max_cpumask because no irq remapping support.
> > >  	 */
> > > -	desc = irq_data_to_desc(irq_data);
> > > -	cpumask_copy(desc->irq_common_data.affinity, &ioapic_max_cpumask);
> > > +	irq_data_update_affinity(irq_data, &ioapic_max_cpumask);
> > >
> > >  	return 0;
> > >  }
> > 
> > --
> 
> Marc --
> 
> Could you pick up this patch for the 6.0 merge window?  It's a fix to a
> side effect of Samuel Holland's series to unify SMP and UP handling of
> affinity masks that went through your irq/irqchip-next tree.

Applied with a:

Fixes: aa0813581b8d ("genirq: Provide an IRQ affinity mask in non-SMP configs")

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2022-08-04  9:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26  0:53 [PATCH 1/1] iommu/hyper-v: Use helper instead of directly accessing affinity Michael Kelley
2022-07-26  2:39 ` Randy Dunlap
2022-07-26  3:34   ` Michael Kelley (LINUX)
2022-08-03 16:26   ` Michael Kelley (LINUX)
2022-08-04  9:03     ` Marc Zyngier [this message]
2022-07-26  7:15 ` Joerg Roedel
2022-07-26 13:09   ` Wei Liu
2022-07-26 13:48     ` Michael Kelley (LINUX)
2022-07-26 14:38       ` Wei Liu

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=87o7x0wfch.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=rdunlap@infradead.org \
    --cc=robin.murphy@arm.com \
    --cc=samuel@sholland.org \
    --cc=sthemmin@microsoft.com \
    --cc=wei.liu@kernel.org \
    --cc=will@kernel.org \
    /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).