]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
PCI: Turn pcibios_penalize_isa_irq() into a weak function
authorHanjun Guo <hanjun.guo@linaro.org>
Tue, 6 May 2014 03:29:52 +0000 (11:29 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 27 May 2014 22:23:58 +0000 (16:23 -0600)
pcibios_penalize_isa_irq() is only implemented by x86 now, and legacy ISA
is not used by some architectures.  Make pcibios_penalize_isa_irq() a
__weak function to simplify the code.  This removes the need for new
platforms to add stub implementations of pcibios_penalize_isa_irq().

[bhelgaas: changelog, comments]
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
21 files changed:
arch/alpha/include/asm/pci.h
arch/arm/include/asm/pci.h
arch/blackfin/include/asm/pci.h
arch/cris/include/asm/pci.h
arch/frv/include/asm/pci.h
arch/frv/mb93090-mb00/pci-irq.c
arch/ia64/include/asm/pci.h
arch/microblaze/include/asm/pci.h
arch/mips/include/asm/pci.h
arch/mn10300/include/asm/pci.h
arch/mn10300/unit-asb2305/pci-irq.c
arch/parisc/include/asm/pci.h
arch/powerpc/include/asm/pci.h
arch/sh/include/asm/pci.h
arch/sparc/include/asm/pci_32.h
arch/sparc/include/asm/pci_64.h
arch/unicore32/include/asm/pci.h
arch/x86/include/asm/pci.h
arch/xtensa/include/asm/pci.h
drivers/pci/pci.c
include/linux/pci.h

index d01afb78919c076c9a064c30dd29af8deb9a8bfc..f7f680f7457dec0cc7ba0b9a5562c2041b2a5a4a 100644 (file)
@@ -59,11 +59,6 @@ struct pci_controller {
 
 extern void pcibios_set_master(struct pci_dev *dev);
 
-extern inline void pcibios_penalize_isa_irq(int irq, int active)
-{
-       /* We don't do dynamic PCI IRQ allocation */
-}
-
 /* IOMMU controls.  */
 
 /* The PCI address space does not equal the physical memory address space.
index 680a83e944672d876d7d05144ecebb2f2eff321a..7e95d8535e24fc0cf1200800bed42fed53b825d7 100644 (file)
@@ -31,11 +31,6 @@ static inline int pci_proc_domain(struct pci_bus *bus)
 }
 #endif /* CONFIG_PCI_DOMAINS */
 
-static inline void pcibios_penalize_isa_irq(int irq, int active)
-{
-       /* We don't do dynamic PCI IRQ allocation */
-}
-
 /*
  * The PCI address space does equal the physical memory address space.
  * The networking and block device layers use this boolean for bounce
index 74352c4597d92f5802531ac0ca86c08766b6a62f..c737909fba470554d07911041bc03a6047ff71ea 100644 (file)
@@ -10,9 +10,4 @@
 #define PCIBIOS_MIN_IO 0x00001000
 #define PCIBIOS_MIN_MEM 0x10000000
 
-static inline void pcibios_penalize_isa_irq(int irq)
-{
-       /* We don't do dynamic PCI IRQ allocation */
-}
-
 #endif                         /* _ASM_BFIN_PCI_H */
index f666734926d548a233e6ab5e5bc810cb48c3d67a..cc2399c175e9ea8181e2fc837d737dad28a9f779 100644 (file)
@@ -20,7 +20,6 @@ void pcibios_config_init(void);
 struct pci_bus * pcibios_scan_root(int bus);
 
 void pcibios_set_master(struct pci_dev *dev);
-void pcibios_penalize_isa_irq(int irq);
 struct irq_routing_table *pcibios_get_irq_routing_table(void);
 int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
 
index ef03baf5d89de314f39fd1920f1e71755387a3f3..2035a4d3f9b98c36a7463741a2fd19d0e038a803 100644 (file)
@@ -24,8 +24,6 @@ struct pci_dev;
 
 extern void pcibios_set_master(struct pci_dev *dev);
 
-extern void pcibios_penalize_isa_irq(int irq);
-
 #ifdef CONFIG_MMU
 extern void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle);
 extern void consistent_free(void *vaddr);
index c677b9d81d30a00f858bf268c29717a260231b07..1c35c93f942bd17967e68edd8c07692107260a91 100644 (file)
@@ -55,10 +55,6 @@ void __init pcibios_fixup_irqs(void)
        }
 }
 
-void __init pcibios_penalize_isa_irq(int irq)
-{
-}
-
 void pcibios_enable_irq(struct pci_dev *dev)
 {
        pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
index 7d41cc0898224ec2211a6e0304e71ac4bb269a5d..52af5ed9f60ba98654f4657e7dd84e7b36f88390 100644 (file)
@@ -50,12 +50,6 @@ struct pci_dev;
 extern unsigned long ia64_max_iommu_merge_mask;
 #define PCI_DMA_BUS_IS_PHYS    (ia64_max_iommu_merge_mask == ~0UL)
 
-static inline void
-pcibios_penalize_isa_irq (int irq, int active)
-{
-       /* We don't do dynamic PCI IRQ allocation */
-}
-
 #include <asm-generic/pci-dma-compat.h>
 
 #ifdef CONFIG_PCI
index 935f9bec414ae9f9cb4781faed4fc57e2f764f90..335524040fffeaef858a160bdf0626d67e2a411c 100644 (file)
@@ -44,11 +44,6 @@ struct pci_dev;
  */
 #define pcibios_assign_all_busses()    0
 
-static inline void pcibios_penalize_isa_irq(int irq, int active)
-{
-       /* We don't do dynamic PCI IRQ allocation */
-}
-
 #ifdef CONFIG_PCI
 extern void set_pci_dma_ops(struct dma_map_ops *dma_ops);
 extern struct dma_map_ops *get_pci_dma_ops(void);
index 12d6842962bedc8987a689eeff86aea8e5761a10..974b0e3089633609bf84a90c6324ddfb8f6de3f8 100644 (file)
@@ -73,11 +73,6 @@ extern unsigned long PCIBIOS_MIN_MEM;
 
 extern void pcibios_set_master(struct pci_dev *dev);
 
-static inline void pcibios_penalize_isa_irq(int irq, int active)
-{
-       /* We don't do dynamic PCI IRQ allocation */
-}
-
 #define HAVE_PCI_MMAP
 
 extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
index 166323824683c50fc0aa3eb2575159e760a78458..5f70af25c7d02a54315ed2b2da2e6fd12652e7d8 100644 (file)
@@ -48,7 +48,6 @@ extern void unit_pci_init(void);
 #define PCIBIOS_MIN_MEM                0xB8000000
 
 void pcibios_set_master(struct pci_dev *dev);
-void pcibios_penalize_isa_irq(int irq);
 
 /* Dynamic DMA mapping stuff.
  * i386 has everything mapped statically.
index 77439da04671a60ba0afdffbb47636f2cf81908e..fcb28ceb824d6dfa9460826deb87190a9417cf17 100644 (file)
@@ -40,10 +40,6 @@ void __init pcibios_fixup_irqs(void)
        }
 }
 
-void __init pcibios_penalize_isa_irq(int irq)
-{
-}
-
 void pcibios_enable_irq(struct pci_dev *dev)
 {
        pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
index 465154076d23f9c1191f6ff7dcc59cf7b61333de..20df2b04fc09f469ed517df9acc240bddff386e7 100644 (file)
@@ -215,11 +215,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev,
 }
 #endif
 
-static inline void pcibios_penalize_isa_irq(int irq, int active)
-{
-       /* We don't need to penalize isa irq's */
-}
-
 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
 {
        return channel ? 15 : 14;
index 95145a15c70822c2a98fbb7d9f4d006497839369..1b0739bc14b595655d9790d893257a627e059d80 100644 (file)
@@ -46,11 +46,6 @@ struct pci_dev;
 #define pcibios_assign_all_busses() \
        (pci_has_flag(PCI_REASSIGN_ALL_BUS))
 
-static inline void pcibios_penalize_isa_irq(int irq, int active)
-{
-       /* We don't do dynamic PCI IRQ allocation */
-}
-
 #define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ
 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
 {
index bff96c2e7d254f520aa3c089a8bded0dc2ea2ed6..5b4511552998d9207e7be0cd7d801ccb99242290 100644 (file)
@@ -70,11 +70,6 @@ extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
        enum pci_mmap_state mmap_state, int write_combine);
 extern void pcibios_set_master(struct pci_dev *dev);
 
-static inline void pcibios_penalize_isa_irq(int irq, int active)
-{
-       /* We don't do dynamic PCI IRQ allocation */
-}
-
 /* Dynamic DMA mapping stuff.
  * SuperH has everything mapped statically like x86.
  */
index dc503297481f4673874b973719c9afa79f004faa..53e9b4987db0b9212116945274f6d53d9c8bc448 100644 (file)
 
 #define PCI_IRQ_NONE           0xffffffff
 
-static inline void pcibios_penalize_isa_irq(int irq, int active)
-{
-       /* We don't do dynamic PCI IRQ allocation */
-}
-
 /* Dynamic DMA mapping stuff.
  */
 #define PCI_DMA_BUS_IS_PHYS    (0)
index 1633b718d3bc3c608ef59d4a7068108e815d1029..c6c7396e7627c814115d73c361b4ef194d565516 100644 (file)
 
 #define PCI_IRQ_NONE           0xffffffff
 
-static inline void pcibios_penalize_isa_irq(int irq, int active)
-{
-       /* We don't do dynamic PCI IRQ allocation */
-}
-
 /* The PCI address space does not equal the physical memory
  * address space.  The networking and block device layers use
  * this boolean for bounce buffer decisions.
index f5e108f4a151a9bbb2d72865bd0c83519dee9707..654407e98619d2aa247c9f23d65504aad60dfcf1 100644 (file)
 #include <asm-generic/pci.h>
 #include <mach/hardware.h> /* for PCIBIOS_MIN_* */
 
-static inline void pcibios_penalize_isa_irq(int irq, int active)
-{
-       /* We don't do dynamic PCI IRQ allocation */
-}
-
 #ifdef CONFIG_PCI
 static inline void pci_dma_burst_advice(struct pci_dev *pdev,
                                        enum pci_dma_burst_strategy *strat,
index 96ae4f4040bb359f8f3588f82f6595e41edbc501..0892ea0e683f01dbe6e79b649922a221db00b35c 100644 (file)
@@ -68,7 +68,6 @@ void pcibios_config_init(void);
 void pcibios_scan_root(int bus);
 
 void pcibios_set_master(struct pci_dev *dev);
-void pcibios_penalize_isa_irq(int irq, int active);
 struct irq_routing_table *pcibios_get_irq_routing_table(void);
 int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
 
index 614be031a79ab543295d8fe6b045db3a0aadb258..5d52dc43dfe73e55b5ee9e2e439fd73630ddd731 100644 (file)
 
 extern struct pci_controller* pcibios_alloc_controller(void);
 
-static inline void pcibios_penalize_isa_irq(int irq)
-{
-       /* We don't do dynamic PCI IRQ allocation */
-}
-
 /* Assume some values. (We should revise them, if necessary) */
 
 #define PCIBIOS_MIN_IO         0x2000
index 39012831867e619be58b27e9becaa472ea6dd73c..11f24912523c131fffb3e236257e5a6a815fc797 100644 (file)
@@ -1468,6 +1468,17 @@ void __weak pcibios_release_device(struct pci_dev *dev) {}
  */
 void __weak pcibios_disable_device (struct pci_dev *dev) {}
 
+/**
+ * pcibios_penalize_isa_irq - penalize an ISA IRQ
+ * @irq: ISA IRQ to penalize
+ * @active: IRQ active or not
+ *
+ * Permits the platform to provide architecture-specific functionality when
+ * penalizing ISA IRQs. This is the default implementation. Architecture
+ * implementations can override this.
+ */
+void __weak pcibios_penalize_isa_irq(int irq, int active) {}
+
 static void do_pci_disable_device(struct pci_dev *dev)
 {
        u16 pci_command;
index 84182b153b21e6916d3cf4070b54de438ab916d1..018877b8b4e8bfcd5661e5d130ddb505fb78a765 100644 (file)
@@ -1578,6 +1578,7 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev,
                                 enum pcie_reset_state state);
 int pcibios_add_device(struct pci_dev *dev);
 void pcibios_release_device(struct pci_dev *dev);
+void pcibios_penalize_isa_irq(int irq, int active);
 
 #ifdef CONFIG_HIBERNATE_CALLBACKS
 extern struct dev_pm_ops pcibios_pm_ops;