aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda.c13
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