Message ID | 1532702862-22751-4-git-send-email-arbab@linux.ibm.com |
---|---|
State | Superseded |
Headers | show |
Series | npu2: Add support for relaxed-ordering mode | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | master/apply_patch Successfully applied |
Reviewed-By: Alistair Popple <alistair@popple.id.au> On Friday, 27 July 2018 9:47:39 AM AEST Reza Arbab wrote: > Knowing the PEC index is going to be important when we enable relaxed > ordering, so store this value for later use. > > Signed-off-by: Alistair Popple <alistair@popple.id.au> > Signed-off-by: Reza Arbab <arbab@linux.ibm.com> > --- > hw/phb4.c | 2 ++ > include/phb4.h | 1 + > 2 files changed, 3 insertions(+) > > diff --git a/hw/phb4.c b/hw/phb4.c > index f2b9240..65dc16c 100644 > --- a/hw/phb4.c > +++ b/hw/phb4.c > @@ -5175,6 +5175,7 @@ static void phb4_create(struct dt_node *np) > /* Populate base stuff */ > p->index = dt_prop_get_u32(np, "ibm,phb-index"); > p->chip_id = dt_prop_get_u32(np, "ibm,chip-id"); > + p->pec = dt_prop_get_u32(np, "ibm,phb-pec-index"); > chip = get_chip(p->chip_id); > p->regs = (void *)dt_get_address(np, 0, NULL); > p->int_mmio = (void *)dt_get_address(np, 1, NULL); > @@ -5483,6 +5484,7 @@ static void phb4_probe_stack(struct dt_node *stk_node, uint32_t pec_index, > nest_base, nest_stack, pci_base, pci_stack, etu_base); > dt_add_property(np, "ibm,mmio-windows", mmio_win, 8 * mmio_win_sz); > dt_add_property_cells(np, "ibm,phb-index", phb_num); > + dt_add_property_cells(np, "ibm,phb-pec-index", pec_index); > dt_add_property_cells(np, "ibm,phb-stack", stk_node->phandle); > dt_add_property_cells(np, "ibm,phb-stack-index", stk_index); > dt_add_property_cells(np, "ibm,chip-id", gcid); > diff --git a/include/phb4.h b/include/phb4.h > index 4ab2912..3186dca 100644 > --- a/include/phb4.h > +++ b/include/phb4.h > @@ -169,6 +169,7 @@ struct phb4 { > unsigned int index; /* 0..5 index inside p9 */ > unsigned int flags; > unsigned int chip_id; /* Chip ID (== GCID on p9) */ > + unsigned int pec; > bool broken; > unsigned int rev; /* 00MMmmmm */ > #define PHB4_REV_NIMBUS_DD10 0xa40001 >
diff --git a/hw/phb4.c b/hw/phb4.c index f2b9240..65dc16c 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -5175,6 +5175,7 @@ static void phb4_create(struct dt_node *np) /* Populate base stuff */ p->index = dt_prop_get_u32(np, "ibm,phb-index"); p->chip_id = dt_prop_get_u32(np, "ibm,chip-id"); + p->pec = dt_prop_get_u32(np, "ibm,phb-pec-index"); chip = get_chip(p->chip_id); p->regs = (void *)dt_get_address(np, 0, NULL); p->int_mmio = (void *)dt_get_address(np, 1, NULL); @@ -5483,6 +5484,7 @@ static void phb4_probe_stack(struct dt_node *stk_node, uint32_t pec_index, nest_base, nest_stack, pci_base, pci_stack, etu_base); dt_add_property(np, "ibm,mmio-windows", mmio_win, 8 * mmio_win_sz); dt_add_property_cells(np, "ibm,phb-index", phb_num); + dt_add_property_cells(np, "ibm,phb-pec-index", pec_index); dt_add_property_cells(np, "ibm,phb-stack", stk_node->phandle); dt_add_property_cells(np, "ibm,phb-stack-index", stk_index); dt_add_property_cells(np, "ibm,chip-id", gcid); diff --git a/include/phb4.h b/include/phb4.h index 4ab2912..3186dca 100644 --- a/include/phb4.h +++ b/include/phb4.h @@ -169,6 +169,7 @@ struct phb4 { unsigned int index; /* 0..5 index inside p9 */ unsigned int flags; unsigned int chip_id; /* Chip ID (== GCID on p9) */ + unsigned int pec; bool broken; unsigned int rev; /* 00MMmmmm */ #define PHB4_REV_NIMBUS_DD10 0xa40001