From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 031ADC19F2B for ; Thu, 4 Aug 2022 09:03:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233981AbiHDJDQ (ORCPT ); Thu, 4 Aug 2022 05:03:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237429AbiHDJDP (ORCPT ); Thu, 4 Aug 2022 05:03:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 416184D4C9; Thu, 4 Aug 2022 02:03:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C706F6155B; Thu, 4 Aug 2022 09:03:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29064C433D6; Thu, 4 Aug 2022 09:03:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659603793; bh=SivxL3skWvzw9jhqnKcu/8CxHVkrZngsEGy7QHmjwIE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VKKKZClcZEJ9Q3mSncYVDlpJDWwX5lRtpWJVA7hyjLfbZ+6VuQD0FBo6dTCyVfVwm 3Z+OPcs+kQzFAMkdB34czVDofL9lxQ3iayIdjT2p06IJtaGmFBLk82Vn7WH3HEKdI7 DNEedPtHJhb3zvI3W7kaN/jmnz9i+WlEeLTlGRAOfRZ/P/FhbyaTQ6wWNnKv8QIDDU un2vaEgq4hQ5P4lnAss5fn9MSlZ+jVo1OcYVGIhmnqmdtOZDflHdrbXY0TrmZS4/F5 kUejs6MYQKkSPwdEf5pRSqy0/QQXSonr6A7nmYvr9+iznlHJkvU7JqrLRpmP8MOhMn YiT3WcV4dxkNg== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oJWl4-000us9-Li; Thu, 04 Aug 2022 10:03:10 +0100 Date: Thu, 04 Aug 2022 10:03:10 +0100 Message-ID: <87o7x0wfch.wl-maz@kernel.org> From: Marc Zyngier To: "Michael Kelley (LINUX)" Cc: Randy Dunlap , Stephen Hemminger , KY Srinivasan , Haiyang Zhang , "wei.liu@kernel.org" , Dexuan Cui , "joro@8bytes.org" , "will@kernel.org" , "robin.murphy@arm.com" , "samuel@sholland.org" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "iommu@lists.linux.dev" Subject: Re: [PATCH 1/1] iommu/hyper-v: Use helper instead of directly accessing affinity In-Reply-To: References: <1658796820-2261-1-git-send-email-mikelley@microsoft.com> <5ea65d3d-745e-0a16-c885-a224a20ee7ce@infradead.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: mikelley@microsoft.com, rdunlap@infradead.org, sthemmin@microsoft.com, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com, samuel@sholland.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, iommu@lists.linux.dev X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@vger.kernel.org On Wed, 03 Aug 2022 17:26:10 +0100, "Michael Kelley (LINUX)" wrote: > > From: Randy Dunlap 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 > > > Signed-off-by: Michael Kelley > > Tested-by: Randy Dunlap > > Acked-by: Randy Dunlap > > > > 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.