From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Frederic Barrat <fbarrat@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org, andrew.donnellan@au1.ibm.com,
clombard@linux.ibm.com
Cc: aik@ozlabs.ru, Frederic Barrat <fbarrat@linux.ibm.com>,
oohall@gmail.com, groug@kaod.org, alastair@au1.ibm.com
Subject: Re: [PATCH v2 01/11] powerpc/powernv/ioda: Fix ref count for devices with their own PE
Date: Wed, 29 Jan 2020 16:17:24 +1100 (AEDT) [thread overview]
Message-ID: <486sDh4x2wz9sRR@ozlabs.org> (raw)
In-Reply-To: <20191121134918.7155-2-fbarrat@linux.ibm.com>
On Thu, 2019-11-21 at 13:49:08 UTC, Frederic Barrat wrote:
> The pci_dn structure used to store a pointer to the struct pci_dev, so
> taking a reference on the device was required. However, the pci_dev
> pointer was later removed from the pci_dn structure, but the reference
> was kept for the npu device.
> See commit 902bdc57451c ("powerpc/powernv/idoa: Remove unnecessary
> pcidev from pci_dn").
>
> We don't need to take a reference on the device when assigning the PE
> as the struct pnv_ioda_pe is cleaned up at the same time as
> the (physical) device is released. Doing so prevents the device from
> being released, which is a problem for opencapi devices, since we want
> to be able to remove them through PCI hotplug.
>
> Now the ugly part: nvlink npu devices are not meant to be
> released. Because of the above, we've always leaked a reference and
> simply removing it now is dangerous and would likely require more
> work. There's currently no release device callback for nvlink devices
> for example. So to be safe, this patch leaks a reference on the npu
> device, but only for nvlink and not opencapi.
>
> CC: aik@ozlabs.ru
> CC: oohall@gmail.com
> Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Series applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/05dd7da76986937fb288b4213b1fa10dbe0d1b33
cheers
next prev parent reply other threads:[~2020-01-29 5:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-21 13:49 [PATCH v2 00/11] opencapi: enable card reset and link retraining Frederic Barrat
2019-11-21 13:49 ` [PATCH v2 01/11] powerpc/powernv/ioda: Fix ref count for devices with their own PE Frederic Barrat
2020-01-08 7:33 ` Andrew Donnellan
2020-01-08 14:11 ` Frederic Barrat
2020-01-08 20:19 ` Andrew Donnellan
2020-01-29 5:17 ` Michael Ellerman [this message]
2019-11-21 13:49 ` [PATCH v2 02/11] powerpc/powernv/ioda: Protect PE list Frederic Barrat
2019-11-21 13:49 ` [PATCH v2 03/11] powerpc/powernv/ioda: set up PE on opencapi device when enabling Frederic Barrat
2019-11-21 13:49 ` [PATCH v2 04/11] powerpc/powernv/ioda: Release opencapi device Frederic Barrat
2019-11-22 5:22 ` Andrew Donnellan
2019-11-21 13:49 ` [PATCH v2 05/11] powerpc/powernv/ioda: Find opencapi slot for a device node Frederic Barrat
2019-11-22 4:27 ` Andrew Donnellan
2019-11-21 13:49 ` [PATCH v2 06/11] pci/hotplug/pnv-php: Remove erroneous warning Frederic Barrat
2019-11-21 13:49 ` [PATCH v2 07/11] pci/hotplug/pnv-php: Improve error msg on power state change failure Frederic Barrat
2019-11-21 13:49 ` [PATCH v2 08/11] pci/hotplug/pnv-php: Register opencapi slots Frederic Barrat
2019-11-22 4:33 ` Andrew Donnellan
2019-11-21 13:49 ` [PATCH v2 09/11] pci/hotplug/pnv-php: Relax check when disabling slot Frederic Barrat
2019-11-21 13:49 ` [PATCH v2 10/11] pci/hotplug/pnv-php: Wrap warnings in macro Frederic Barrat
2019-11-21 13:49 ` [PATCH v2 11/11] ocxl: Add PCI hotplug dependency to Kconfig Frederic Barrat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=486sDh4x2wz9sRR@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=aik@ozlabs.ru \
--cc=alastair@au1.ibm.com \
--cc=andrew.donnellan@au1.ibm.com \
--cc=clombard@linux.ibm.com \
--cc=fbarrat@linux.ibm.com \
--cc=groug@kaod.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oohall@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).