All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] iommu/hyper-v: Use helper instead of directly accessing affinity
@ 2022-07-26  0:53 Michael Kelley
  2022-07-26  2:39 ` Randy Dunlap
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Michael Kelley @ 2022-07-26  0:53 UTC (permalink / raw)
  To: sthemmin, kys, haiyangz, wei.liu, decui, joro, will, robin.murphy,
	samuel, linux-kernel, linux-hyperv, iommu
  Cc: mikelley

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.

Signed-off-by: Michael Kelley <mikelley@microsoft.com>
---
 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;
 }
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-08-04 13:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
2022-08-04 13:26 ` [irqchip: irq/irqchip-fixes] " irqchip-bot for Michael Kelley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.