All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IRQ: Check for PERCPU flag only when adding first irqaction.
@ 2007-03-26 19:14 Ahmed S. Darwish
  2007-03-27  8:54 ` Ahmed S. Darwish
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmed S. Darwish @ 2007-03-26 19:14 UTC (permalink / raw)
  To: linux-kernel

Hi,

An irqaction structure won't be added to the IRQ line irqaction list if they
don't agree wrt the IRQF_PERCPU flag. Only check and set this flag in IRQ
descriptor `status' field when the first irqaction is added to the line list.


Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
---

Patch over 2.6.21-rc5.

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 5597c15..ea82a54 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -317,10 +317,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
 	}
 
 	*p = new;
-#if defined(CONFIG_IRQ_PER_CPU)
-	if (new->flags & IRQF_PERCPU)
-		desc->status |= IRQ_PER_CPU;
-#endif
+
 	/* Exclude IRQ from balancing */
 	if (new->flags & IRQF_NOBALANCING)
 		desc->status |= IRQ_NO_BALANCING;
@@ -328,6 +325,11 @@ int setup_irq(unsigned int irq, struct irqaction *new)
 	if (!shared) {
 		irq_chip_set_defaults(desc->chip);
 
+#if defined(CONFIG_IRQ_PER_CPU)
+		if (new->flags & IRQF_PERCPU)
+			desc->status |= IRQ_PER_CPU;
+#endif
+		
 		/* Setup the type (level, edge polarity) if configured: */
 		if (new->flags & IRQF_TRIGGER_MASK) {
 			if (desc->chip && desc->chip->set_type)

-- 
Ahmed S. Darwish
http://darwish.07.googlepages.com

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

* Re: [PATCH] IRQ: Check for PERCPU flag only when adding first irqaction.
  2007-03-26 19:14 [PATCH] IRQ: Check for PERCPU flag only when adding first irqaction Ahmed S. Darwish
@ 2007-03-27  8:54 ` Ahmed S. Darwish
  0 siblings, 0 replies; 2+ messages in thread
From: Ahmed S. Darwish @ 2007-03-27  8:54 UTC (permalink / raw)
  To: linux-kernel

On Mon, Mar 26, 2007 at 09:14:55PM +0200, ahmed wrote:
> Hi,
> 
> An irqaction structure won't be added to the IRQ line irqaction list if they
> don't agree wrt the IRQF_PERCPU flag. Only check and set this flag in IRQ
> descriptor `status' field when the first irqaction is added to the line list.
> 
> 
> Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
> ---
> Patch over 2.6.21-rc5.

Maybe just a better description (with the same patch below):

An irqaction structure won't be added to an IRQ descriptor irqaction list
if it don't agree with other irqactions on the IRQF_PERCPU flag. Don't 
check for this flag to change IRQ descriptor `status' for every irqaction
added to the list, Doing the check only for the first irqaction added is
enough.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
---
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 5597c15..ea82a54 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -317,10 +317,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
 	}
 
 	*p = new;
-#if defined(CONFIG_IRQ_PER_CPU)
-	if (new->flags & IRQF_PERCPU)
-		desc->status |= IRQ_PER_CPU;
-#endif
+
 	/* Exclude IRQ from balancing */
 	if (new->flags & IRQF_NOBALANCING)
 		desc->status |= IRQ_NO_BALANCING;
@@ -328,6 +325,11 @@ int setup_irq(unsigned int irq, struct irqaction *new)
 	if (!shared) {
 		irq_chip_set_defaults(desc->chip);
 
+#if defined(CONFIG_IRQ_PER_CPU)
+		if (new->flags & IRQF_PERCPU)
+			desc->status |= IRQ_PER_CPU;
+#endif
+		
 		/* Setup the type (level, edge polarity) if configured: */
 		if (new->flags & IRQF_TRIGGER_MASK) {
 			if (desc->chip && desc->chip->set_type)


-- 
Ahmed S. Darwish
http://darwish.07.googlepages.com


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

end of thread, other threads:[~2007-03-27  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-26 19:14 [PATCH] IRQ: Check for PERCPU flag only when adding first irqaction Ahmed S. Darwish
2007-03-27  8:54 ` Ahmed S. Darwish

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.