[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [Patch v2 08/14] genirq: Introduce helper function irq_data_get_affinity_mask()
 
- To: Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>
 
- From: Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx>
 
- Date: Wed, 20 May 2015 20:34:26 +0100
 
- Cc: Andreas Larsson <andreas@xxxxxxxxxxx>, linux-mips@xxxxxxxxxxxxxx,	Kevin Cernekee <cernekee@xxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx,	Brian Gerst <brgerst@xxxxxxxxx>, David Daney <david.daney@xxxxxxxxxx>,	Catalin Marinas <catalin.marinas@xxxxxxx>,	Mahesh Salgaonkar <mahesh@xxxxxxxxxxxxxxxxxx>,	Will Deacon <will.deacon@xxxxxxx>, David Howells <dhowells@xxxxxxxxxx>,	Max Filippov <jcmvbkbc@xxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>,	"H. Peter Anvin" <hpa@xxxxxxxxx>, sparclinux@xxxxxxxxxxxxxxx,	Christoph Lameter <cl@xxxxxxxxx>,	Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>,	bob picco <bpicco@xxxxxxxxxx>, linux-am33-list@xxxxxxxxxx,	Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>,	linux-sh@xxxxxxxxxxxxxxx, Michael Ellerman <mpe@xxxxxxxxxxxxxx>,	Helge Deller <deller@xxxxxx>, x86@xxxxxxxxxx,	Magnus Damm <magnus.damm@xxxxxxxxx>,	"James E.J. Bottomley" <jejb@xxxxxxxxxxxxxxxx>,	Ingo Molnar <mingo@xxxxxxxxxx>, linux-acpi@xxxxxxxxxxxxxxx,	linux-alpha@xxxxxxxxxxxxxxx, Ingo Molnar <mingo@xxxxxxxxxx>,	Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>,	xen-devel@xxxxxxxxxxxxxxxxxxxx, Matt Turner <mattst88@xxxxxxxxx>,	Aleksey Makarov <aleksey.makarov@xxxxxxxxxx>,	Fenghua Yu <fenghua.yu@xxxxxxxxx>, James Hogan <james.hogan@xxxxxxxxxx>,	Jason Cooper <jason@xxxxxxxxxxxxxx>,	Arnd Bergmann <arnd@xxxxxxxx>, Steven Miao <realmz6@xxxxxxxxx>,	Marc Zyngier <marc.zyngier@xxxxxxx>,	Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>, linux-xtensa@xxxxxxxxxxxxxxxx,	Rusty Russell <rusty@xxxxxxxxxxxxxxx>,	adi-buildroot-devel@xxxxxxxxxxxxxxxxxxxxx, Jonas Gorski <jogo@xxxxxxxxxxx>,	Simon Horman <horms@xxxxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>,	Anton Blanchard <anton@xxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>,	Thomas Gleixner <tglx@xxxxxxxxxxxxx>,	Yinghai Lu <yinghai@xxxxxxxxxx>, linux-metag@xxxxxxxxxxxxxxx,	linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, Richard Henderson <rth@xxxxxxxxxxx>,	Juergen Gross <jgross@xxxxxxxx>, Chris Zankel <chris@xxxxxxxxxx>,	Tony Luck <tony.luck@xxxxxxxxx>, linux-parisc@xxxxxxxxxxxxxxx,	linux-pci@xxxxxxxxxxxxxxx, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>,	"Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>,	linux-kernel@xxxxxxxxxxxxxxx, Ralf Baechle <ralf@xxxxxxxxxxxxxx>,	David Vrabel <david.vrabel@xxxxxxxxxx>,	Sudeep Holla <sudeep.holla@xxxxxxx>, Tejun Heo <tj@xxxxxxxxxx>,	Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx>,	Koichi Yasutake <yasutake.koichi@xxxxxxxxxxxxxxxx>,	linuxppc-dev@xxxxxxxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxxxxx>
 
- Delivery-date: Wed, 20 May 2015 19:38:24 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
 
 
 
On Wed, May 20, 2015 at 05:40:39PM +0800, Jiang Liu wrote:
> diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
> index 350f188c92d2..baf8edebe26f 100644
> --- a/arch/arm/kernel/irq.c
> +++ b/arch/arm/kernel/irq.c
> @@ -140,7 +140,7 @@ int __init arch_probe_nr_irqs(void)
>  static bool migrate_one_irq(struct irq_desc *desc)
>  {
>       struct irq_data *d = irq_desc_get_irq_data(desc);
> -     const struct cpumask *affinity = d->affinity;
> +     const struct cpumask *affinity = irq_data_get_affinity_mask(d);
>       struct irq_chip *c;
>       bool ret = false;
>  
> @@ -160,7 +160,7 @@ static bool migrate_one_irq(struct irq_desc *desc)
>       if (!c->irq_set_affinity)
>               pr_debug("IRQ%u: unable to set affinity\n", d->irq);
>       else if (c->irq_set_affinity(d, affinity, false) == IRQ_SET_MASK_OK && 
> ret)
> -             cpumask_copy(d->affinity, affinity);
> +             cpumask_copy(irq_data_get_affinity_mask(d), affinity);
>  
>       return ret;
>  }
> diff --git a/include/linux/irq.h b/include/linux/irq.h
> index 43581e166298..2eb82257aaee 100644
> --- a/include/linux/irq.h
> +++ b/include/linux/irq.h
> @@ -650,6 +650,18 @@ 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)
> +{
> +     struct irq_data *d = irq_get_irq_data(irq);
> +
> +     return d ? d->affinity : NULL;
> +}
> +
> +static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d)
> +{
> +     return d->affinity;
> +}
> +
>  unsigned int arch_dynirq_lower_bound(unsigned int from);
>  
>  int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node,
For the above only,
Acked-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>
Thanks.
-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
    
     |