aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-01-28 14:52:03 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 18:50:08 -0500
commit5b912c108c8b1fcecbfe13d6d9a183db97b682d3 (patch)
tree0267f65fd9237a41207e4359e09d09e60f6cd754 /include/linux/irq.h
parent1c659d61cfbd8dc3926688c1bbf12d80f4cfb5c2 (diff)
msi: Kill the msi_desc array.
We need to be able to get from an irq number to a struct msi_desc. The msi_desc array in msi.c had several short comings the big one was that it could not be used outside of msi.c. Using irq_data in struct irq_desc almost worked except on some architectures irq_data needs to be used for something else. So this patch adds a msi_desc pointer to irq_desc, adds the appropriate wrappers and changes all of the msi code to use them. The dynamic_irq_init/cleanup code was tweaked to ensure the new field is left in a well defined state. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 52fc4052a0a..5504b671357 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -68,6 +68,7 @@ typedef void fastcall (*irq_flow_handler_t)(unsigned int irq,
68#define IRQ_MOVE_PENDING 0x40000000 /* need to re-target IRQ destination */ 68#define IRQ_MOVE_PENDING 0x40000000 /* need to re-target IRQ destination */
69 69
70struct proc_dir_entry; 70struct proc_dir_entry;
71struct msi_desc;
71 72
72/** 73/**
73 * struct irq_chip - hardware interrupt chip descriptor 74 * struct irq_chip - hardware interrupt chip descriptor
@@ -148,6 +149,7 @@ struct irq_chip {
148struct irq_desc { 149struct irq_desc {
149 irq_flow_handler_t handle_irq; 150 irq_flow_handler_t handle_irq;
150 struct irq_chip *chip; 151 struct irq_chip *chip;
152 struct msi_desc *msi_desc;
151 void *handler_data; 153 void *handler_data;
152 void *chip_data; 154 void *chip_data;
153 struct irqaction *action; /* IRQ action list */ 155 struct irqaction *action; /* IRQ action list */
@@ -373,10 +375,12 @@ extern int set_irq_chip(unsigned int irq, struct irq_chip *chip);
373extern int set_irq_data(unsigned int irq, void *data); 375extern int set_irq_data(unsigned int irq, void *data);
374extern int set_irq_chip_data(unsigned int irq, void *data); 376extern int set_irq_chip_data(unsigned int irq, void *data);
375extern int set_irq_type(unsigned int irq, unsigned int type); 377extern int set_irq_type(unsigned int irq, unsigned int type);
378extern int set_irq_msi(unsigned int irq, struct msi_desc *entry);
376 379
377#define get_irq_chip(irq) (irq_desc[irq].chip) 380#define get_irq_chip(irq) (irq_desc[irq].chip)
378#define get_irq_chip_data(irq) (irq_desc[irq].chip_data) 381#define get_irq_chip_data(irq) (irq_desc[irq].chip_data)
379#define get_irq_data(irq) (irq_desc[irq].handler_data) 382#define get_irq_data(irq) (irq_desc[irq].handler_data)
383#define get_irq_msi(irq) (irq_desc[irq].msi_desc)
380 384
381#endif /* CONFIG_GENERIC_HARDIRQS */ 385#endif /* CONFIG_GENERIC_HARDIRQS */
382 386