PCI: Turn pcibios_penalize_isa_irq() into __weak function
Subsystems (11)
PATCH 1/1 PCI: Turn pcibios_penalize_isa_irq() into __weak function
pcibios_penalize_isa_irq() is only useful for x86 now, and legacy ISA is not used by some architectures, so make pcibios_penalize_isa_irq() as __weak function to simplify the code, this will prevent new platform from introducing dummy stub function for pcibios_penalize_isa_irq() too.
--- arch/alpha/include/asm/pci.h | 5 ----- arch/arm/include/asm/pci.h | 5 ----- arch/blackfin/include/asm/pci.h | 5 ----- arch/cris/include/asm/pci.h | 1 - arch/frv/include/asm/pci.h | 2 -- arch/frv/mb93090-mb00/pci-irq.c | 4 ---- arch/ia64/include/asm/pci.h | 6 ------ arch/microblaze/include/asm/pci.h | 5 ----- arch/mips/include/asm/pci.h | 5 ----- arch/mn10300/include/asm/pci.h | 1 - arch/mn10300/unit-asb2305/pci-irq.c | 4 ---- arch/parisc/include/asm/pci.h | 5 ----- arch/powerpc/include/asm/pci.h | 5 ----- arch/sh/include/asm/pci.h | 5 ----- arch/sparc/include/asm/pci_32.h | 5 ----- arch/sparc/include/asm/pci_64.h | 5 ----- arch/unicore32/include/asm/pci.h | 5 ----- arch/x86/include/asm/pci.h | 1 - arch/xtensa/include/asm/pci.h | 5 ----- drivers/pci/pci.c | 11 +++++++++++ include/linux/pci.h | 1 + 21 files changed, 12 insertions(+), 79 deletions(-)
arch/alpha/include/asm/pci.h +0 -5
@@ -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.
arch/arm/include/asm/pci.h +0 -5
@@ -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
arch/blackfin/include/asm/pci.h +0 -5
@@ -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 */
arch/cris/include/asm/pci.h +0 -1
@@ -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);
arch/frv/include/asm/pci.h +0 -2
@@ -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);
arch/frv/mb93090-mb00/pci-irq.c +0 -4
@@ -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);
arch/ia64/include/asm/pci.h +0 -6
@@ -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
arch/microblaze/include/asm/pci.h +0 -5
@@ -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 );
arch/mips/include/asm/pci.h +0 -5
@@ -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,
arch/mn10300/include/asm/pci.h +0 -1
@@ -48,7 +48,6 @@ extern void unit_pci_init(void);#define PCIBIOS_MIN_MEM 0xB8000000void pcibios_set_master (struct pci_dev *dev); -void pcibios_penalize_isa_irq (int irq);/* Dynamic DMA mapping stuff. * i386 has everything mapped statically.
arch/mn10300/unit-asb2305/pci-irq.c +0 -4
@@ -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);
arch/parisc/include/asm/pci.h +0 -5
@@ -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 ;
arch/powerpc/include/asm/pci.h +0 -5
@@ -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) {
arch/sh/include/asm/pci.h +0 -5
@@ -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. */
arch/sparc/include/asm/pci_32.h +0 -5
@@ -16,11 +16,6 @@#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)
arch/sparc/include/asm/pci_64.h +0 -5
@@ -16,11 +16,6 @@#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.
arch/unicore32/include/asm/pci.h +0 -5
@@ -18,11 +18,6 @@#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,
arch/x86/include/asm/pci.h +0 -1
@@ -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);
arch/xtensa/include/asm/pci.h +0 -5
@@ -22,11 +22,6 @@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
drivers/pci/pci.c +11 -0
@@ -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 - provide arch specific hooks when penalize isa irq +* @irq: isa irq to penalize +* @active: irq active or not +* +* Permits the platform to provide architecture specific functionality when +* penalize isa irq. 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;
include/linux/pci.h +1 -0
@@ -1579,6 +1579,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;
Signature · 1 line
1.7.9.5
PATCH 1/1 PCI: Turn pcibios_penalize_isa_irq() into __weak function
Quoted 7 lines · On Tuesday 06 May 2014 11:29:52 Hanjun Guo wrote:
pcibios_penalize_isa_irq()is only useful for x86 now, and legacy ISA is not used by some architectures, so makepcibios_penalize_isa_irq()as__weakfunction to simplify the code, this will prevent new platform from introducing dummy stub function forpcibios_penalize_isa_irq()too.Signed-off-by Hanjun Guo <[email protected]>
PATCH 1/1 PCI: Turn pcibios_penalize_isa_irq() into __weak function
Quoted 11 lines · Arnd Bergmann
Quoted 7 lines · On Tuesday 06 May 2014 11:29:52 Hanjun Guo wrote:
pcibios_penalize_isa_irq()is only useful for x86 now, and legacy ISA is not used by some architectures, so makepcibios_penalize_isa_irq()as__weakfunction to simplify the code, this will prevent new platform from introducing dummy stub function forpcibios_penalize_isa_irq()too.Signed-off-by Hanjun Guo <[email protected]>Acked-by Arnd Bergmann <[email protected]>
Hi Bjorn,
Any comments on this patch?
Thanks
Hanjun
Bjorn Helgaas
maintainerPATCH 1/1 PCI: Turn pcibios_penalize_isa_irq() into __weak function
In reply to Hanjun GuoQuoted 7 lines · Hanjun Guo
pcibios_penalize_isa_irq()is only useful for x86 now, and legacy ISA is not used by some architectures, so makepcibios_penalize_isa_irq()as__weakfunction to simplify the code, this will prevent new platform from introducing dummy stub function forpcibios_penalize_isa_irq()too.Signed-off-by Hanjun Guo <[email protected]>
Applied with Arnd's ack to pci/misc for v3.16, thanks.
Quoted 347 lines
--- arch/alpha/include/asm/pci.h | 5 ----- arch/arm/include/asm/pci.h | 5 ----- arch/blackfin/include/asm/pci.h | 5 ----- arch/cris/include/asm/pci.h | 1 - arch/frv/include/asm/pci.h | 2 -- arch/frv/mb93090-mb00/pci-irq.c | 4 ---- arch/ia64/include/asm/pci.h | 6 ------ arch/microblaze/include/asm/pci.h | 5 ----- arch/mips/include/asm/pci.h | 5 ----- arch/mn10300/include/asm/pci.h | 1 - arch/mn10300/unit-asb2305/pci-irq.c | 4 ---- arch/parisc/include/asm/pci.h | 5 ----- arch/powerpc/include/asm/pci.h | 5 ----- arch/sh/include/asm/pci.h | 5 ----- arch/sparc/include/asm/pci_32.h | 5 ----- arch/sparc/include/asm/pci_64.h | 5 ----- arch/unicore32/include/asm/pci.h | 5 ----- arch/x86/include/asm/pci.h | 1 - arch/xtensa/include/asm/pci.h | 5 ----- drivers/pci/pci.c | 11 +++++++++++ include/linux/pci.h | 1 + 21 files changed, 12 insertions(+), 79 deletions(-)arch/alpha/include/asm/pci.h +0
-5@@ -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. arch/arm/include/asm/pci.h +0
-5@@ -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 arch/blackfin/include/asm/pci.h +0
-5@@ -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 */ arch/cris/include/asm/pci.h +0
-1@@ -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);arch/frv/include/asm/pci.h +0
-2@@ -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);arch/frv/mb93090-mb00/pci-irq.c +0
-4@@ -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);arch/ia64/include/asm/pci.h +0
-6@@ -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 arch/microblaze/include/asm/pci.h +0
-5@@ -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 );arch/mips/include/asm/pci.h +0
-5@@ -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,arch/mn10300/include/asm/pci.h +0
-1@@ -48,7 +48,6 @@ extern void unit_pci_init(void);#define PCIBIOS_MIN_MEM 0xB8000000void pcibios_set_master (struct pci_dev *dev); -void pcibios_penalize_isa_irq (int irq);/* Dynamic DMA mapping stuff. * i386 has everything mapped statically. arch/mn10300/unit-asb2305/pci-irq.c +0
-4@@ -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);arch/parisc/include/asm/pci.h +0
-5@@ -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 ;arch/powerpc/include/asm/pci.h +0
-5@@ -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) {arch/sh/include/asm/pci.h +0
-5@@ -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. */ arch/sparc/include/asm/pci_32.h +0
-5@@ -16,11 +16,6 @@#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)arch/sparc/include/asm/pci_64.h +0
-5@@ -16,11 +16,6 @@#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. arch/unicore32/include/asm/pci.h +0
-5@@ -18,11 +18,6 @@#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,arch/x86/include/asm/pci.h +0
-1@@ -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);arch/xtensa/include/asm/pci.h +0
-5@@ -22,11 +22,6 @@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 0x2000drivers/pci/pci.c +11
-0@@ -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 - provide arch specific hooks when penalize isa irq +* @irq: isa irq to penalize +* @active: irq active or not +* +* Permits the platform to provide architecture specific functionality when +* penalize isa irq. 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;include/linux/pci.h +1
-0@@ -1579,6 +1579,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;Signature · 1 line
1.7.9.5