diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-12-19 22:54:55 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-20 00:18:10 -0500 |
commit | 50c9bc2fc86fddd39eea6a12ceb81585bc2aafaa (patch) | |
tree | a6021e68bdc0477ada4bc81d04443e3316cdbb4f /arch/powerpc/kernel/pci-common.c | |
parent | 3fd94c6b1a1158d3e0e505b0a00c3a707b5fcd40 (diff) |
[POWERPC] fix iSeries PCI resource management
The way iSeries manages PCI IO and Memory resources is a bit strange
and is based on overriding the content of those resources with home
cooked ones afterward.
This changes it a bit to better integrate with the new resource handling
so that the "virtual" tokens that iSeries replaces resources with are
done from the proper per-device fixup hook, and bridge resources are
set to enclose that token space. This fixes various things such as
the output of /proc/iomem & ioports, among others. This also fixes up
various boot messages as well.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/pci-common.c')
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index d804c8d0be00..f706b7e83d7e 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -190,6 +190,20 @@ int pci_read_irq_line(struct pci_dev *pci_dev) | |||
190 | struct of_irq oirq; | 190 | struct of_irq oirq; |
191 | unsigned int virq; | 191 | unsigned int virq; |
192 | 192 | ||
193 | /* The current device-tree that iSeries generates from the HV | ||
194 | * PCI informations doesn't contain proper interrupt routing, | ||
195 | * and all the fallback would do is print out crap, so we | ||
196 | * don't attempt to resolve the interrupts here at all, some | ||
197 | * iSeries specific fixup does it. | ||
198 | * | ||
199 | * In the long run, we will hopefully fix the generated device-tree | ||
200 | * instead. | ||
201 | */ | ||
202 | #ifdef CONFIG_PPC_ISERIES | ||
203 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | ||
204 | return -1; | ||
205 | #endif | ||
206 | |||
193 | DBG("Try to map irq for %s...\n", pci_name(pci_dev)); | 207 | DBG("Try to map irq for %s...\n", pci_name(pci_dev)); |
194 | 208 | ||
195 | #ifdef DEBUG | 209 | #ifdef DEBUG |
@@ -946,7 +960,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list) | |||
946 | || res->start > res->end) | 960 | || res->start > res->end) |
947 | continue; | 961 | continue; |
948 | if (bus->parent == NULL) | 962 | if (bus->parent == NULL) |
949 | pr = (res->flags & IORESOURCE_IO)? | 963 | pr = (res->flags & IORESOURCE_IO) ? |
950 | &ioport_resource : &iomem_resource; | 964 | &ioport_resource : &iomem_resource; |
951 | else { | 965 | else { |
952 | /* Don't bother with non-root busses when | 966 | /* Don't bother with non-root busses when |