From: Thomas Gleixner <tglx@linutronix.de>
To: Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Russell King <rmk+lkml@arm.linux.org.uk>
Subject: [patch 1/2] genirq: allow usage of no_irq_chip
Date: Sat, 10 Jun 2006 10:15:11 -0000 [thread overview]
Message-ID: <20060610085435.487020000@cruncher.tec.linutronix.de> (raw)
In-Reply-To: 20060610085428.366868000@cruncher.tec.linutronix.de
[-- Attachment #1: genirq-allow-usage-of-no-irq-chip.patch --]
[-- Type: text/plain, Size: 2099 bytes --]
Some dumb interrupt hardware has no way to ack/mask.... Instead of creating a
seperate chip structure we allow to reuse the already existing no_irq_chip
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/irq/handle.c | 8 ++++++--
kernel/irq/manage.c | 2 +-
kernel/irq/proc.c | 5 ++---
3 files changed, 9 insertions(+), 6 deletions(-)
Index: linux-2.6.17-rc6-mm/kernel/irq/handle.c
===================================================================
--- linux-2.6.17-rc6-mm.orig/kernel/irq/handle.c 2006-06-10 10:32:51.000000000 +0200
+++ linux-2.6.17-rc6-mm/kernel/irq/handle.c 2006-06-10 10:42:22.000000000 +0200
@@ -63,8 +63,12 @@
*/
static void ack_bad(unsigned int irq)
{
- print_irq_desc(irq, irq_desc + irq);
- ack_bad_irq(irq);
+ struct irq_desc *desc = irq_desc + irq;
+
+ if (desc->handle_irq == handle_bad_irq) {
+ print_irq_desc(irq, desc);
+ ack_bad_irq(irq);
+ }
}
/*
@@ -89,6 +93,7 @@
.enable = noop,
.disable = noop,
.ack = ack_bad,
+ .unmask = noop,
.end = noop,
};
Index: linux-2.6.17-rc6-mm/kernel/irq/manage.c
===================================================================
--- linux-2.6.17-rc6-mm.orig/kernel/irq/manage.c 2006-06-10 10:32:53.000000000 +0200
+++ linux-2.6.17-rc6-mm/kernel/irq/manage.c 2006-06-10 10:42:22.000000000 +0200
@@ -199,7 +199,7 @@
if (irq >= NR_IRQS)
return -EINVAL;
- if (desc->chip == &no_irq_chip)
+ if (desc->handle_irq == &handle_bad_irq)
return -ENOSYS;
/*
* Some drivers like serial.c use request_irq() heavily,
Index: linux-2.6.17-rc6-mm/kernel/irq/proc.c
===================================================================
--- linux-2.6.17-rc6-mm.orig/kernel/irq/proc.c 2006-06-10 10:32:49.000000000 +0200
+++ linux-2.6.17-rc6-mm/kernel/irq/proc.c 2006-06-10 10:42:22.000000000 +0200
@@ -116,9 +116,8 @@
{
char name [MAX_NAMELEN];
- if (!root_irq_dir ||
- (irq_desc[irq].chip == &no_irq_chip) ||
- irq_desc[irq].dir)
+ if (!root_irq_dir || (irq_desc[irq].handle_irq == &handle_bad_irq) ||
+ irq_desc[irq].dir)
return;
memset(name, 0, MAX_NAMELEN);
--
next prev parent reply other threads:[~2006-06-10 10:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-10 10:15 [patch 0/2] genirq updates Thomas Gleixner
2006-06-10 10:15 ` Thomas Gleixner [this message]
2006-06-21 23:12 ` [patch 1/2] genirq: allow usage of no_irq_chip Andrew Morton
2006-06-22 8:35 ` Russell King
2006-06-22 8:51 ` Thomas Gleixner
2006-06-22 19:55 ` Thomas Gleixner
2006-06-10 10:15 ` [patch 2/2] genirq: Add reentrancy warning messages Thomas Gleixner
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=20060610085435.487020000@cruncher.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rmk+lkml@arm.linux.org.uk \
/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