* [patch 1/1] metag/irq: Use access helper irq_data_get_affinity_mask()
@ 2015-07-13 20:43 Thomas Gleixner
2015-07-14 8:34 ` James Hogan
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2015-07-13 20:43 UTC (permalink / raw)
To: LKML; +Cc: Jiang Liu, James Hogan
[-- Attachment #1: metag-irq-Use-access-helper-irq_data_get_affinity_ma.patch --]
[-- Type: text/plain, Size: 1297 bytes --]
From: Jiang Liu <jiang.liu@linux.intel.com>
This is a preparatory patch for moving irq_data struct members.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/metag/kernel/irq.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Index: tip/arch/metag/kernel/irq.c
===================================================================
--- tip.orig/arch/metag/kernel/irq.c
+++ tip/arch/metag/kernel/irq.c
@@ -270,23 +270,25 @@ void migrate_irqs(void)
for_each_active_irq(i) {
struct irq_data *data = irq_get_irq_data(i);
+ struct cpumask *mask;
unsigned int newcpu;
if (irqd_is_per_cpu(data))
continue;
- if (!cpumask_test_cpu(cpu, data->affinity))
+ mask = irq_data_get_affinity_mask(data);
+ if (!cpumask_test_cpu(cpu, mask))
continue;
- newcpu = cpumask_any_and(data->affinity, cpu_online_mask);
+ newcpu = cpumask_any_and(mask, cpu_online_mask);
if (newcpu >= nr_cpu_ids) {
pr_info_ratelimited("IRQ%u no longer affine to CPU%u\n",
i, cpu);
- cpumask_setall(data->affinity);
+ cpumask_setall(mask);
}
- irq_set_affinity(i, data->affinity);
+ irq_set_affinity(i, mask);
}
}
#endif /* CONFIG_HOTPLUG_CPU */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 1/1] metag/irq: Use access helper irq_data_get_affinity_mask()
2015-07-13 20:43 [patch 1/1] metag/irq: Use access helper irq_data_get_affinity_mask() Thomas Gleixner
@ 2015-07-14 8:34 ` James Hogan
2015-07-14 8:37 ` Thomas Gleixner
0 siblings, 1 reply; 3+ messages in thread
From: James Hogan @ 2015-07-14 8:34 UTC (permalink / raw)
To: Thomas Gleixner, LKML; +Cc: Jiang Liu
[-- Attachment #1: Type: text/plain, Size: 1632 bytes --]
Hi,
On 13/07/15 21:43, Thomas Gleixner wrote:
> From: Jiang Liu <jiang.liu@linux.intel.com>
>
> This is a preparatory patch for moving irq_data struct members.
>
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
> Cc: James Hogan <james.hogan@imgtec.com>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Looks reasonable. Do you want this to go through metag tree?
If not,
Acked-by: James Hogan <james.hogan@imgtec.com>
Cheers
James
> ---
> arch/metag/kernel/irq.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> Index: tip/arch/metag/kernel/irq.c
> ===================================================================
> --- tip.orig/arch/metag/kernel/irq.c
> +++ tip/arch/metag/kernel/irq.c
> @@ -270,23 +270,25 @@ void migrate_irqs(void)
>
> for_each_active_irq(i) {
> struct irq_data *data = irq_get_irq_data(i);
> + struct cpumask *mask;
> unsigned int newcpu;
>
> if (irqd_is_per_cpu(data))
> continue;
>
> - if (!cpumask_test_cpu(cpu, data->affinity))
> + mask = irq_data_get_affinity_mask(data);
> + if (!cpumask_test_cpu(cpu, mask))
> continue;
>
> - newcpu = cpumask_any_and(data->affinity, cpu_online_mask);
> + newcpu = cpumask_any_and(mask, cpu_online_mask);
>
> if (newcpu >= nr_cpu_ids) {
> pr_info_ratelimited("IRQ%u no longer affine to CPU%u\n",
> i, cpu);
>
> - cpumask_setall(data->affinity);
> + cpumask_setall(mask);
> }
> - irq_set_affinity(i, data->affinity);
> + irq_set_affinity(i, mask);
> }
> }
> #endif /* CONFIG_HOTPLUG_CPU */
>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 1/1] metag/irq: Use access helper irq_data_get_affinity_mask()
2015-07-14 8:34 ` James Hogan
@ 2015-07-14 8:37 ` Thomas Gleixner
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2015-07-14 8:37 UTC (permalink / raw)
To: James Hogan; +Cc: LKML, Jiang Liu
On Tue, 14 Jul 2015, James Hogan wrote:
> On 13/07/15 21:43, Thomas Gleixner wrote:
> > From: Jiang Liu <jiang.liu@linux.intel.com>
> >
> > This is a preparatory patch for moving irq_data struct members.
> >
> > Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
> > Cc: James Hogan <james.hogan@imgtec.com>
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
> Looks reasonable. Do you want this to go through metag tree?
Yes please.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-14 8:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-13 20:43 [patch 1/1] metag/irq: Use access helper irq_data_get_affinity_mask() Thomas Gleixner
2015-07-14 8:34 ` James Hogan
2015-07-14 8:37 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®