diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-12-16 17:38:18 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-01-06 17:02:26 -0500 |
commit | 76ccc297018d25d55b789bbd508861ef1e2cdb0c (patch) | |
tree | 27789ff0ea4a77ce4972987a836156255808f703 /arch/x86/include/asm/pci.h | |
parent | fb7ebfe4108e2cdfa2bb88e57148087717463dfa (diff) |
x86/PCI: Expand the x86_msi_ops to have a restore MSIs.
The MSI restore function will become a function pointer in an
x86_msi_ops struct. It defaults to the implementation in the
io_apic.c and msi.c. We piggyback on the indirection mechanism
introduced by "x86: Introduce x86_msi_ops".
Cc: x86@kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-pci@vger.kernel.org
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86/include/asm/pci.h')
-rw-r--r-- | arch/x86/include/asm/pci.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index d498943b906c..df75d07571ce 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h | |||
@@ -112,19 +112,28 @@ static inline void x86_teardown_msi_irq(unsigned int irq) | |||
112 | { | 112 | { |
113 | x86_msi.teardown_msi_irq(irq); | 113 | x86_msi.teardown_msi_irq(irq); |
114 | } | 114 | } |
115 | static inline void x86_restore_msi_irqs(struct pci_dev *dev, int irq) | ||
116 | { | ||
117 | x86_msi.restore_msi_irqs(dev, irq); | ||
118 | } | ||
115 | #define arch_setup_msi_irqs x86_setup_msi_irqs | 119 | #define arch_setup_msi_irqs x86_setup_msi_irqs |
116 | #define arch_teardown_msi_irqs x86_teardown_msi_irqs | 120 | #define arch_teardown_msi_irqs x86_teardown_msi_irqs |
117 | #define arch_teardown_msi_irq x86_teardown_msi_irq | 121 | #define arch_teardown_msi_irq x86_teardown_msi_irq |
122 | #define arch_restore_msi_irqs x86_restore_msi_irqs | ||
118 | /* implemented in arch/x86/kernel/apic/io_apic. */ | 123 | /* implemented in arch/x86/kernel/apic/io_apic. */ |
119 | int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); | 124 | int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); |
120 | void native_teardown_msi_irq(unsigned int irq); | 125 | void native_teardown_msi_irq(unsigned int irq); |
126 | void native_restore_msi_irqs(struct pci_dev *dev, int irq); | ||
121 | /* default to the implementation in drivers/lib/msi.c */ | 127 | /* default to the implementation in drivers/lib/msi.c */ |
122 | #define HAVE_DEFAULT_MSI_TEARDOWN_IRQS | 128 | #define HAVE_DEFAULT_MSI_TEARDOWN_IRQS |
129 | #define HAVE_DEFAULT_MSI_RESTORE_IRQS | ||
123 | void default_teardown_msi_irqs(struct pci_dev *dev); | 130 | void default_teardown_msi_irqs(struct pci_dev *dev); |
131 | void default_restore_msi_irqs(struct pci_dev *dev, int irq); | ||
124 | #else | 132 | #else |
125 | #define native_setup_msi_irqs NULL | 133 | #define native_setup_msi_irqs NULL |
126 | #define native_teardown_msi_irq NULL | 134 | #define native_teardown_msi_irq NULL |
127 | #define default_teardown_msi_irqs NULL | 135 | #define default_teardown_msi_irqs NULL |
136 | #define default_restore_msi_irqs NULL | ||
128 | #endif | 137 | #endif |
129 | 138 | ||
130 | #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys) | 139 | #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys) |