* [PATCH 1/2] arm: irq: Notify affinity change when migrating IRQs during hotplug
@ 2014-08-20 16:59 Lina Iyer
2014-08-20 16:59 ` [PATCH 2/2] arm64: " Lina Iyer
2014-08-27 17:09 ` [PATCH 1/2] arm: " Kevin Hilman
0 siblings, 2 replies; 4+ messages in thread
From: Lina Iyer @ 2014-08-20 16:59 UTC (permalink / raw)
To: khilman, tglx, linux-pm, daniel.lezcano, ulf.hansson
Cc: Praveen Chidambaram, Lina Iyer
From: Praveen Chidambaram <pchidamb@codeaurora.org>
Hotplug causes IRQs affine to a core that is being taken down to migrate
to an online core. This is done by directly calling the irq_set_affinity
associated with the irq_chip structure. Instead using the
irq_set_affinity_locked() api lets the notifications bubble through.
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
---
arch/arm/kernel/irq.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 2c42576..8835ef2 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -157,7 +157,6 @@ 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;
- struct irq_chip *c;
bool ret = false;
/*
@@ -167,17 +166,12 @@ static bool migrate_one_irq(struct irq_desc *desc)
if (irqd_is_per_cpu(d) || !cpumask_test_cpu(smp_processor_id(), affinity))
return false;
- if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
- affinity = cpu_online_mask;
+ if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids)
ret = true;
- }
-
- c = irq_data_get_irq_chip(d);
- if (!c->irq_set_affinity)
- pr_debug("IRQ%u: unable to set affinity\n", d->irq);
- else if (c->irq_set_affinity(d, affinity, true) == IRQ_SET_MASK_OK && ret)
- cpumask_copy(d->affinity, affinity);
+ affinity = cpu_online_mask;
+ ret = (irq_set_affinity_locked(d, affinity, true) == IRQ_SET_MASK_OK)
+ && ret;
return ret;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] arm64: irq: Notify affinity change when migrating IRQs during hotplug
2014-08-20 16:59 [PATCH 1/2] arm: irq: Notify affinity change when migrating IRQs during hotplug Lina Iyer
@ 2014-08-20 16:59 ` Lina Iyer
2014-08-27 17:09 ` [PATCH 1/2] arm: " Kevin Hilman
1 sibling, 0 replies; 4+ messages in thread
From: Lina Iyer @ 2014-08-20 16:59 UTC (permalink / raw)
To: khilman, tglx, linux-pm, daniel.lezcano, ulf.hansson
Cc: Praveen Chidambaram, Lina Iyer
From: Praveen Chidambaram <pchidamb@codeaurora.org>
Hotplug causes IRQs affine to a core that is being taken down to migrate
to an online core. This is done by directly calling the irq_set_affinity
associated with the irq_chip structure. Instead using the
irq_set_affinity_locked() api lets the notifications bubble through.
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
---
arch/arm64/kernel/irq.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/kernel/irq.c b/arch/arm64/kernel/irq.c
index 0f08dfd..c623032 100644
--- a/arch/arm64/kernel/irq.c
+++ b/arch/arm64/kernel/irq.c
@@ -87,7 +87,6 @@ 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;
- struct irq_chip *c;
bool ret = false;
/*
@@ -106,12 +105,8 @@ static bool migrate_one_irq(struct irq_desc *desc)
* selected as the target CPU otherwise
*/
affinity = cpu_online_mask;
- c = irq_data_get_irq_chip(d);
- if (!c->irq_set_affinity)
- pr_debug("IRQ%u: unable to set affinity\n", d->irq);
- else if (c->irq_set_affinity(d, affinity, true) == IRQ_SET_MASK_OK && ret)
- cpumask_copy(d->affinity, affinity);
-
+ ret = (irq_set_affinity_locked(d, affinity, true) == IRQ_SET_MASK_OK)
+ && ret;
return ret;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] arm: irq: Notify affinity change when migrating IRQs during hotplug
2014-08-20 16:59 [PATCH 1/2] arm: irq: Notify affinity change when migrating IRQs during hotplug Lina Iyer
2014-08-20 16:59 ` [PATCH 2/2] arm64: " Lina Iyer
@ 2014-08-27 17:09 ` Kevin Hilman
2014-08-27 22:51 ` Lina Iyer
1 sibling, 1 reply; 4+ messages in thread
From: Kevin Hilman @ 2014-08-27 17:09 UTC (permalink / raw)
To: Lina Iyer
Cc: tglx, linux-pm, daniel.lezcano, ulf.hansson, Praveen Chidambaram
Lina Iyer <lina.iyer@linaro.org> writes:
> From: Praveen Chidambaram <pchidamb@codeaurora.org>
>
> Hotplug causes IRQs affine to a core that is being taken down to migrate
> to an online core. This is done by directly calling the irq_set_affinity
> associated with the irq_chip structure. Instead using the
> irq_set_affinity_locked() api lets the notifications bubble through.
changelog nit: and why do you want/need the notification to bubble
through? IOW, you're explaining "what" the patch does, but not "why",
which typically includes a summary of the problem being solved. (I know
the background from the other series, but other reviewers may not know
the history there.)
Also, please post these to linux-arm-kernel.
Thanks,
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] arm: irq: Notify affinity change when migrating IRQs during hotplug
2014-08-27 17:09 ` [PATCH 1/2] arm: " Kevin Hilman
@ 2014-08-27 22:51 ` Lina Iyer
0 siblings, 0 replies; 4+ messages in thread
From: Lina Iyer @ 2014-08-27 22:51 UTC (permalink / raw)
To: Kevin Hilman
Cc: tglx, linux-pm, daniel.lezcano, ulf.hansson, Praveen Chidambaram
On Wed, Aug 27, 2014 at 10:09:10AM -0700, Kevin Hilman wrote:
>Lina Iyer <lina.iyer@linaro.org> writes:
>
>> From: Praveen Chidambaram <pchidamb@codeaurora.org>
>>
>> Hotplug causes IRQs affine to a core that is being taken down to migrate
>> to an online core. This is done by directly calling the irq_set_affinity
>> associated with the irq_chip structure. Instead using the
>> irq_set_affinity_locked() api lets the notifications bubble through.
>
>changelog nit: and why do you want/need the notification to bubble
>through? IOW, you're explaining "what" the patch does, but not "why",
>which typically includes a summary of the problem being solved. (I know
>the background from the other series, but other reviewers may not know
>the history there.)
Okay. I seem to be making the mistake of not explaining things very
well, in context.
Let me elaborate and resend.
>
>Also, please post these to linux-arm-kernel.
>
>Thanks,
>
>Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-08-27 22:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20 16:59 [PATCH 1/2] arm: irq: Notify affinity change when migrating IRQs during hotplug Lina Iyer
2014-08-20 16:59 ` [PATCH 2/2] arm64: " Lina Iyer
2014-08-27 17:09 ` [PATCH 1/2] arm: " Kevin Hilman
2014-08-27 22:51 ` Lina Iyer
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.