2.4 fix pci_generic_prep_mwi export breakage
PATCH 1/1 2.4 fix pci_generic_prep_mwi export breakage
I think the recent change to pci.c to export pci_generic_prep_mwi() is incorrect.
pci_generic_prep_mwi() is only defined if !HAVE_ARCH_PCI_MWI, so it is wrong to export it. In particular, it breaks on ia64, because we define HAVE_ARCH_PCI_MWI.
It looks to me like the following patch should be applied. This removes the export and in fact makes pci_generic_prep_mwi() static as it is in 2.5.
===== drivers/pci/pci.c 1.45 vs edited =====
drivers/pci/pci.c +1 -2
@@ -921,7 +921,7 @@* * RETURNS: An appriopriate -ERRNO error value on eror, or zero for success. */ -int +static int pci_generic_prep_mwi (struct pci_dev *dev) {u8 cacheline_size;
@@ -2151,7 +2151,6 @@EXPORT_SYMBOL (pci_set_master);EXPORT_SYMBOL (pci_set_mwi);EXPORT_SYMBOL (pci_clear_mwi); -EXPORT_SYMBOL (pci_generic_prep_mwi);EXPORT_SYMBOL (pci_set_dma_mask);EXPORT_SYMBOL (pci_dac_set_dma_mask);EXPORT_SYMBOL (pci_assign_resource);
===== include/linux/pci.h 1.34 vs edited =====
include/linux/pci.h +0 -1
@@ -628,7 +628,6 @@#define HAVE_PCI_SET_MWI int pci_set_mwi (struct pci_dev *dev);void pci_clear_mwi (struct pci_dev *dev); -int pci_generic_prep_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_assign_resource (struct pci_dev *dev,int i);
Quoted 9 lines · Bjorn Helgaas
I think the recent change to
pci.cto exportpci_generic_prep_mwi()is incorrect.
pci_generic_prep_mwi()is only defined if !HAVE_ARCH_PCI_MWI, so it is wrong to export it. In particular, it breaks on ia64, because we defineHAVE_ARCH_PCI_MWI.It looks to me like the following patch should be applied. This removes the export and in fact makes
pci_generic_prep_mwi()static as it is in 2.5.
Looks OK to me. Marcelo applied this already, right?
Jeff
Quoted 8 lines · Jeff Garzik
Quoted 7 lines · Bjorn Helgaas
I think the recent change to
pci.cto exportpci_generic_prep_mwi()is incorrect.
pci_generic_prep_mwi()is only defined if !HAVE_ARCH_PCI_MWI, so it is wrong to export it. In particular, it breaks on ia64, because we defineHAVE_ARCH_PCI_MWI.
Quoted 6 lines
Quoted 3 lines
It looks to me like the following patch should be applied. This removes the export and in fact makes
pci_generic_prep_mwi()static as it is in 2.5.Looks OK to me. Marcelo applied this already, right?
Well I dont remember applying it but I dont seem to have pci_generic_prep_mwi exported.
Quoted 9 lines · Marcelo Tosatti
Quoted 8 lines · Jeff Garzik
Quoted 7 lines · Bjorn Helgaas
I think the recent change to
pci.cto exportpci_generic_prep_mwi()is incorrect.
pci_generic_prep_mwi()is only defined if !HAVE_ARCH_PCI_MWI, so it is wrong to export it. In particular, it breaks on ia64, because we defineHAVE_ARCH_PCI_MWI.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
It looks to me like the following patch should be applied. This removes the export and in fact makes
pci_generic_prep_mwi()static as it is in 2.5.Looks OK to me. Marcelo applied this already, right?
Well I dont remember applying it but I dont seem to have
pci_generic_prep_mwiexported.
Looks to me like your tree still needs this change. Here's the patch again in case you need it:
===== drivers/pci/pci.c 1.45 vs edited =====
drivers/pci/pci.c +1 -2
@@ -921,7 +921,7 @@* * RETURNS: An appriopriate -ERRNO error value on eror, or zero for success. */ -int +static int pci_generic_prep_mwi (struct pci_dev *dev) {u8 cacheline_size;
@@ -2151,7 +2151,6 @@EXPORT_SYMBOL (pci_set_master);EXPORT_SYMBOL (pci_set_mwi);EXPORT_SYMBOL (pci_clear_mwi); -EXPORT_SYMBOL (pci_generic_prep_mwi);EXPORT_SYMBOL (pci_set_dma_mask);EXPORT_SYMBOL (pci_dac_set_dma_mask);EXPORT_SYMBOL (pci_assign_resource);
===== include/linux/pci.h 1.34 vs edited =====
include/linux/pci.h +0 -1
@@ -628,7 +628,6 @@#define HAVE_PCI_SET_MWI int pci_set_mwi (struct pci_dev *dev);void pci_clear_mwi (struct pci_dev *dev); -int pci_generic_prep_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_assign_resource (struct pci_dev *dev,int i);