LKML Archive on
 help / color / Atom feed
From: "Ahmed S. Darwish" <>
Subject: Re: [PATCH] IRQ: Check for PERCPU flag only when adding first irqaction.
Date: Tue, 27 Mar 2007 10:54:25 +0200
Message-ID: <20070327085425.GD21991@Ahmed> (raw)
In-Reply-To: <20070326191455.GA21991@Ahmed>

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 <>
> ---
> 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

Signed-off-by: Ahmed S. Darwish <>
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;
 	/* 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) {
+#if defined(CONFIG_IRQ_PER_CPU)
+		if (new->flags & IRQF_PERCPU)
+			desc->status |= IRQ_PER_CPU;
 		/* Setup the type (level, edge polarity) if configured: */
 		if (new->flags & IRQF_TRIGGER_MASK) {
 			if (desc->chip && desc->chip->set_type)

Ahmed S. Darwish

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-26 19:14 Ahmed S. Darwish
2007-03-27  8:54 ` Ahmed S. Darwish [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070327085425.GD21991@Ahmed \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone