Skip to content

Commit

Permalink
npu, npu2: Describe diag data size in device tree
Browse files Browse the repository at this point in the history
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>
Acked-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
ruscur authored and stewartsmith committed May 3, 2017
1 parent fa70adc commit 5971f6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions hw/npu.c
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions hw/npu2.c
Expand Up @@ -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,
Expand Down

0 comments on commit 5971f6e

Please sign in to comment.