From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-m68k@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 06/28] m68k/irq: Rename irq_node to irq_data
Date: Sun, 11 Sep 2011 13:59:32 +0200 [thread overview]
Message-ID: <1315742394-16036-7-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1315742394-16036-1-git-send-email-geert@linux-m68k.org>
Make it more similar to the genirq version:
- Add an irq field
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/m68k/include/asm/irq.h | 9 +++++----
arch/m68k/kernel/ints.c | 21 +++++++++++----------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index bfc521f..3cb037c 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -75,10 +75,11 @@ struct pt_regs;
* This structure is used to chain together the ISRs for a particular
* interrupt source (if it supports chaining).
*/
-struct irq_node {
+struct irq_data {
+ unsigned int irq;
irqreturn_t (*handler)(int, void *);
void *dev_id;
- struct irq_node *next;
+ struct irq_data *next;
unsigned long flags;
const char *devname;
};
@@ -105,9 +106,9 @@ extern unsigned int m68k_irq_startup(unsigned int);
extern void m68k_irq_shutdown(unsigned int);
/*
- * This function returns a new struct irq_node
+ * This function returns a new struct irq_data
*/
-extern struct irq_node *new_irq_node(void);
+extern struct irq_data *new_irq_node(void);
extern void m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *));
extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 9de8eb4..8877932 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -51,7 +51,7 @@ extern u32 user_irqhandler_fixup[];
extern u16 user_irqvec_fixup[];
/* table for system interrupt handlers */
-static struct irq_node *irq_list[NR_IRQS];
+static struct irq_data *irq_list[NR_IRQS];
static struct irq_chip *irq_chip[NR_IRQS];
static int irq_depth[NR_IRQS];
@@ -70,7 +70,7 @@ static struct irq_chip user_irq_chip = {
};
#define NUM_IRQ_NODES 100
-static struct irq_node nodes[NUM_IRQ_NODES];
+static struct irq_data nodes[NUM_IRQ_NODES];
/*
* void init_IRQ(void)
@@ -160,9 +160,9 @@ void m68k_setup_irq_chip(struct irq_chip *contr, unsigned int irq,
irq_chip[irq + i] = contr;
}
-struct irq_node *new_irq_node(void)
+struct irq_data *new_irq_node(void)
{
- struct irq_node *node;
+ struct irq_data *node;
short i;
for (node = nodes, i = NUM_IRQ_NODES-1; i >= 0; node++, i--) {
@@ -176,10 +176,10 @@ struct irq_node *new_irq_node(void)
return NULL;
}
-int setup_irq(unsigned int irq, struct irq_node *node)
+int setup_irq(unsigned int irq, struct irq_data *node)
{
struct irq_chip *contr;
- struct irq_node **prev;
+ struct irq_data **prev;
unsigned long flags;
if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
@@ -219,13 +219,14 @@ int request_irq(unsigned int irq,
irq_handler_t handler,
unsigned long flags, const char *devname, void *dev_id)
{
- struct irq_node *node;
+ struct irq_data *node;
int res;
node = new_irq_node();
if (!node)
return -ENOMEM;
+ node->irq = irq;
node->handler = handler;
node->flags = flags;
node->dev_id = dev_id;
@@ -243,7 +244,7 @@ EXPORT_SYMBOL(request_irq);
void free_irq(unsigned int irq, void *dev_id)
{
struct irq_chip *contr;
- struct irq_node **p, *node;
+ struct irq_data **p, *node;
unsigned long flags;
if (irq >= NR_IRQS || !(contr = irq_chip[irq])) {
@@ -386,7 +387,7 @@ EXPORT_SYMBOL(irq_canonicalize);
asmlinkage void m68k_handle_int(unsigned int irq)
{
- struct irq_node *node;
+ struct irq_data *node;
kstat_cpu(0).irqs[irq]++;
node = irq_list[irq];
do {
@@ -412,7 +413,7 @@ asmlinkage void handle_badint(struct pt_regs *regs)
int show_interrupts(struct seq_file *p, void *v)
{
struct irq_chip *contr;
- struct irq_node *node;
+ struct irq_data *node;
int i = *(loff_t *) v;
/* autovector interrupts */
--
1.7.0.4
next prev parent reply other threads:[~2011-09-11 12:06 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-11 11:59 [PATCH 00/28 v6] m68k: Convert to genirq Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 01/28] genirq: Add missing "else" in irq_shutdown() Geert Uytterhoeven
2011-09-12 7:53 ` Thomas Gleixner
2011-09-11 11:59 ` [PATCH 02/28] ide-{cd,floppy,tape}: Do not include <linux/irq.> Geert Uytterhoeven
2011-09-12 9:59 ` Sergei Shtylyov
2011-09-11 11:59 ` [PATCH 03/28] keyboard: " Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 04/28] m68k/irq: Rename irq_controller to irq_chip Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 05/28] m68k/irq: Kill irq_node_t typedef, always use struct irq_node Geert Uytterhoeven
2011-09-11 11:59 ` Geert Uytterhoeven [this message]
2011-09-11 11:59 ` [PATCH 07/28] m68k/irq: Switch irq_chip methods to "struct irq_data *data" Geert Uytterhoeven
2011-09-11 13:40 ` Finn Thain
2011-09-11 17:46 ` Geert Uytterhoeven
2011-09-12 2:48 ` Finn Thain
2011-09-11 11:59 ` [PATCH 08/28] m68k/irq: Rename setup_irq() to m68k_setup_irq() and make it static Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 09/28] m68k/irq: Extract irq_set_chip() Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 10/28] m68k/irq: Add m68k_setup_irq_controller() Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 11/28] m68k/irq: Rename {,__}m68k_handle_int() Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 12/28] m68k/irq: Remove obsolete IRQ_FLG_* definitions and users Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 13/28] m68k/irq: Add genirq support Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 14/28] m68k/atari: Convert Atari to genirq Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 15/28] m68k/atari: Remove code and comments about different irq types Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 16/28] m68k/amiga: Refactor amiints.c Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 17/28] m68k/amiga: Convert Amiga to genirq Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 18/28] m68k/amiga: Optimize interrupts using chain handlers Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 19/28] m68k/mac: Convert Mac to genirq Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 20/28] m68k/mac: Optimize interrupts using chain handlers Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 21/28] m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 22/28] m68k/vme: Convert VME " Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 23/28] m68k/apollo: Convert Apollo " Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 24/28] m68k/sun3: Use the kstat_irqs_cpu() wrapper Geert Uytterhoeven
2011-09-12 17:38 ` Sam Creasey
2011-09-11 11:59 ` [PATCH 25/28] m68k/sun3: Convert Sun3/3x to genirq Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 26/28] m68k/q40: Convert Q40/Q60 " Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 27/28] m68k/irq: Remove obsolete m68k irq framework Geert Uytterhoeven
2011-09-11 11:59 ` [PATCH 28/28] m68k/irq: Remove obsolete support for user vector interrupt fixups Geert Uytterhoeven
2011-09-13 11:11 ` [PATCH 00/28 v6] m68k: Convert to genirq Finn Thain
2011-09-13 11:18 ` Geert Uytterhoeven
2011-09-13 17:26 ` Finn Thain
2011-10-20 12:18 ` Geert Uytterhoeven
2011-10-20 13:40 ` Finn Thain
2011-10-20 15:02 ` Geert Uytterhoeven
2011-10-20 16:03 ` Geert Uytterhoeven
2011-10-20 23:30 ` Finn Thain
2011-10-23 9:49 ` Geert Uytterhoeven
2011-10-23 11:29 ` Greg Ungerer
2011-10-23 12:12 ` Geert Uytterhoeven
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=1315742394-16036-7-git-send-email-geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).