aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/pci.h
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-08-09 16:27:06 -0400
committerJason Cooper <jason@lakedaemon.net>2013-08-12 11:26:39 -0400
commit4287d824f265451cd10f6d20266b27a207a6cdd7 (patch)
treec98175713116fca3634ceded2c039be9d6f9ed63 /arch/x86/include/asm/pci.h
parentad81f0545ef01ea651886dddac4bef6cec930092 (diff)
PCI: use weak functions for MSI arch-specific functions
Until now, the MSI architecture-specific functions could be overloaded using a fairly complex set of #define and compile-time conditionals. In order to prepare for the introduction of the msi_chip infrastructure, it is desirable to switch all those functions to use the 'weak' mechanism. This commit converts all the architectures that were overidding those MSI functions to use the new strategy. Note that we keep two separate, non-weak, functions default_teardown_msi_irqs() and default_restore_msi_irqs() for the default behavior of the arch_teardown_msi_irqs() and arch_restore_msi_irqs(), as the default behavior is needed by x86 PCI code. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Tested-by: Daniel Price <daniel.price@gmail.com> Tested-by: Thierry Reding <thierry.reding@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: linuxppc-dev@lists.ozlabs.org Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: linux390@de.ibm.com Cc: linux-s390@vger.kernel.org Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: x86@kernel.org Cc: Russell King <linux@arm.linux.org.uk> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: linux-ia64@vger.kernel.org Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: David S. Miller <davem@davemloft.net> Cc: sparclinux@vger.kernel.org Cc: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/x86/include/asm/pci.h')
-rw-r--r--arch/x86/include/asm/pci.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h
index d9e9e6c7ed32..7d7443283a9d 100644
--- a/arch/x86/include/asm/pci.h
+++ b/arch/x86/include/asm/pci.h
@@ -100,29 +100,6 @@ static inline void early_quirks(void) { }
100extern void pci_iommu_alloc(void); 100extern void pci_iommu_alloc(void);
101 101
102#ifdef CONFIG_PCI_MSI 102#ifdef CONFIG_PCI_MSI
103/* MSI arch specific hooks */
104static inline int x86_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
105{
106 return x86_msi.setup_msi_irqs(dev, nvec, type);
107}
108
109static inline void x86_teardown_msi_irqs(struct pci_dev *dev)
110{
111 x86_msi.teardown_msi_irqs(dev);
112}
113
114static inline void x86_teardown_msi_irq(unsigned int irq)
115{
116 x86_msi.teardown_msi_irq(irq);
117}
118static inline void x86_restore_msi_irqs(struct pci_dev *dev, int irq)
119{
120 x86_msi.restore_msi_irqs(dev, irq);
121}
122#define arch_setup_msi_irqs x86_setup_msi_irqs
123#define arch_teardown_msi_irqs x86_teardown_msi_irqs
124#define arch_teardown_msi_irq x86_teardown_msi_irq
125#define arch_restore_msi_irqs x86_restore_msi_irqs
126/* implemented in arch/x86/kernel/apic/io_apic. */ 103/* implemented in arch/x86/kernel/apic/io_apic. */
127struct msi_desc; 104struct msi_desc;
128int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); 105int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type);
@@ -130,16 +107,9 @@ void native_teardown_msi_irq(unsigned int irq);
130void native_restore_msi_irqs(struct pci_dev *dev, int irq); 107void native_restore_msi_irqs(struct pci_dev *dev, int irq);
131int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, 108int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc,
132 unsigned int irq_base, unsigned int irq_offset); 109 unsigned int irq_base, unsigned int irq_offset);
133/* default to the implementation in drivers/lib/msi.c */
134#define HAVE_DEFAULT_MSI_TEARDOWN_IRQS
135#define HAVE_DEFAULT_MSI_RESTORE_IRQS
136void default_teardown_msi_irqs(struct pci_dev *dev);
137void default_restore_msi_irqs(struct pci_dev *dev, int irq);
138#else 110#else
139#define native_setup_msi_irqs NULL 111#define native_setup_msi_irqs NULL
140#define native_teardown_msi_irq NULL 112#define native_teardown_msi_irq NULL
141#define default_teardown_msi_irqs NULL
142#define default_restore_msi_irqs NULL
143#endif 113#endif
144 114
145#define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys) 115#define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys)