diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-05-08 02:06:27 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-05-08 19:41:24 -0400 |
commit | 34768bc8329194b14e42ee408a84edfa40059046 (patch) | |
tree | 3fff53138966f3a58e796a71c19a3b75de86fbf7 /arch/sparc64/kernel/pci.c | |
parent | 5a4a3e592d0d66653297049373caa7ac5b4febe0 (diff) |
[SPARC64] PCI: Use root list of pbm's instead of pci_controller_info's
The idea is to move more and more things into the pbm,
with the eventual goal of eliminating the pci_controller_info
entirely as there really isn't any need for it.
This stage of the transformations requires some reworking of
the PCI error interrupt handling.
It might be tricky to get rid of the pci_controller_info parenting for
a few reasons:
1) When we get an uncorrectable or correctable error we want
to interrogate the IOMMU and streaming cache of both
PBMs for error status. These errors come from the UPA
front-end which is shared between the two PBM PCI bus
segments.
Historically speaking this is why I choose the datastructure
hierarchy of pci_controller_info-->pci_pbm_info
2) The probing does a portid/devhandle match to look for the
'other' pbm, but this is entirely an artifact and can be
eliminated trivially.
What we could do to solve #1 is to have a "buddy" pointer from one pbm
to another.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci.c')
-rw-r--r-- | arch/sparc64/kernel/pci.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index 966861b212be..c17723fb1c31 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -48,7 +48,7 @@ asmlinkage int sys_pciconfig_write(unsigned long bus, unsigned long dfn, | |||
48 | #else | 48 | #else |
49 | 49 | ||
50 | /* List of all PCI controllers found in the system. */ | 50 | /* List of all PCI controllers found in the system. */ |
51 | struct pci_controller_info *pci_controller_root = NULL; | 51 | struct pci_pbm_info *pci_pbm_root = NULL; |
52 | 52 | ||
53 | /* Each PCI controller found gets a unique index. */ | 53 | /* Each PCI controller found gets a unique index. */ |
54 | int pci_num_controllers = 0; | 54 | int pci_num_controllers = 0; |
@@ -291,7 +291,7 @@ extern const struct pci_iommu_ops pci_sun4u_iommu_ops, | |||
291 | 291 | ||
292 | /* Find each controller in the system, attach and initialize | 292 | /* Find each controller in the system, attach and initialize |
293 | * software state structure for each and link into the | 293 | * software state structure for each and link into the |
294 | * pci_controller_root. Setup the controller enough such | 294 | * pci_pbm_root. Setup the controller enough such |
295 | * that bus scanning can be done. | 295 | * that bus scanning can be done. |
296 | */ | 296 | */ |
297 | static void __init pci_controller_probe(void) | 297 | static void __init pci_controller_probe(void) |
@@ -776,10 +776,10 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm) | |||
776 | 776 | ||
777 | static void __init pci_scan_each_controller_bus(void) | 777 | static void __init pci_scan_each_controller_bus(void) |
778 | { | 778 | { |
779 | struct pci_controller_info *p; | 779 | struct pci_pbm_info *pbm; |
780 | 780 | ||
781 | for (p = pci_controller_root; p; p = p->next) | 781 | for (pbm = pci_pbm_root; pbm; pbm = pbm->next) |
782 | p->scan_bus(p); | 782 | pbm->scan_bus(pbm); |
783 | } | 783 | } |
784 | 784 | ||
785 | extern void power_init(void); | 785 | extern void power_init(void); |
@@ -787,7 +787,7 @@ extern void power_init(void); | |||
787 | static int __init pcibios_init(void) | 787 | static int __init pcibios_init(void) |
788 | { | 788 | { |
789 | pci_controller_probe(); | 789 | pci_controller_probe(); |
790 | if (pci_controller_root == NULL) | 790 | if (pci_pbm_root == NULL) |
791 | return 0; | 791 | return 0; |
792 | 792 | ||
793 | pci_scan_each_controller_bus(); | 793 | pci_scan_each_controller_bus(); |