[ppc64] 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 -puN arch/ppc64/kernel/prom.c~ppc64-devinit_fixes arch/ppc64/kernel/prom.c --- 25/arch/ppc64/kernel/prom.c~ppc64-devinit_fixes 2004-01-13 23:22:40.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/prom.c 2004-01-13 23:22:40.000000000 -0800 @@ -1568,7 +1568,7 @@ finish_node(struct device_node *np, unsi /* * 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 -puN arch/ppc64/kernel/pSeries_pci.c~ppc64-devinit_fixes arch/ppc64/kernel/pSeries_pci.c --- 25/arch/ppc64/kernel/pSeries_pci.c~ppc64-devinit_fixes 2004-01-13 23:22:40.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/pSeries_pci.c 2004-01-13 23:22:40.000000000 -0800 @@ -176,6 +176,7 @@ int pci_read_irq_line(struct pci_dev *pc 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 #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_resourc } } } +EXPORT_SYMBOL(pcibios_fixup_device_resources); void __devinit pcibios_fixup_bus(struct pci_bus *bus) { diff -puN arch/ppc64/kernel/pci.c~ppc64-devinit_fixes arch/ppc64/kernel/pci.c --- 25/arch/ppc64/kernel/pci.c~ppc64-devinit_fixes 2004-01-13 23:22:40.000000000 -0800 +++ 25-akpm/arch/ppc64/kernel/pci.c 2004-01-13 23:22:40.000000000 -0800 @@ -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 -puN include/asm-ppc64/pci.h~ppc64-devinit_fixes include/asm-ppc64/pci.h --- 25/include/asm-ppc64/pci.h~ppc64-devinit_fixes 2004-01-13 23:22:40.000000000 -0800 +++ 25-akpm/include/asm-ppc64/pci.h 2004-01-13 23:22:40.000000000 -0800 @@ -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 */ _