lkml.org 
[lkml]   [2008]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/1][resend] irq: Maintain user set affinity
This addresses a regression in that if a user specified an affinity
for an interrupt that affinity information would get reset between
a request_irq(), free_irq() and request_irq() for the same irq.

On example of this is bringing up an ethernet interface, taking
it down and bringing it back up again.

Instead of always using the irq_default_affinity we use the
previous setting of the IRQs affinity with the assumption that
at boot the IRQs affinity will be set to irq_default_affinity.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---

reposting since the first patch I forgot to cull some header info from the
body of the emai.

- k

kernel/irq/manage.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index c498a1b..ea7d11b 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -115,9 +115,12 @@ int irq_select_affinity(unsigned int irq)
if (!irq_can_set_affinity(irq))
return 0;

- cpus_and(mask, cpu_online_map, irq_default_affinity);
-
desc = irq_to_desc(irq);
+
+ mask = desc->affinity;
+
+ cpus_and(mask, cpu_online_map, mask);
+
desc->affinity = mask;
desc->chip->set_affinity(irq, mask);

--
1.5.5.1


\
 
 \ /
  Last update: 2008-11-04 17:59    [W:0.055 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site