From: Ingo Molnar <mingo@elte.hu>
To: Pawel MOLL <pawel.moll@st.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] genirq: irq_chip->startup() usage in setup_irq and set_irq_chained handler
Date: Sat, 6 Sep 2008 20:37:18 +0200 [thread overview]
Message-ID: <20080906183718.GF21872@elte.hu> (raw)
In-Reply-To: <1220260331.3299.1118.camel@bri1004.bri.st.com>
* Pawel MOLL <pawel.moll@st.com> wrote:
> This patch clarifies usage of irq_chip->startup() callback:
>
> 1. The "if (startup) startup(); else enabled();" code in setup_irq()
> is unnecessary, as startup() falls back to enabled() via
> default callbacks, set by irq_chip_set_defaults().
>
> 2. When using set_irq_chained_handler() the startup() was never called,
> which is not good at all... Fixed. And again - when startup() is not
> defined the call will fall back to enable() than to unmask() via
> default callbacks.
>
> Signed-off-by: Pawel Moll <pawel.moll@st.com>
> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
applied the commit below to tip/genirq - thanks Pawel.
Ingo
------------->
>From 7e6e178ab1548c8d894a77593e757acf4510b8ba Mon Sep 17 00:00:00 2001
From: Pawel MOLL <pawel.moll@st.com>
Date: Mon, 1 Sep 2008 10:12:11 +0100
Subject: [PATCH] genirq: irq_chip->startup() usage in setup_irq and set_irq_chained handler
This patch clarifies usage of irq_chip->startup() callback:
1. The "if (startup) startup(); else enabled();" code in setup_irq()
is unnecessary, as startup() falls back to enabled() via
default callbacks, set by irq_chip_set_defaults().
2. When using set_irq_chained_handler() the startup() was never called,
which is not good at all... Fixed. And again - when startup() is not
defined the call will fall back to enable() than to unmask() via
default callbacks.
Signed-off-by: Pawel Moll <pawel.moll@st.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/irq/chip.c | 2 +-
kernel/irq/manage.c | 5 +----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 964964b..240c64d 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -587,7 +587,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
desc->status &= ~IRQ_DISABLED;
desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE;
desc->depth = 0;
- desc->chip->unmask(irq);
+ desc->chip->startup(irq);
}
spin_unlock_irqrestore(&desc->lock, flags);
}
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index ae1b684..9aa3e7b 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -397,10 +397,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
if (!(desc->status & IRQ_NOAUTOEN)) {
desc->depth = 0;
desc->status &= ~IRQ_DISABLED;
- if (desc->chip->startup)
- desc->chip->startup(irq);
- else
- desc->chip->enable(irq);
+ desc->chip->startup(irq);
} else
/* Undo nested disables: */
desc->depth = 1;
prev parent reply other threads:[~2008-09-06 18:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-21 10:14 [PATCH] genirq: irq_chip->startup() usage in setup_irq and set_irq_chained handler Pawel MOLL
2008-08-22 14:49 ` Pawel MOLL
2008-08-23 16:08 ` Ingo Molnar
2008-08-23 22:43 ` Benjamin Herrenschmidt
2008-08-26 10:14 ` Pawel MOLL
2008-08-27 0:06 ` Benjamin Herrenschmidt
2008-09-01 8:47 ` Pawel MOLL
[not found] ` <1220260331.3299.1118.camel@bri1004.bri.st.com>
2008-09-06 18:37 ` Ingo Molnar [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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080906183718.GF21872@elte.hu \
--to=mingo@elte.hu \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pawel.moll@st.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox