[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 5/8] genirq: Refactor accessors to use irq_data_get_affinity_mask
- To: Marc Zyngier <maz@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- From: Samuel Holland <samuel@xxxxxxxxxxxx>
- Date: Fri, 1 Jul 2022 15:00:53 -0500
- Cc: Samuel Holland <samuel@xxxxxxxxxxxx>, Andy Shevchenko <andy.shevchenko@xxxxxxxxx>, Bartosz Golaszewski <brgl@xxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Broadcom internal kernel review list <bcm-kernel-feedback-list@xxxxxxxxxxxx>, Chris Zankel <chris@xxxxxxxxxx>, Colin Ian King <colin.king@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, Dexuan Cui <decui@xxxxxxxxxxxxx>, Florian Fainelli <f.fainelli@xxxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, Helge Deller <deller@xxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx>, "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Julia Lawall <Julia.Lawall@xxxxxxxx>, "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, Krzysztof Wilczyński <kw@xxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>, Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Matt Turner <mattst88@xxxxxxxxx>, Max Filippov <jcmvbkbc@xxxxxxxxx>, Maximilian Heyne <mheyne@xxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Rich Felker <dalias@xxxxxxxx>, Richard Henderson <rth@xxxxxxxxxxx>, Rikard Falkeborn <rikard.falkeborn@xxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Serge Semin <fancer.lancer@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>, Sven Schnelle <svens@xxxxxxxxxxxxxx>, Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>, Wei Liu <wei.liu@xxxxxxxxxx>, Wei Xu <xuwei5@xxxxxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, iommu@xxxxxxxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, x86@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Fri, 01 Jul 2022 20:18:52 +0000
- Feedback-id: i0ad843c9:Fastmail
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
A couple of functions directly reference the affinity mask. Route them
through irq_data_get_affinity_mask so they will pick up any refactoring
done there.
Signed-off-by: Samuel Holland <samuel@xxxxxxxxxxxx>
---
(no changes since v1)
include/linux/irq.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 505308253d23..69ee4e2f36ce 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -879,16 +879,16 @@ static inline int irq_data_get_node(struct irq_data *d)
return irq_common_data_get_node(d->common);
}
-static inline struct cpumask *irq_get_affinity_mask(int irq)
+static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d)
{
- struct irq_data *d = irq_get_irq_data(irq);
-
- return d ? d->common->affinity : NULL;
+ return d->common->affinity;
}
-static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d)
+static inline struct cpumask *irq_get_affinity_mask(int irq)
{
- return d->common->affinity;
+ struct irq_data *d = irq_get_irq_data(irq);
+
+ return d ? irq_data_get_affinity_mask(d) : NULL;
}
#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK
@@ -910,7 +910,7 @@ static inline void
irq_data_update_effective_affinity(struct irq_data *d,
static inline
struct cpumask *irq_data_get_effective_affinity_mask(struct irq_data *d)
{
- return d->common->affinity;
+ return irq_data_get_affinity_mask(d);
}
#endif
--
2.35.1
|