Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp375462imn; Mon, 25 Jul 2022 20:03:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vc2nr3etxbsm75+mwuBg7Con0JH3H7qnHQDz9kMlkHBBM28kRvN97FEpSS7LuEyfshu3eP X-Received: by 2002:a17:907:2718:b0:72b:6b65:37dc with SMTP id w24-20020a170907271800b0072b6b6537dcmr12504990ejk.425.1658804626372; Mon, 25 Jul 2022 20:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658804626; cv=none; d=google.com; s=arc-20160816; b=GBO23GtM2iAg/dceeiwhl9AlyBDawEiPWa5CPSeFRKrRkfS+ML7vugAl07CsKDWG/v sg75k7ADbhtso8eiyqK/xE1C7kzUBHjTO5fIl3U+DU4/SlWUr6oqu2CKjxoXmgi9Bo94 VtNFCSquYdC7GF2RLy5NlecynwtHqhIuOTEhxuUcs99dd17BOrMpqtVgrX6RM6BTnmbo kTqwvCXySwPVANM4FJcQ9qF6Y9yTD77RgZUrly4NQ/DX470X8iZdIdjlSZvR5NWiTyYq GMA7qVq7LkxiYFCdPu6qILqRZg6B7FSlPVmHwhiWgtigO3nljt1RaCs43tqJ1CxBzy1e MggQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=BjeoFUfM5uWLnKpTPLeLk03xCXCAqBH4O+lDfmmC4Vw=; b=rIEUwQDJUWrWKjxdJihyWEzGgmAWbzM5GqhaOhcTXwIN8y9hpBwlNeGNkm343ddcPK 7PSdE+kSJJY++ZPs9gOkOSo8UGSYPcgXKM117JPzsIFOhehwKjqROWmZjtiEven5TDFH bpvMYCxh1Swe//AysQ77fJhRhCrl1cUElNO4mLvs6F/BZk3Ax8tZwojVf0FT2n2iAf3q h2FBPtGn2gpuHqTf6BE7rP+ItGq1SdP/aCWzhOGtCwsQkpfzZ0JmDjL/eIb5FKuM2+mj D6EjFOXHhUtrrMPEUx+sCw5q8PwacR5zbUvxDko9u0k6Bcmmf07whn7ZRnLd57Pz269j Uq8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=E3vItekm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr21-20020a1709073f9500b0072b88d59ce5si15314547ejc.461.2022.07.25.20.03.21; Mon, 25 Jul 2022 20:03:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=E3vItekm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237220AbiGZCjc (ORCPT + 99 others); Mon, 25 Jul 2022 22:39:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231424AbiGZCjb (ORCPT ); Mon, 25 Jul 2022 22:39:31 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5C8029833; Mon, 25 Jul 2022 19:39:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Cc:Content-ID:Content-Description; bh=BjeoFUfM5uWLnKpTPLeLk03xCXCAqBH4O+lDfmmC4Vw=; b=E3vItekmUsPIFk39AB1/s0y4vU ff7VQ01j/aPmw0/m7EGtHm8u47N8hsPA60jC2YhHK6hXHReJir/uQfzq7xwc8beKkw3k3ydnGGXPH J5q8A0fB5N3O/Yz4jn2dNaHzZe7lHSJfRA5vlsBYLmDVUcvfpPuvs3xd2T0S8Rv1QbewOzhzj0bPB A2UD4z7A3Ov4rqpMV7uetzyTs4yCXzinB9oL02e7O38BQOU7zsmdTjzzZxRF8dGU68ae8YYqCFNox x55nMieaaCY/aEPhltbFQjguV2PT8Z3aQSaxiNRwv3rINlHV7K9vV2bVcWQshjXMCi0oB7q+zZvyV blg1NIdw==; Received: from [2601:1c0:6280:3f0::a6b3] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGATh-006v7Z-Ub; Tue, 26 Jul 2022 02:39:22 +0000 Message-ID: <5ea65d3d-745e-0a16-c885-a224a20ee7ce@infradead.org> Date: Mon, 25 Jul 2022 19:39:20 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 1/1] iommu/hyper-v: Use helper instead of directly accessing affinity Content-Language: en-US To: Michael Kelley , 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 References: <1658796820-2261-1-git-send-email-mikelley@microsoft.com> From: Randy Dunlap In-Reply-To: <1658796820-2261-1-git-send-email-mikelley@microsoft.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; > } -- ~Randy