From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: bingbu.cao@intel.com
Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com,
tomi.valkeinen@ideasonboard.com, hans@jjverkuil.nl,
jacopo.mondi@ideasonboard.com, bingbu.cao@linux.intel.com
Subject: Re: [PATCH 3/3] media: staging/ipu7: cleanup the MMU correctly in IPU7 driver release
Date: Fri, 15 Aug 2025 21:26:24 +0000 [thread overview]
Message-ID: <aJ-mALzD-mA_KXsa@kekkonen.localdomain> (raw)
In-Reply-To: <20250815092037.1825769-3-bingbu.cao@intel.com>
Hi Bingbu,
Thanks for the set.
On Fri, Aug 15, 2025 at 05:20:37PM +0800, bingbu.cao@intel.com wrote:
> From: Bingbu Cao <bingbu.cao@intel.com>
>
> IPU7 ISYS and PSYS auxiliary devices are released after
> ipu7_bus_del_devices(), so driver can not reference the MMU devices
> from ISYS and PSYS auxiliary devices, so move the MMUs cleanup before
> releasing the auxiliary devices.
>
> Fixes: b7fe4c0019b1 ("media: staging/ipu7: add Intel IPU7 PCI device driver")
Please also add Cc: stable tag if you have a Fixes: tag.
> Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
> ---
> drivers/staging/media/ipu7/ipu7.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/media/ipu7/ipu7.c b/drivers/staging/media/ipu7/ipu7.c
> index aef931d23510..3de41b3d1ae1 100644
> --- a/drivers/staging/media/ipu7/ipu7.c
> +++ b/drivers/staging/media/ipu7/ipu7.c
> @@ -2644,6 +2644,9 @@ static void ipu7_pci_remove(struct pci_dev *pdev)
> if (!IS_ERR_OR_NULL(isp->fw_code_region))
> vfree(isp->fw_code_region);
>
> + ipu7_mmu_cleanup(isp->isys->mmu);
> + ipu7_mmu_cleanup(isp->psys->mmu);
> +
> ipu7_bus_del_devices(pdev);
>
> pm_runtime_forbid(&pdev->dev);
> @@ -2653,8 +2656,6 @@ static void ipu7_pci_remove(struct pci_dev *pdev)
>
> release_firmware(isp->cpd_fw);
>
This newline will be extra once the two lines below have been removed.
Does the same issue exist in the IPU6 driver? These calls are located in
the same location but I haven't checked if that's the right place for them.
> - ipu7_mmu_cleanup(isp->psys->mmu);
> - ipu7_mmu_cleanup(isp->isys->mmu);
> }
>
> static void ipu7_pci_reset_prepare(struct pci_dev *pdev)
--
Kind regards,
Sakari Ailus
next prev parent reply other threads:[~2025-08-15 21:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-15 9:20 [PATCH 1/3] media: staging/ipu7: convert to use pci_alloc_irq_vectors() API bingbu.cao
2025-08-15 9:20 ` [PATCH 2/3] media: staging/ipu7: Don't set name for IPU7 PCI device bingbu.cao
2025-08-15 9:20 ` [PATCH 3/3] media: staging/ipu7: cleanup the MMU correctly in IPU7 driver release bingbu.cao
2025-08-15 21:26 ` Sakari Ailus [this message]
2025-08-18 2:27 ` Bingbu Cao
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=aJ-mALzD-mA_KXsa@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=bingbu.cao@intel.com \
--cc=bingbu.cao@linux.intel.com \
--cc=hans@jjverkuil.nl \
--cc=jacopo.mondi@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=tomi.valkeinen@ideasonboard.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.