diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2007-01-28 14:56:37 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 18:50:08 -0500 |
commit | f7feaca77d6ad6bcfcc88ac54e3188970448d6fe (patch) | |
tree | 3002076ed2b6ab497b3b90232ff11b08de2eca5d /include | |
parent | 5b912c108c8b1fcecbfe13d6d9a183db97b682d3 (diff) |
msi: Make MSI useable more architectures
The arch hooks arch_setup_msi_irq and arch_teardown_msi_irq are now
responsible for allocating and freeing the linux irq in addition to
setting up the the linux irq to work with the interrupt.
arch_setup_msi_irq now takes a pci_device and a msi_desc and returns
an irq.
With this change in place this code should be useable by all platforms
except those that won't let the OS touch the hardware like ppc RTAS.
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')
-rw-r--r-- | include/asm-ia64/machvec.h | 3 | ||||
-rw-r--r-- | include/linux/msi.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h index a3891eb3f217..3c96ac19154e 100644 --- a/include/asm-ia64/machvec.h +++ b/include/asm-ia64/machvec.h | |||
@@ -21,6 +21,7 @@ struct mm_struct; | |||
21 | struct pci_bus; | 21 | struct pci_bus; |
22 | struct task_struct; | 22 | struct task_struct; |
23 | struct pci_dev; | 23 | struct pci_dev; |
24 | struct msi_desc; | ||
24 | 25 | ||
25 | typedef void ia64_mv_setup_t (char **); | 26 | typedef void ia64_mv_setup_t (char **); |
26 | typedef void ia64_mv_cpu_init_t (void); | 27 | typedef void ia64_mv_cpu_init_t (void); |
@@ -79,7 +80,7 @@ typedef unsigned short ia64_mv_readw_relaxed_t (const volatile void __iomem *); | |||
79 | typedef unsigned int ia64_mv_readl_relaxed_t (const volatile void __iomem *); | 80 | typedef unsigned int ia64_mv_readl_relaxed_t (const volatile void __iomem *); |
80 | typedef unsigned long ia64_mv_readq_relaxed_t (const volatile void __iomem *); | 81 | typedef unsigned long ia64_mv_readq_relaxed_t (const volatile void __iomem *); |
81 | 82 | ||
82 | typedef int ia64_mv_setup_msi_irq_t (unsigned int irq, struct pci_dev *pdev); | 83 | typedef int ia64_mv_setup_msi_irq_t (struct pci_dev *pdev, struct msi_desc *); |
83 | typedef void ia64_mv_teardown_msi_irq_t (unsigned int irq); | 84 | typedef void ia64_mv_teardown_msi_irq_t (unsigned int irq); |
84 | 85 | ||
85 | static inline void | 86 | static inline void |
diff --git a/include/linux/msi.h b/include/linux/msi.h index b99976b1536e..74c8a2ecc9dd 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -41,7 +41,7 @@ struct msi_desc { | |||
41 | /* | 41 | /* |
42 | * The arch hook for setup up msi irqs | 42 | * The arch hook for setup up msi irqs |
43 | */ | 43 | */ |
44 | int arch_setup_msi_irq(unsigned int irq, struct pci_dev *dev); | 44 | int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc); |
45 | void arch_teardown_msi_irq(unsigned int irq); | 45 | void arch_teardown_msi_irq(unsigned int irq); |
46 | 46 | ||
47 | 47 | ||