From 2160dc0657c756e119e30c4c4744a55a70912caf Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 18 Jan 2004 18:16:29 -0800 Subject: [PATCH] [PATCH] ppc64: Add exports and change some __init to __devinit for dynamic OF and pci hotplug, from John Rose and Linda Xie From: Anton Blanchard Add exports and change some __init to __devinit for dynamic OF and pci hotplug, from John Rose and Linda Xie --- arch/ppc64/kernel/pSeries_pci.c | 4 +++- arch/ppc64/kernel/pci.c | 2 ++ arch/ppc64/kernel/prom.c | 8 ++++---- include/asm-ppc64/pci.h | 5 +++++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/arch/ppc64/kernel/pSeries_pci.c b/arch/ppc64/kernel/pSeries_pci.c index 5dc480e4797b2..9b07f7d138efb 100644 --- a/arch/ppc64/kernel/pSeries_pci.c +++ b/arch/ppc64/kernel/pSeries_pci.c @@ -176,6 +176,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev) pci_name(pci_dev), pci_dev->irq); return 0; } +EXPORT_SYMBOL(pci_read_irq_line); #define ISA_SPACE_MASK 0x1 #define ISA_SPACE_IO 0x1 @@ -512,7 +513,7 @@ void pcibios_name_device(struct pci_dev *dev) #endif } -void __init pcibios_fixup_device_resources(struct pci_dev *dev, +void __devinit pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus) { /* Update device resources. */ @@ -531,6 +532,7 @@ void __init pcibios_fixup_device_resources(struct pci_dev *dev, } } } +EXPORT_SYMBOL(pcibios_fixup_device_resources); void __devinit pcibios_fixup_bus(struct pci_bus *bus) { diff --git a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c index fe1a8d0e295cc..86c2c6e7a3e7d 100644 --- a/arch/ppc64/kernel/pci.c +++ b/arch/ppc64/kernel/pci.c @@ -380,6 +380,8 @@ int pci_domain_nr(struct pci_bus *bus) return hose->global_number; } +EXPORT_SYMBOL(pci_domain_nr); + /* Set the name of the bus as it appears in /proc/bus/pci */ int pci_name_bus(char *name, struct pci_bus *bus) { diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c index cdc4c24ee6d91..d1625b92190bd 100644 --- a/arch/ppc64/kernel/prom.c +++ b/arch/ppc64/kernel/prom.c @@ -1568,7 +1568,7 @@ finish_node(struct device_node *np, unsigned long mem_start, /* * Find the interrupt parent of a node. */ -static struct device_node * __init +static struct device_node * __devinit intr_parent(struct device_node *p) { phandle *parp; @@ -1583,7 +1583,7 @@ intr_parent(struct device_node *p) * Find out the size of each entry of the interrupts property * for a node. */ -static int __init +static int __devinit prom_n_intr_cells(struct device_node *np) { struct device_node *p; @@ -1611,7 +1611,7 @@ prom_n_intr_cells(struct device_node *np) * Map an interrupt from a device up to the platform interrupt * descriptor. */ -static int __init +static int __devinit map_interrupt(unsigned int **irq, struct device_node **ictrler, struct device_node *np, unsigned int *ints, int nintrc) { @@ -2561,7 +2561,7 @@ out: /* * Find the device_node with a given phandle. */ -static struct device_node * __init +static struct device_node * __devinit find_phandle(phandle ph) { struct device_node *np; diff --git a/include/asm-ppc64/pci.h b/include/asm-ppc64/pci.h index 3042e637c2c5d..5c3515a500a97 100644 --- a/include/asm-ppc64/pci.h +++ b/include/asm-ppc64/pci.h @@ -141,6 +141,11 @@ unmap_bus_range(struct pci_bus *bus); extern int remap_bus_range(struct pci_bus *bus); +extern void +pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus); + +extern int pci_read_irq_line(struct pci_dev *dev); + #endif /* __KERNEL__ */ #endif /* __PPC64_PCI_H */ -- 2.53.0