Skip to contentSkip to conversation

genirq: omit validate of desc->chip->shutdown

PATCH New Yong Zhang 1 participant 3 messages Nov 4, 2009 IRQ

lore
Share & tools
lore

Yong Zhang

author
#0 lore raw

PATCH 1/3 genirq: omit validate of desc->chip->shutdown

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

Cc Ingo Molnar <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 kernel/irq/manage.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
kernel/irq/manage.c +1 -4
index bde4c66..0b5e5ed 100644
@@ -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);
Signature · 1 line
1.6.3.3
author
#1 lore raw

PATCH 2/3 genirq: set irq thread affinity when doing __setup_irq

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.

Cc Ingo Molnar <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 kernel/irq/manage.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
kernel/irq/manage.c +3 -1
index 0b5e5ed..5c5c114 100644
@@ -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)
Signature · 1 line
1.6.3.3
author
#2 lore raw

PATCH 3/3 genirq: remove strange local_irq_disable()

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

Cc Ingo Molnar <[email protected]>
Cc Yinghai Lu <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 kernel/irq/spurious.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/irq/spurious.c +1 -1
index 114e704..430eb9a 100644
@@ -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;
Signature · 1 line
1.6.3.3