diff options
author | Gavin Shan <shangw@linux.vnet.ibm.com> | 2013-07-31 04:47:04 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-14 00:57:32 -0400 |
commit | c35d2a8c5f68e53ccbb4c0f64316a22af1729fca (patch) | |
tree | c273f431d92fda397a6a3d52e49c4f09f8c9a236 /arch/powerpc | |
parent | 2f1ec02ea162ad18556c35a00c6220fc613f26ce (diff) |
powerpc/powernv: Needn't IO segment map for PHB3
PHB3 doesn't support IO ports and we needn't IO segment map for that.
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/powernv/pci-ioda.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 829047baa4b2..74a5a5773b1f 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c | |||
@@ -1187,22 +1187,23 @@ void __init pnv_pci_init_ioda_phb(struct device_node *np, | |||
1187 | phb->ioda.io_segsize = phb->ioda.io_size / phb->ioda.total_pe; | 1187 | phb->ioda.io_segsize = phb->ioda.io_size / phb->ioda.total_pe; |
1188 | phb->ioda.io_pci_base = 0; /* XXX calculate this ? */ | 1188 | phb->ioda.io_pci_base = 0; /* XXX calculate this ? */ |
1189 | 1189 | ||
1190 | /* Allocate aux data & arrays | 1190 | /* Allocate aux data & arrays. We don't have IO ports on PHB3 */ |
1191 | * | ||
1192 | * XXX TODO: Don't allocate io segmap on PHB3 | ||
1193 | */ | ||
1194 | size = _ALIGN_UP(phb->ioda.total_pe / 8, sizeof(unsigned long)); | 1191 | size = _ALIGN_UP(phb->ioda.total_pe / 8, sizeof(unsigned long)); |
1195 | m32map_off = size; | 1192 | m32map_off = size; |
1196 | size += phb->ioda.total_pe * sizeof(phb->ioda.m32_segmap[0]); | 1193 | size += phb->ioda.total_pe * sizeof(phb->ioda.m32_segmap[0]); |
1197 | iomap_off = size; | 1194 | iomap_off = size; |
1198 | size += phb->ioda.total_pe * sizeof(phb->ioda.io_segmap[0]); | 1195 | if (phb->type == PNV_PHB_IODA1) { |
1196 | iomap_off = size; | ||
1197 | size += phb->ioda.total_pe * sizeof(phb->ioda.io_segmap[0]); | ||
1198 | } | ||
1199 | pemap_off = size; | 1199 | pemap_off = size; |
1200 | size += phb->ioda.total_pe * sizeof(struct pnv_ioda_pe); | 1200 | size += phb->ioda.total_pe * sizeof(struct pnv_ioda_pe); |
1201 | aux = alloc_bootmem(size); | 1201 | aux = alloc_bootmem(size); |
1202 | memset(aux, 0, size); | 1202 | memset(aux, 0, size); |
1203 | phb->ioda.pe_alloc = aux; | 1203 | phb->ioda.pe_alloc = aux; |
1204 | phb->ioda.m32_segmap = aux + m32map_off; | 1204 | phb->ioda.m32_segmap = aux + m32map_off; |
1205 | phb->ioda.io_segmap = aux + iomap_off; | 1205 | if (phb->type == PNV_PHB_IODA1) |
1206 | phb->ioda.io_segmap = aux + iomap_off; | ||
1206 | phb->ioda.pe_array = aux + pemap_off; | 1207 | phb->ioda.pe_array = aux + pemap_off; |
1207 | set_bit(0, phb->ioda.pe_alloc); | 1208 | set_bit(0, phb->ioda.pe_alloc); |
1208 | 1209 | ||