Commit 82c16c41 authored by Pat Gefre's avatar Pat Gefre Committed by Tony Luck

[IA64-SGI] make pci_root_ops non static

add extern for pci_root_ops
delete our version of the pci_root_ops code
make pci_root_ops non static

Ack-by: Matthew Wilcox
Ack-by: Jesse Barnes
Ack-by: Grant Grundler
Signed-off-by: default avatarPatrick Gefre <pfg@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent fcfdffe5
...@@ -124,7 +124,7 @@ pci_write (struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val ...@@ -124,7 +124,7 @@ pci_write (struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val
devfn, where, size, value); devfn, where, size, value);
} }
static struct pci_ops pci_root_ops = { struct pci_ops pci_root_ops = {
.read = pci_read, .read = pci_read,
.write = pci_write, .write = pci_write,
}; };
......
...@@ -33,29 +33,6 @@ struct brick { ...@@ -33,29 +33,6 @@ struct brick {
int sn_ioif_inited = 0; /* SN I/O infrastructure initialized? */ int sn_ioif_inited = 0; /* SN I/O infrastructure initialized? */
static int
sn_pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size,
u32 * value)
{
return raw_pci_ops->read(pci_domain_nr(bus), bus->number,
devfn, where, size, value);
}
static int
sn_pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size,
u32 value)
{
return raw_pci_ops->write(pci_domain_nr(bus), bus->number,
devfn, where, size, value);
}
struct pci_ops sn_pci_root_ops = {
.read = sn_pci_read,
.write = sn_pci_write,
};
/* /*
* Retrieve the DMA Flush List given nasid. This list is needed * Retrieve the DMA Flush List given nasid. This list is needed
* to implement the WAR - Flush DMA data on PIO Reads. * to implement the WAR - Flush DMA data on PIO Reads.
...@@ -281,10 +258,10 @@ static void sn_pci_fixup_slot(struct pci_dev *dev) ...@@ -281,10 +258,10 @@ static void sn_pci_fixup_slot(struct pci_dev *dev)
} }
/* /*
* sn_pci_fixup_bus() - This routine sets up a bus's resources * sn_pci_controller_fixup() - This routine sets up a bus's resources
* consistent with the Linux PCI abstraction layer. * consistent with the Linux PCI abstraction layer.
*/ */
static void sn_pci_fixup_bus(int segment, int busnum) static void sn_pci_controller_fixup(int segment, int busnum)
{ {
int status = 0; int status = 0;
int nasid, cnode; int nasid, cnode;
...@@ -305,7 +282,7 @@ static void sn_pci_fixup_bus(int segment, int busnum) ...@@ -305,7 +282,7 @@ static void sn_pci_fixup_bus(int segment, int busnum)
controller = sn_alloc_pci_sysdata(); controller = sn_alloc_pci_sysdata();
/* controller non-zero is BUG'd in sn_alloc_pci_sysdata */ /* controller non-zero is BUG'd in sn_alloc_pci_sysdata */
bus = pci_scan_bus(busnum, &sn_pci_root_ops, controller); bus = pci_scan_bus(busnum, &pci_root_ops, controller);
if (bus == NULL) { if (bus == NULL) {
return; /* error, or bus already scanned */ return; /* error, or bus already scanned */
} }
...@@ -377,7 +354,7 @@ static int __init sn_pci_init(void) ...@@ -377,7 +354,7 @@ static int __init sn_pci_init(void)
#endif #endif
for (i = 0; i < PCI_BUSES_TO_SCAN; i++) { for (i = 0; i < PCI_BUSES_TO_SCAN; i++) {
sn_pci_fixup_bus(0, i); sn_pci_controller_fixup(0, i);
} }
/* /*
......
...@@ -105,6 +105,8 @@ struct pci_controller { ...@@ -105,6 +105,8 @@ struct pci_controller {
#define PCI_CONTROLLER(busdev) ((struct pci_controller *) busdev->sysdata) #define PCI_CONTROLLER(busdev) ((struct pci_controller *) busdev->sysdata)
#define pci_domain_nr(busdev) (PCI_CONTROLLER(busdev)->segment) #define pci_domain_nr(busdev) (PCI_CONTROLLER(busdev)->segment)
extern struct pci_ops pci_root_ops;
static inline int pci_name_bus(char *name, struct pci_bus *bus) static inline int pci_name_bus(char *name, struct pci_bus *bus)
{ {
if (pci_domain_nr(bus) == 0) { if (pci_domain_nr(bus) == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment