mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] genirq: omit validate of desc->chip->shutdown
@ 2009-11-04 13:20 Yong Zhang
  2009-11-04 13:20 ` [PATCH 2/3] genirq: set irq thread affinity when doing __setup_irq Yong Zhang
  0 siblings, 1 reply; 3+ messages in thread
From: Yong Zhang @ 2009-11-04 13:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Thomas Gleixner

Because irq_chip_set_defaults() will do the init things, chip->shutdown
can't be NULL then the validate of it is redundant.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/irq/manage.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index bde4c66..0b5e5ed 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -878,10 +878,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
 	/* If this was the last handler, shut down the IRQ line: */
 	if (!desc->action) {
 		desc->status |= IRQ_DISABLED;
-		if (desc->chip->shutdown)
-			desc->chip->shutdown(irq);
-		else
-			desc->chip->disable(irq);
+		desc->chip->shutdown(irq);
 	}
 
 	spin_unlock_irqrestore(&desc->lock, flags);
-- 
1.6.3.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/3] genirq: set irq thread affinity when doing __setup_irq
  2009-11-04 13:20 [PATCH 1/3] genirq: omit validate of desc->chip->shutdown Yong Zhang
@ 2009-11-04 13:20 ` Yong Zhang
  2009-11-04 13:20   ` [PATCH 3/3] genirq: remove strange local_irq_disable() Yong Zhang
  0 siblings, 1 reply; 3+ messages in thread
From: Yong Zhang @ 2009-11-04 13:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Thomas Gleixner

setup_affinity() should be paired with irq_set_thread_affinity()
even in the setup stage of an irq. Because irq_default_affinity
could be initialized by arch code in which case affinity between
irq and thead will be inconsistent.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/irq/manage.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 0b5e5ed..5c5c114 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -748,7 +748,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
 			desc->status |= IRQ_NO_BALANCING;
 
 		/* Set default affinity mask once everything is setup */
-		setup_affinity(irq, desc);
+		ret = setup_affinity(irq, desc);
+		if (!ret)
+			irq_set_thread_affinity(desc);
 
 	} else if ((new->flags & IRQF_TRIGGER_MASK)
 			&& (new->flags & IRQF_TRIGGER_MASK)
-- 
1.6.3.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 3/3] genirq: remove strange local_irq_disable()
  2009-11-04 13:20 ` [PATCH 2/3] genirq: set irq thread affinity when doing __setup_irq Yong Zhang
@ 2009-11-04 13:20   ` Yong Zhang
  0 siblings, 0 replies; 3+ messages in thread
From: Yong Zhang @ 2009-11-04 13:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar, Yinghai Lu, Thomas Gleixner

local_irq_disable() called in try_one_irq looks very odd and maybe
lead misunderstand.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/irq/spurious.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index 114e704..430eb9a 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -54,7 +54,7 @@ static int try_one_irq(int irq, struct irq_desc *desc)
 		}
 		action = action->next;
 	}
-	local_irq_disable();
+
 	/* Now clean up the flags */
 	spin_lock(&desc->lock);
 	action = desc->action;
-- 
1.6.3.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-04 13:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-04 13:20 [PATCH 1/3] genirq: omit validate of desc->chip->shutdown Yong Zhang
2009-11-04 13:20 ` [PATCH 2/3] genirq: set irq thread affinity when doing __setup_irq Yong Zhang
2009-11-04 13:20   ` [PATCH 3/3] genirq: remove strange local_irq_disable() Yong Zhang

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®