* [PATCH] powernv/npu-dma.c: Fix opal_npu_destroy_context call
@ 2017-05-19 20:56 Alistair Popple
2017-05-25 13:22 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Alistair Popple @ 2017-05-19 20:56 UTC (permalink / raw)
To: linuxppc-dev; +Cc: mpe, sbaskaran, shailendras, Alistair Popple
opal_npu_destroy_context() should be called with the NPU PHB, not the
PCIe PHB.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
---
arch/powerpc/platforms/powernv/npu-dma.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/npu-dma.c b/arch/powerpc/platforms/powernv/npu-dma.c
index 067defe..78fa939 100644
--- a/arch/powerpc/platforms/powernv/npu-dma.c
+++ b/arch/powerpc/platforms/powernv/npu-dma.c
@@ -714,7 +714,7 @@ static void pnv_npu2_release_context(struct kref *kref)
void pnv_npu2_destroy_context(struct npu_context *npu_context,
struct pci_dev *gpdev)
{
- struct pnv_phb *nphb, *phb;
+ struct pnv_phb *nphb;
struct npu *npu;
struct pci_dev *npdev = pnv_pci_get_npu_dev(gpdev, 0);
struct device_node *nvlink_dn;
@@ -728,13 +728,12 @@ void pnv_npu2_destroy_context(struct npu_context *npu_context,
nphb = pci_bus_to_host(npdev->bus)->private_data;
npu = &nphb->npu;
- phb = pci_bus_to_host(gpdev->bus)->private_data;
nvlink_dn = of_parse_phandle(npdev->dev.of_node, "ibm,nvlink", 0);
if (WARN_ON(of_property_read_u32(nvlink_dn, "ibm,npu-link-index",
&nvlink_index)))
return;
npu_context->npdev[npu->index][nvlink_index] = NULL;
- opal_npu_destroy_context(phb->opal_id, npu_context->mm->context.id,
+ opal_npu_destroy_context(nphb->opal_id, npu_context->mm->context.id,
PCI_DEVID(gpdev->bus->number, gpdev->devfn));
kref_put(&npu_context->kref, pnv_npu2_release_context);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: powernv/npu-dma.c: Fix opal_npu_destroy_context call
2017-05-19 20:56 [PATCH] powernv/npu-dma.c: Fix opal_npu_destroy_context call Alistair Popple
@ 2017-05-25 13:22 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2017-05-25 13:22 UTC (permalink / raw)
To: Alistair Popple, linuxppc-dev; +Cc: sbaskaran, shailendras, Alistair Popple
On Fri, 2017-05-19 at 20:56:35 UTC, Alistair Popple wrote:
> opal_npu_destroy_context() should be called with the NPU PHB, not the
> PCIe PHB.
>
> Signed-off-by: Alistair Popple <alistair@popple.id.au>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/415ba3c157b9de7edc59468d19d48c
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-25 13:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-19 20:56 [PATCH] powernv/npu-dma.c: Fix opal_npu_destroy_context call Alistair Popple
2017-05-25 13:22 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).