PCI cleanups
Subsystems (5)
PATCH 1/1 PCI cleanups
The patch below does some cleanups in the PCI code:
- make OSC_UUID in drivers/pci/pci-acpi.c static
- remove the completely unused drivers/pci/hotplug/pciehp_sysfs.c
- remove other unused code
Please review which of these changes are correct and which conflict with pending changes.
diffstat output:
arch/arm/mach-ixp4xx/common-pci.c | 10 arch/i386/pci/irq.c | 29 -- arch/ia64/pci/pci.c | 8 drivers/pci/hotplug/Makefile | 1 drivers/pci/hotplug/pciehp.h | 3 drivers/pci/hotplug/pciehp_sysfs.c | 143 ------------- drivers/pci/msi.c | 301 ----------------------------- drivers/pci/msi.h | 1 drivers/pci/pci-acpi.c | 97 --------- drivers/pci/pci.c | 60 ----- drivers/pci/rom.c | 52 ----- include/linux/pci-acpi.h | 2 include/linux/pci.h | 12 - 13 files changed, 1 insertion(+), 718 deletions(-)
drivers/pci/hotplug/pciehp.h renamed from drivers/pci/hotplug/pciehp.h.old +0 -3
@@ -207,9 +207,6 @@#define msg_button_cancel "PCI slot #%d - action canceled due to button press.\n"#define msg_button_ignore "PCI slot #%d - button press ignored. (action in progress...)\n" -/* sysfs function for the hotplug controller info */ -extern void pciehp_create_ctrl_files (struct controller *ctrl); -/* controller functions */ extern int pciehprm_find_available_resources (struct controller *ctrl);extern int pciehp_event_start_thread (void );
drivers/pci/hotplug/Makefile renamed from drivers/pci/hotplug/Makefile.old +0 -1
@@ -51,7 +51,6 @@ pciehp-objs := pciehp_core.o \ pciehp_ctrl.o \ pciehp_pci.o \ - pciehp_sysfs.o \ pciehp_hpc.o ifdef CONFIG_ACPI_BUS pciehp-objs += pciehprm_acpi.o
include/linux/pci.h renamed from include/linux/pci.h.old +0 -12
@@ -732,7 +732,6 @@struct pci_dev *pci_find_device_reverse (unsigned int vendor,unsigned int device,const struct pci_dev *from);struct pci_dev *pci_find_slot (unsigned int bus,unsigned int devfn);int pci_find_capability (struct pci_dev *dev,int cap); -int pci_find_ext_capability (struct pci_dev *dev,int cap);struct pci_bus *pci_find_next_bus (const struct pci_bus *from);struct pci_dev *pci_get_device (unsigned int vendor,unsigned int device,struct pci_dev *from);
@@ -783,15 +782,12 @@int pci_set_mwi (struct pci_dev *dev);void pci_clear_mwi (struct pci_dev *dev);int pci_set_dma_mask (struct pci_dev *dev,u64 mask); -int pci_dac_set_dma_mask (struct pci_dev *dev,u64 mask);int pci_set_consistent_dma_mask (struct pci_dev *dev,u64 mask);int pci_assign_resource (struct pci_dev *dev,int i);/* ROM control related routines */ void __iomem *pci_map_rom (struct pci_dev *pdev,size_t *size); -void __iomem *pci_map_rom_copy (struct pci_dev *pdev,size_t *size);void pci_unmap_rom (struct pci_dev *pdev,void __iomem *rom); -void pci_remove_rom (struct pci_dev *pdev);/* Power management related routines */ int pci_save_state (struct pci_dev *dev);
@@ -855,17 +851,11 @@static inline void pci_scan_msi_device (struct pci_dev *dev) {}static inline int pci_enable_msi (struct pci_dev *dev) {return -1 ;}static inline void pci_disable_msi (struct pci_dev *dev) {} -static inline int pci_enable_msix (struct pci_dev * dev, -struct msix_entry *entries,int nvec) {return -1 ;} -static inline void pci_disable_msix (struct pci_dev *dev) {}static inline void msi_remove_pci_irq_vectors (struct pci_dev *dev) {}#else extern void pci_scan_msi_device (struct pci_dev *dev);extern int pci_enable_msi (struct pci_dev *dev);extern void pci_disable_msi (struct pci_dev *dev); -extern int pci_enable_msix (struct pci_dev * dev, -struct msix_entry *entries,int nvec); -extern void pci_disable_msix (struct pci_dev *dev);extern void msi_remove_pci_irq_vectors (struct pci_dev *dev);#endif
@@ -913,12 +903,10 @@static inline int pci_enable_device (struct pci_dev *dev) {return -EIO ; }static inline void pci_disable_device (struct pci_dev *dev) { }static inline int pci_set_dma_mask (struct pci_dev *dev,u64 mask) {return -EIO ; } -static inline int pci_dac_set_dma_mask (struct pci_dev *dev,u64 mask) {return -EIO ; }static inline int pci_assign_resource (struct pci_dev *dev,int i) {return -EBUSY ;}static inline int pci_register_driver (struct pci_driver *drv) {return 0 ;}static inline void pci_unregister_driver (struct pci_driver *drv) { }static inline int pci_find_capability (struct pci_dev *dev,int cap) {return 0 ; } -static inline int pci_find_ext_capability (struct pci_dev *dev,int cap) {return 0 ; }static inline const struct pci_device_id *pci_match_device (const struct pci_device_id *ids,const struct pci_dev *dev) {return NULL ; }/* Power management related routines */
drivers/pci/msi.h renamed from drivers/pci/msi.h.old +0 -1
@@ -21,7 +21,6 @@extern int vector_irq[NR_VECTORS ];extern cpumask_t pending_irq_balance_cpumask[NR_IRQS ];extern void (*interrupt[NR_IRQS ])(void ); -extern int pci_vector_resources (int last,int nr_released);#ifdef CONFIG_SMP #define set_msi_irq_affinity set_msi_affinity
drivers/pci/msi.c renamed from drivers/pci/msi.c.old +0 -301
316 lines not on this page · raw message
arch/i386/pci/irq.c renamed from arch/i386/pci/irq.c.old +0 -29
@@ -1085,32 +1085,3 @@return 0 ; } -int pci_vector_resources (int last,int nr_released) -{ -int count = nr_released; - -int next = last; -int offset = (last %8 ); - -while (next <FIRST_SYSTEM_VECTOR ) { - next +=8 ; -#ifdef CONFIG_X86_64 -if (next ==IA32_SYSCALL_VECTOR ) -continue ; -#else -if (next ==SYSCALL_VECTOR ) -continue ; -#endif - count++; -if (next >=FIRST_SYSTEM_VECTOR ) { -if (offset%8 ) { - next =FIRST_DEVICE_VECTOR + offset; - offset++; -continue ; - } - count--; - } - } - -return count; -}
arch/ia64/pci/pci.c renamed from arch/ia64/pci/pci.c.old +0 -8
@@ -605,11 +605,3 @@return rc; } -int pci_vector_resources (int last,int nr_released) -{ -int count = nr_released; - - count += (IA64_LAST_DEVICE_VECTOR - last); - -return count; -}
include/linux/pci-acpi.h renamed from include/linux/pci-acpi.h.old +0 -2
@@ -48,14 +48,12 @@#ifdef CONFIG_ACPI extern acpi_status pci_osc_control_set (u32 flags); -extern acpi_status pci_osc_support_set (u32 flags);#else #if !defined(acpi_status)typedef u32 acpi_status ;#define AE_ERROR (acpi_status) (0x0001)#endif static inline acpi_status pci_osc_control_set (u32 flags) {return AE_ERROR ;} -static inline acpi_status pci_osc_support_set (u32 flags) {return AE_ERROR ;}#endif #endif /* _PCI_ACPI_H_ */
drivers/pci/pci-acpi.c renamed from drivers/pci/pci-acpi.c.old +1 -96
109 lines not on this page · raw message
drivers/pci/pci.c renamed from drivers/pci/pci.c.old +0 -60
78 lines not on this page · raw message
arch/arm/mach-ixp4xx/common-pci.c renamed from arch/arm/mach-ixp4xx/common-pci.c.old +0 -10
@@ -519,15 +519,6 @@ }int -pci_dac_set_dma_mask (struct pci_dev *dev,u64 mask) -{ -if (mask >=SZ_64M -1 ) -return 0 ; - -return -EIO ; -} - -int pci_set_consistent_dma_mask (struct pci_dev *dev,u64 mask) {if (mask >=SZ_64M -1 )
@@ -537,7 +528,6 @@ }EXPORT_SYMBOL (pci_set_dma_mask); -EXPORT_SYMBOL (pci_dac_set_dma_mask);EXPORT_SYMBOL (pci_set_consistent_dma_mask);EXPORT_SYMBOL (ixp4xx_pci_read);EXPORT_SYMBOL (ixp4xx_pci_write);
drivers/pci/rom.c renamed from drivers/pci/rom.c.old +0 -52
68 lines not on this page · raw message
drivers/pci/hotplug/pciehp_sysfs.c deleted +0 -143
143 lines not on this page · raw message
Quoted 5 lines · Adrian Bunk
The patch below does some cleanups in the PCI code:
- makeOSC_UUIDindrivers/pci/pci-acpi.cstatic
- remove the completely unuseddrivers/pci/hotplug/pciehp_sysfs.c
- remove other unused code
Quoted 7 lines
Please review which of these changes are correct and which conflict with pending changes.
drivers/pci/hotplug/Makefile | 1 drivers/pci/hotplug/pciehp.h | 3 drivers/pci/hotplug/pciehp_sysfs.c | 143 -------------
Yeah, this can be deleted. Care to make a patch for just this?
Quoted 2 lines
drivers/pci/msi.c | 301 ----------------------------- drivers/pci/msi.h | 1
These changes are for when drivers want to start taking advantage of some MSI features. I've heard rumors that those drivers will be public soon, but haven't seen them yet :(
Quoted 1 line
drivers/pci/pci-acpi.c | 97 ---------
This is needed for some upcoming PCI Express changes, and should not be dropped. I've seen the code that needs this, but it is still under development and isn't ready for mainline yet.
Quoted 2 lines
drivers/pci/pci.c | 60 ----- drivers/pci/rom.c | 52 -----
These changes are needed by upcoming video driver changes.
thanks,
greg k-h
Greg> These changes are for when drivers want to start taking Greg> advantage of some MSI features. I've heard rumors that Greg> those drivers will be public soon, but haven't seen them yet :(
My Mellanox HCA driver -- subversion tree at
https://openib.org/svn/gen2/trunk/src/linux-kernel/infiniband/hw/mthca
can use multiple MSI-X vectors with this kernel API. I'll be submitting it for upstream inclusion soon, so please don't remove the kernel support.
Of course there isn't a yet stable device firmware release that enables MSI-X ;(
Thanks,
Roland
PATCH 1/1 remove unused drivers/pci/hotplug/pciehp_sysfs.c
In reply to Greg KHQuoted 10 lines · Greg KH
Quoted 8 lines · Adrian Bunk
The patch below does some cleanups in the PCI code:
- makeOSC_UUIDindrivers/pci/pci-acpi.cstatic
- remove the completely unuseddrivers/pci/hotplug/pciehp_sysfs.c
- remove other unused codePlease review which of these changes are correct and which conflict with pending changes.
Quoted 5 lines
Quoted 3 lines
drivers/pci/hotplug/Makefile | 1 drivers/pci/hotplug/pciehp.h | 3 drivers/pci/hotplug/pciehp_sysfs.c | 143 -------------Yeah, this can be deleted. Care to make a patch for just this?
It's below.
Quoted 13 lines
Quoted 2 lines
drivers/pci/msi.c | 301 ----------------------------- drivers/pci/msi.h | 1These changes are for when drivers want to start taking advantage of some MSI features. I've heard rumors that those drivers will be public soon, but haven't seen them yet :(
Quoted 1 line
drivers/pci/pci-acpi.c | 97 ---------This is needed for some upcoming PCI Express changes, and should not be dropped. I've seen the code that needs this, but it is still under development and isn't ready for mainline yet.
Quoted 5 lines
Quoted 2 lines
drivers/pci/pci.c | 60 ----- drivers/pci/rom.c | 52 -----These changes are needed by upcoming video driver changes.
...
OK, then these should clearly stay.
<-- snip -->
Remove unused the drivers/pci/hotplug/pciehp_sysfs.c
diffstat output:
drivers/pci/hotplug/Makefile | 1 drivers/pci/hotplug/pciehp.h | 3 drivers/pci/hotplug/pciehp_sysfs.c | 143 ----------------------------- 3 files changed, 147 deletions(-)
drivers/pci/hotplug/Makefile renamed from drivers/pci/hotplug/Makefile.old +0 -1
@@ -51,7 +51,6 @@ pciehp-objs := pciehp_core.o \ pciehp_ctrl.o \ pciehp_pci.o \ - pciehp_sysfs.o \ pciehp_hpc.o ifdef CONFIG_ACPI_BUS pciehp-objs += pciehprm_acpi.o
drivers/pci/hotplug/pciehp.h renamed from drivers/pci/hotplug/pciehp.h.old +0 -3
@@ -207,9 +207,6 @@#define msg_button_cancel "PCI slot #%d - action canceled due to button press.\n"#define msg_button_ignore "PCI slot #%d - button press ignored. (action in progress...)\n" -/* sysfs function for the hotplug controller info */ -extern void pciehp_create_ctrl_files (struct controller *ctrl); -/* controller functions */ extern int pciehprm_find_available_resources (struct controller *ctrl);extern int pciehp_event_start_thread (void );
drivers/pci/hotplug/pciehp_sysfs.c deleted +0 -143
143 lines not on this page · raw message
Greg KH
AppliedRe: [2.6 patch] remove unused drivers/pci/hotplug/pciehp_sysfs.c
Quoted 11 lines · Adrian Bunk
Quoted 10 lines · Greg KH
Quoted 8 lines · Adrian Bunk
The patch below does some cleanups in the PCI code:
- makeOSC_UUIDindrivers/pci/pci-acpi.cstatic
- remove the completely unuseddrivers/pci/hotplug/pciehp_sysfs.c
- remove other unused codePlease review which of these changes are correct and which conflict with pending changes.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
drivers/pci/hotplug/Makefile | 1 drivers/pci/hotplug/pciehp.h | 3 drivers/pci/hotplug/pciehp_sysfs.c | 143 -------------Yeah, this can be deleted. Care to make a patch for just this?
It's below.
Applied, thanks.
greg k-h