Message ID | 20170503014929.30982-1-ruscur@russell.cc |
---|---|
State | Accepted |
Headers | show |
Acked-by: Alistair Popple <alistair@popple.id.au> On Wed, 3 May 2017 11:49:29 AM Russell Currey wrote: > NPU and NPU2 don't use diag data, but the kernel will allocate a buffer for > NPU PHBs regardless. Set ibm,phb-diag-data-size to 0 for NPU PHBs to save a > whole precious 8K. > > Signed-off-by: Russell Currey <ruscur@russell.cc> > --- > hw/npu.c | 1 + > hw/npu2.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/hw/npu.c b/hw/npu.c > index f00e9c5c..b113800b 100644 > --- a/hw/npu.c > +++ b/hw/npu.c > @@ -1152,6 +1152,7 @@ static void npu_probe_phb(struct dt_node *dn) > dt_add_property_cells(np, "ibm,npcq", dn->phandle); > dt_add_property_cells(np, "ibm,links", links); > dt_add_property(np, "ibm,mmio-window", mm_win, sizeof(mm_win)); > + dt_add_property_cells(np, "ibm,phb-diag-data-size", 0); > } > > static void npu_dev_populate_vendor_cap(struct npu_dev_cap *cap) > diff --git a/hw/npu2.c b/hw/npu2.c > index 31726628..a8560cf1 100644 > --- a/hw/npu2.c > +++ b/hw/npu2.c > @@ -1209,6 +1209,7 @@ static void npu2_probe_phb(struct dt_node *dn) > dt_add_property_cells(np, "ibm,npcq", dn->phandle); > dt_add_property_cells(np, "ibm,links", links); > dt_add_property(np, "ibm,mmio-window", mm_win, sizeof(mm_win)); > + dt_add_property_cells(np, "ibm,phb-diag-data-size", 0); > } > > static uint32_t npu2_populate_pcie_cap(struct npu2_dev *dev, >
Russell Currey <ruscur@russell.cc> writes: > NPU and NPU2 don't use diag data, but the kernel will allocate a buffer for > NPU PHBs regardless. Set ibm,phb-diag-data-size to 0 for NPU PHBs to save a > whole precious 8K. > > Signed-off-by: Russell Currey <ruscur@russell.cc> > --- > hw/npu.c | 1 + > hw/npu2.c | 1 + > 2 files changed, 2 insertions(+) Merged to master as of 5971f6e272a0dcfaa1157094f5e6a4f1929316d5
diff --git a/hw/npu.c b/hw/npu.c index f00e9c5c..b113800b 100644 --- a/hw/npu.c +++ b/hw/npu.c @@ -1152,6 +1152,7 @@ static void npu_probe_phb(struct dt_node *dn) dt_add_property_cells(np, "ibm,npcq", dn->phandle); dt_add_property_cells(np, "ibm,links", links); dt_add_property(np, "ibm,mmio-window", mm_win, sizeof(mm_win)); + dt_add_property_cells(np, "ibm,phb-diag-data-size", 0); } static void npu_dev_populate_vendor_cap(struct npu_dev_cap *cap) diff --git a/hw/npu2.c b/hw/npu2.c index 31726628..a8560cf1 100644 --- a/hw/npu2.c +++ b/hw/npu2.c @@ -1209,6 +1209,7 @@ static void npu2_probe_phb(struct dt_node *dn) dt_add_property_cells(np, "ibm,npcq", dn->phandle); dt_add_property_cells(np, "ibm,links", links); dt_add_property(np, "ibm,mmio-window", mm_win, sizeof(mm_win)); + dt_add_property_cells(np, "ibm,phb-diag-data-size", 0); } static uint32_t npu2_populate_pcie_cap(struct npu2_dev *dev,
NPU and NPU2 don't use diag data, but the kernel will allocate a buffer for NPU PHBs regardless. Set ibm,phb-diag-data-size to 0 for NPU PHBs to save a whole precious 8K. Signed-off-by: Russell Currey <ruscur@russell.cc> --- hw/npu.c | 1 + hw/npu2.c | 1 + 2 files changed, 2 insertions(+)