Skip to contentSkip to conversation

PCI: Export pci_cfg_space_size

PATCH Applied Benjamin Herrenschmidt 2 participants 2 messages Dec 13, 2005 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: Export pci_cfg_space_size

The powerpc PCI code sets up the PCI tree without doing config space accesses in most cases, from the firmware tree. However, it still wants to call pci_cfg_space_size() under some conditions, thus it needs to be made non-static (though I don't see a point to export it to modules).

---

Greg: I don't remember if I already sent you that patch or not, if not, then heh, here it is :) The powerpc patch that requires this one will be going next to the powerpc git tree and -mm, with a 2.6.16 target. Let me know if there is any objection.

Paul: You need that for the new G5 support patch that I'm sending next.

drivers/pci/probe.c +1 -1
Index: linux-work/drivers/pci/probe.c
===================================================================
@@ -678,7 +678,7 @@ static void pci_release_dev(struct devic
  * reading the dword at 0x100 which must either be 0 or a valid extended
  * capability header.
  */
-static int pci_cfg_space_size(struct pci_dev *dev)
+int pci_cfg_space_size(struct pci_dev *dev)
 {
 	int pos;
 	u32 status;
include/linux/pci.h +1 -0
Index: linux-work/include/linux/pci.h
===================================================================
@@ -515,6 +515,7 @@ int pci_scan_bridge(struct pci_bus *bus,
 
 void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *),
 		  void *userdata);
+int pci_cfg_space_size(struct pci_dev *dev);
 
 /* kmem_cache style wrapper around pci_alloc_consistent() */
 
#1 lore raw

patch pci-export-pci_cfg_space_size.patch added to gregkh-2.6 tree

This is a note to let you know that I've just added the patch titled

Subject: [PATCH] PCI: Export pci_cfg_space_size

to my gregkh-2.6 tree. Its filename is

pci-export-pci_cfg_space_size.patch

This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/

Patches currently in gregkh-2.6 which might be from [email protected] are

i2c/i2c-drop-driver-owner-and-name-04-macintosh.patch pci/pci-export-pci_cfg_space_size.patch

Quoted 1 line

From [email protected] Mon Dec 12 23:16:21 2005

Subject: [PATCH] PCI: Export pci_cfg_space_size
From: Benjamin Herrenschmidt <[email protected]>
To: Greg KH <[email protected]>, Paul Mackerras <[email protected]>
Cc: linux-pci <[email protected]>, linuxppc64-dev <[email protected]>, linuxppc-dev list <[email protected]>
Date: Tue, 13 Dec 2005 18:09:16 +1100
Message-Id: <1134457757.6989.195.camel@gaston>

The powerpc PCI code sets up the PCI tree without doing config space accesses in most cases, from the firmware tree. However, it still wants to call pci_cfg_space_size() under some conditions, thus it needs to be made non-static (though I don't see a point to export it to modules).

---
 drivers/pci/probe.c |    2 +-
 include/linux/pci.h |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/pci/probe.c +1 -1
@@ -717,7 +717,7 @@ static void pci_release_dev(struct devic
  * reading the dword at 0x100 which must either be 0 or a valid extended
  * capability header.
  */
-static int pci_cfg_space_size(struct pci_dev *dev)
+int pci_cfg_space_size(struct pci_dev *dev)
 {
 	int pos;
 	u32 status;
include/linux/pci.h +1 -0
@@ -514,6 +514,7 @@ int pci_scan_bridge(struct pci_bus *bus,
 
 void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *),
 		  void *userdata);
+int pci_cfg_space_size(struct pci_dev *dev);
 
 /* kmem_cache style wrapper around pci_alloc_consistent() */