From 82c16c41cd042a5ae88c889e22b6e6d43cb00319 Mon Sep 17 00:00:00 2001 From: Pat Gefre Date: Mon, 11 Oct 2004 20:43:28 +0000 Subject: [PATCH] [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: Patrick Gefre Signed-off-by: Tony Luck --- arch/ia64/pci/pci.c | 2 +- arch/ia64/sn/kernel/io_init.c | 31 ++++--------------------------- include/asm-ia64/pci.h | 2 ++ 3 files changed, 7 insertions(+), 28 deletions(-) diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index dd33eaf87c326..9a5f1baf4745c 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -124,7 +124,7 @@ pci_write (struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val devfn, where, size, value); } -static struct pci_ops pci_root_ops = { +struct pci_ops pci_root_ops = { .read = pci_read, .write = pci_write, }; diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index d165a2e0806e2..7aa533e8de465 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c @@ -33,29 +33,6 @@ struct brick { 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 * to implement the WAR - Flush DMA data on PIO Reads. @@ -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. */ -static void sn_pci_fixup_bus(int segment, int busnum) +static void sn_pci_controller_fixup(int segment, int busnum) { int status = 0; int nasid, cnode; @@ -305,7 +282,7 @@ static void sn_pci_fixup_bus(int segment, int busnum) controller = 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) { return; /* error, or bus already scanned */ } @@ -377,7 +354,7 @@ static int __init sn_pci_init(void) #endif for (i = 0; i < PCI_BUSES_TO_SCAN; i++) { - sn_pci_fixup_bus(0, i); + sn_pci_controller_fixup(0, i); } /* diff --git a/include/asm-ia64/pci.h b/include/asm-ia64/pci.h index 86f7e8ee13996..dfd58c28c0806 100644 --- a/include/asm-ia64/pci.h +++ b/include/asm-ia64/pci.h @@ -105,6 +105,8 @@ struct pci_controller { #define PCI_CONTROLLER(busdev) ((struct pci_controller *) busdev->sysdata) #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) { if (pci_domain_nr(bus) == 0) { -- 2.53.0