Index: arch/alpha/Kconfig
===================================================================
RCS file: /var/cvs/linux-2.5/arch/alpha/Kconfig,v
retrieving revision 1.13
diff -u -p -r1.13 Kconfig
--- arch/alpha/Kconfig 5 May 2003 17:05:24 -0000 1.13
+++ arch/alpha/Kconfig 9 Jun 2003 14:59:36 -0000
@@ -295,6 +295,10 @@ config PCI
information about which PCI hardware does work under Linux and which
doesn't.
- printk(KERN_WARNING "No IOC for PCI Bus %02x:%02x in ACPI\n", PCI_SEGMENT(bus), bus->number);
+ printk(KERN_WARNING "No IOC for PCI Bus %04x:%02x in ACPI\n", pci_domain_nr(bus), bus->number);
}
static int __init
Index: arch/ia64/pci/pci.c
===================================================================
RCS file: /var/cvs/linux-2.5/arch/ia64/pci/pci.c,v
retrieving revision 1.7
diff -u -p -r1.7 pci.c
--- arch/ia64/pci/pci.c 27 May 2003 17:21:22 -0000 1.7
+++ arch/ia64/pci/pci.c 8 Jun 2003 16:05:53 -0000
@@ -87,14 +87,14 @@ __pci_sal_write (int seg, int bus, int d
static int
pci_sal_read (struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value)
{
- return __pci_sal_read(PCI_SEGMENT(bus), bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn),
+ return __pci_sal_read(pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn),
where, size, value);
}
static int
pci_sal_write (struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value)
{
- return __pci_sal_write(PCI_SEGMENT(bus), bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn),
+ return __pci_sal_write(pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn),
where, size, value);
}
Index: arch/ppc/Kconfig
===================================================================
RCS file: /var/cvs/linux-2.5/arch/ppc/Kconfig,v
retrieving revision 1.12
diff -u -p -r1.12 Kconfig
--- arch/ppc/Kconfig 27 May 2003 17:21:39 -0000 1.12
+++ arch/ppc/Kconfig 9 Jun 2003 16:49:12 -0000
@@ -757,6 +757,10 @@ config PCI
your box. If you say Y here, the kernel will include drivers and
infrastructure code to support PCI bus devices.
/*
- * Return the index of the PCI controller for device pdev.
- */
-int pci_controller_num(struct pci_dev *dev)
-{
- struct pci_controller *hose = (struct pci_controller *) dev->sysdata;
-
- return hose->index;
-}
-
-/*
* Platform support for /proc/bus/pci/X/Y mmap()s,
* modelled on the sparc64 implementation by Dave Miller.
* -- paulus.
Index: arch/ppc64/Kconfig
===================================================================
RCS file: /var/cvs/linux-2.5/arch/ppc64/Kconfig,v
retrieving revision 1.11
diff -u -p -r1.11 Kconfig
--- arch/ppc64/Kconfig 5 May 2003 17:05:54 -0000 1.11
+++ arch/ppc64/Kconfig 9 Jun 2003 16:49:19 -0000
@@ -164,6 +164,10 @@ config PCI
your box. If you say Y here, the kernel will include drivers and
infrastructure code to support PCI bus devices.
+config PCI_DOMAINS
+ bool
+ default PCI
+
# only elf supported, a.out is not -- Cort
config KCORE_ELF
bool
Index: arch/ppc64/kernel/pci.c
===================================================================
RCS file: /var/cvs/linux-2.5/arch/ppc64/kernel/pci.c,v
retrieving revision 1.10
diff -u -p -r1.10 pci.c
--- arch/ppc64/kernel/pci.c 27 May 2003 17:21:51 -0000 1.10
+++ arch/ppc64/kernel/pci.c 9 Jun 2003 16:37:05 -0000
@@ -371,11 +371,11 @@ int pcibios_enable_device(struct pci_dev
}
/*
- * Return the index of the PCI controller for device pdev.
+ * Return the domain number for this bus.
*/
-int pci_controller_num(struct pci_dev *dev)
+int pci_domain_nr(struct pci_bus *bus)
{
- struct pci_controller *hose = PCI_GET_PHB_PTR(dev);
+ struct pci_controller *hose = PCI_GET_PHB_PTR(bus);
return hose->global_number;
}
Index: arch/sparc64/Kconfig
===================================================================
RCS file: /var/cvs/linux-2.5/arch/sparc64/Kconfig,v
retrieving revision 1.14
diff -u -p -r1.14 Kconfig
--- arch/sparc64/Kconfig 27 May 2003 17:22:04 -0000 1.14
+++ arch/sparc64/Kconfig 9 Jun 2003 16:49:26 -0000
@@ -318,6 +318,10 @@ config PCI
information about which PCI hardware does work under Linux and which
doesn't.
/* now put in global tree */
- strcpy(dev->dev.bus_id,dev->slot_name);
+ sprintf(dev->dev.bus_id, "%04x:%s", pci_domain_nr(bus),
+ dev->slot_name);
dev->dev.dma_mask = &dev->dma_mask;
-/* Return the index of the PCI controller for device PDEV. */
-#define pci_controller_num(PDEV) (0)
-
#endif /* _ASM_H8300_PCI_H */
Index: include/asm-i386/pci.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-i386/pci.h,v
retrieving revision 1.5
diff -u -p -r1.5 pci.h
--- include/asm-i386/pci.h 18 Mar 2003 00:58:42 -0000 1.5
+++ include/asm-i386/pci.h 9 Jun 2003 16:25:58 -0000
@@ -90,12 +90,6 @@ pci_dac_dma_sync_single(struct pci_dev *
#define sg_dma_address(sg) ((sg)->dma_address)
#define sg_dma_len(sg) ((sg)->length)
-/* Return the index of the PCI controller for device. */
-static inline int pci_controller_num(struct pci_dev *dev)
-{
- return 0;
-}
-
#define HAVE_PCI_MMAP
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine);
Index: include/asm-ia64/pci.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-ia64/pci.h,v
retrieving revision 1.7
diff -u -p -r1.7 pci.h
--- include/asm-ia64/pci.h 27 May 2003 17:28:04 -0000 1.7
+++ include/asm-ia64/pci.h 9 Jun 2003 16:26:10 -0000
@@ -70,9 +70,6 @@ extern int pcibios_prep_mwi (struct pci_
#define pci_dac_dma_to_offset(dev,dma_addr) ((dma_addr) & ~PAGE_MASK)
#define pci_dac_dma_sync_single(dev,dma_addr,len,dir) do { mb(); } while (0)
-/* Return the index of the PCI controller for device PDEV. */
-#define pci_controller_num(PDEV) (0)
-
#define sg_dma_len(sg) ((sg)->dma_length)
#define sg_dma_address(sg) ((sg)->dma_address)
-/* Return the index of the PCI controller for device PDEV. */
-#define pci_controller_num(PDEV) (0)
-
/* The PCI address space does equal the physical memory
* address space. The networking and block device layers use
* this boolean for bounce buffer decisions.
Index: include/asm-mips/pci.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-mips/pci.h,v
retrieving revision 1.4
diff -u -p -r1.4 pci.h
--- include/asm-mips/pci.h 18 Mar 2003 00:58:47 -0000 1.4
+++ include/asm-mips/pci.h 9 Jun 2003 16:26:25 -0000
@@ -237,9 +237,6 @@ extern inline int pci_dma_supported(stru
}
-/* Return the index of the PCI controller for device. */
-#define pci_controller_num(pdev) (0)
-
/*
* These macros should be used after a pci_map_sg call has been done
* to get bus addresses of each of the SG entries and their lengths.
Index: include/asm-mips64/pci.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-mips64/pci.h,v
retrieving revision 1.4
diff -u -p -r1.4 pci.h
--- include/asm-mips64/pci.h 18 Mar 2003 00:58:49 -0000 1.4
+++ include/asm-mips64/pci.h 9 Jun 2003 16:26:30 -0000
@@ -256,11 +256,6 @@ static inline int pci_dma_supported(stru
}
/*
- * Return the index of the PCI controller for device.
- */
-#define pci_controller_num(pdev) (0)
-
-/*
* These macros should be used after a pci_map_sg call has been done
* to get bus addresses of each of the SG entries and their lengths.
* You should only work with the number of sg entries pci_map_sg
Index: include/asm-parisc/pci.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-parisc/pci.h,v
retrieving revision 1.8
diff -u -p -r1.8 pci.h
--- include/asm-parisc/pci.h 18 Mar 2003 00:58:51 -0000 1.8
+++ include/asm-parisc/pci.h 9 Jun 2003 16:26:36 -0000
@@ -180,9 +180,6 @@ extern inline void pcibios_register_hba(
/* Don't support DAC yet. */
#define pci_dac_dma_supported(pci_dev, mask) (0)
-/* Return the index of the PCI controller for device PDEV. */
-#define pci_controller_num(PDEV) (0)
-
/* export the pci_ DMA API in terms of the dma_ one */
#include <asm-generic/pci-dma-compat.h>
Index: include/asm-ppc/pci-bridge.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-ppc/pci-bridge.h,v
retrieving revision 1.5
diff -u -p -r1.5 pci-bridge.h
--- include/asm-ppc/pci-bridge.h 11 Jan 2003 23:05:45 -0000 1.5
+++ include/asm-ppc/pci-bridge.h 9 Jun 2003 16:47:43 -0000
@@ -39,7 +39,7 @@ pci_process_bridge_OF_ranges(struct pci_
* Structure of a PCI controller (host bridge)
*/
struct pci_controller {
- int index; /* used for pci_controller_num */
+ int index; /* PCI domain number */
struct pci_controller *next;
struct pci_bus *bus;
void *arch_data;
Index: include/asm-ppc/pci.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-ppc/pci.h,v
retrieving revision 1.6
diff -u -p -r1.6 pci.h
--- include/asm-ppc/pci.h 27 May 2003 17:28:25 -0000 1.6
+++ include/asm-ppc/pci.h 9 Jun 2003 16:52:44 -0000
@@ -266,7 +266,7 @@ pci_dac_dma_sync_single(struct pci_dev *
}
/* Return the index of the PCI controller for device PDEV. */
-extern int pci_controller_num(struct pci_dev *pdev);
+#define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index
/* Map a range of PCI memory or I/O space for a device into user space */
int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
Index: include/asm-ppc64/pci.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-ppc64/pci.h,v
retrieving revision 1.5
diff -u -p -r1.5 pci.h
--- include/asm-ppc64/pci.h 8 Apr 2003 15:20:34 -0000 1.5
+++ include/asm-ppc64/pci.h 9 Jun 2003 16:37:38 -0000
@@ -86,8 +86,7 @@ static inline int pci_dma_supported(stru
return 1;
}
-/* Return the index of the PCI controller for device PDEV. */
-extern int pci_controller_num(struct pci_dev *pdev);
+extern int pci_domain_nr(struct pci_bus *bus);
struct vm_area_struct;
/* Map a range of PCI memory or I/O space for a device into user space */
Index: include/asm-sh/pci.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-sh/pci.h,v
retrieving revision 1.4
diff -u -p -r1.4 pci.h
--- include/asm-sh/pci.h 18 Mar 2003 00:58:55 -0000 1.4
+++ include/asm-sh/pci.h 9 Jun 2003 16:27:25 -0000
@@ -226,9 +226,6 @@ static inline int pci_dma_supported(stru
*/
#define pci_dac_dma_supported(pci_dev, mask) (0)
-/* Return the index of the PCI controller for device PDEV. */
-#define pci_controller_num(PDEV) (0)
-
/* These macros should be used after a pci_map_sg call has been done
* to get bus addresses of each of the SG entries and their lengths.
* You should only work with the number of sg entries pci_map_sg
Index: include/asm-sparc/pci.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-sparc/pci.h,v
retrieving revision 1.4
diff -u -p -r1.4 pci.h
--- include/asm-sparc/pci.h 24 Apr 2003 01:37:42 -0000 1.4
+++ include/asm-sparc/pci.h 9 Jun 2003 16:27:29 -0000
@@ -132,9 +132,6 @@ extern inline int pci_dma_supported(stru
#define pci_dac_dma_supported(dev, mask) (0)
-/* Return the index of the PCI controller for device PDEV. */
-#define pci_controller_num(PDEV) (0)
-
#endif /* __KERNEL__ */
-/* Return the index of the PCI controller for device. */
-static inline int pci_controller_num(struct pci_dev *dev)
-{
- return 0;
-}
-
#define HAVE_PCI_MMAP
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine);
Index: include/linux/pci.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/linux/pci.h,v
retrieving revision 1.16
diff -u -p -r1.16 pci.h
--- include/linux/pci.h 27 May 2003 17:29:00 -0000 1.16
+++ include/linux/pci.h 9 Jun 2003 14:58:42 -0000
@@ -868,5 +868,15 @@ extern int pci_pci_problems;
#define PCIPCI_VSFX 16
#define PCIPCI_ALIMAGIK 32
+/*
+ * PCI domain support. Sometimes called PCI segment (eg by ACPI),
+ * a PCI domain is defined to be a set of PCI busses which share
+ * configuration space.
+ */
+
+#ifndef CONFIG_PCI_DOMAINS
+#define pci_domain_nr(bus) 0
+#endif
+
#endif /* __KERNEL__ */
#endif /* LINUX_PCI_H */